Documentation ¶
Index ¶
- func NewRootFromString(id string) (phase0.Root, error)
- func NewSlotFromString(id string) (phase0.Slot, error)
- type BlockIDType
- type BlockIdentifier
- type DepositContract
- type Handler
- func (h *Handler) BeaconBlock(ctx context.Context, blockID BlockIdentifier) (*spec.VersionedSignedBeaconBlock, error)
- func (h *Handler) BeaconGenesis(ctx context.Context) (*v1.Genesis, error)
- func (h *Handler) BeaconState(ctx context.Context, stateID StateIdentifier) (*[]byte, error)
- func (h *Handler) BlockRoot(ctx context.Context, blockID BlockIdentifier) (phase0.Root, error)
- func (h *Handler) ConfigSpec(ctx context.Context) (*state.Spec, error)
- func (h *Handler) DepositContract(ctx context.Context) (*DepositContract, error)
- func (h *Handler) DepositSnapshot(ctx context.Context) (*types.DepositSnapshot, error)
- func (h *Handler) FinalityCheckpoints(ctx context.Context, stateID StateIdentifier) (*v1.Finality, error)
- func (h *Handler) ForkSchedule(ctx context.Context) ([]*state.ScheduledFork, error)
- func (h *Handler) NodeSyncing(ctx context.Context) (*v1.SyncState, error)
- func (h *Handler) NodeVersion(ctx context.Context) (string, error)
- func (h *Handler) PeerCount(ctx context.Context) (uint64, error)
- func (h *Handler) Peers(ctx context.Context) (types.Peers, error)
- type ID
- type Metrics
- type StateIDType
- type StateIdentifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockIDType ¶
type BlockIDType int
const ( BlockIDInvalid BlockIDType = iota BlockIDHead BlockIDGenesis BlockIDFinalized BlockIDSlot BlockIDRoot )
func (BlockIDType) String ¶
func (t BlockIDType) String() string
type BlockIdentifier ¶
type BlockIdentifier struct {
// contains filtered or unexported fields
}
func NewBlockIdentifier ¶
func NewBlockIdentifier(id string) (BlockIdentifier, error)
func (BlockIdentifier) String ¶
func (id BlockIdentifier) String() string
func (BlockIdentifier) Type ¶
func (id BlockIdentifier) Type() BlockIDType
func (BlockIdentifier) Value ¶
func (id BlockIdentifier) Value() string
type DepositContract ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the Eth Service handler. HTTP-level concerns should NOT be contained in this package, they should be handled and reasoned with at a higher level.
func NewHandler ¶
func NewHandler(log logrus.FieldLogger, beac beacon.FinalityProvider, namespace string) *Handler
NewHandler returns a new Handler instance.
func (*Handler) BeaconBlock ¶
func (h *Handler) BeaconBlock(ctx context.Context, blockID BlockIdentifier) (*spec.VersionedSignedBeaconBlock, error)
BeaconBlock returns the beacon block for the given block ID.
func (*Handler) BeaconGenesis ¶
BeaconGenesis returns the details of the chain's genesis.
func (*Handler) BeaconState ¶
BeaconState returns the beacon state for the given state id.
func (*Handler) ConfigSpec ¶
ConfigSpec gets the spec configuration.
func (*Handler) DepositContract ¶
func (h *Handler) DepositContract(ctx context.Context) (*DepositContract, error)
DepositContract gets the Eth1 deposit address and chain ID
func (*Handler) DepositSnapshot ¶ added in v0.15.0
DepositContract gets the deposit snapshot at the finalized checkpoint.
func (*Handler) FinalityCheckpoints ¶
func (h *Handler) FinalityCheckpoints(ctx context.Context, stateID StateIdentifier) (*v1.Finality, error)
FinalityCheckpoints returns the finality checkpoints for the given state id.
func (*Handler) ForkSchedule ¶
ForkSchedule returns the upcoming forks.
func (*Handler) NodeSyncing ¶
NodeSyncing returns the sync state of the beacon node.
func (*Handler) NodeVersion ¶
NodeVersion returns the version of the beacon node.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func (*Metrics) ObserveCall ¶
func (*Metrics) ObserveErrorCall ¶
type StateIDType ¶
type StateIDType int
const ( StateIDInvalid StateIDType = iota StateIDHead StateIDGenesis StateIDFinalized StateIDSlot StateIDRoot )
func (StateIDType) String ¶
func (t StateIDType) String() string
type StateIdentifier ¶
type StateIdentifier struct {
// contains filtered or unexported fields
}
func NewStateIdentifier ¶
func NewStateIdentifier(id string) (StateIdentifier, error)
func (StateIdentifier) String ¶
func (id StateIdentifier) String() string
func (StateIdentifier) Type ¶
func (id StateIdentifier) Type() StateIDType
func (StateIdentifier) Value ¶
func (id StateIdentifier) Value() string