beacon

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpecPath = "/eth/v1/config/spec"
	SyncPath = "/eth/v1/node/syncing"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconService

type BeaconService struct {
	// contains filtered or unexported fields
}

func NewBeaconService

func NewBeaconService() *BeaconService

func (*BeaconService) Configure

func (b *BeaconService) Configure(cfg config.BeaconConfig) error

func (*BeaconService) ConnectedChainId

func (b *BeaconService) ConnectedChainId() *big.Int

func (*BeaconService) Status

func (b *BeaconService) Status() (res *SyncStatusData, err error)

func (*BeaconService) SubscribeToHeadEvents

func (b *BeaconService) SubscribeToHeadEvents(ctx context.Context, headEvent chan<- HeadEventData) error

type GetSyncStatusResponse

type GetSyncStatusResponse struct {
	Data *SyncStatusData `json:"data"`
}

type HeadEventData

type HeadEventData struct {
	Slot  uint64 `json:"slot,string"`
	Block string `json:"block"`
	State string `json:"state"`
}

type SyncStatusData

type SyncStatusData struct {
	HeadSlot     uint64 `json:"head_slot,string"`
	SyncDistance uint64 `json:"sync_distance,string"`
	IsSyncing    bool   `json:"is_syncing"`
	IsOptimistic bool   `json:"is_optimistic"`
	ElOffline    bool   `json:"el_offline"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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