beacon

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2020 License: GPL-3.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconHead

type BeaconHead struct {
	Slot                   uint64
	FinalizedSlot          uint64
	JustifiedSlot          uint64
	PreviousJustifiedSlot  uint64
	Epoch                  uint64
	FinalizedEpoch         uint64
	JustifiedEpoch         uint64
	PreviousJustifiedEpoch uint64
}

type Client

type Client interface {
	GetSyncStatus() (SyncStatus, error)
	GetEth2Config() (Eth2Config, error)
	GetBeaconHead() (BeaconHead, error)
	GetValidatorStatus(pubkey types.ValidatorPubkey, opts *ValidatorStatusOptions) (ValidatorStatus, error)
	GetValidatorStatuses(pubkeys []types.ValidatorPubkey, opts *ValidatorStatusOptions) (map[types.ValidatorPubkey]ValidatorStatus, error)
	Close()
}

Beacon client interface

type Eth2Config

type Eth2Config struct {
	GenesisForkVersion []byte
	GenesisEpoch       uint64
	GenesisTime        uint64
	SecondsPerEpoch    uint64
}

type SyncStatus

type SyncStatus struct {
	Syncing bool
}

API response types

type ValidatorStatus

type ValidatorStatus struct {
	Pubkey                     types.ValidatorPubkey
	WithdrawalCredentials      common.Hash
	Balance                    uint64
	EffectiveBalance           uint64
	Slashed                    bool
	ActivationEligibilityEpoch uint64
	ActivationEpoch            uint64
	ExitEpoch                  uint64
	WithdrawableEpoch          uint64
	Exists                     bool
}

type ValidatorStatusOptions

type ValidatorStatusOptions struct {
	Epoch uint64
}

API request options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL