ethereum

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconNode

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

func NewBeaconNode

func NewBeaconNode(ctx context.Context, name string, config *Config, log logrus.FieldLogger, opt *Options) (*BeaconNode, error)

func (*BeaconNode) Duties

func (b *BeaconNode) Duties() *services.DutiesService

func (*BeaconNode) Metadata

func (b *BeaconNode) Metadata() *services.MetadataService

func (*BeaconNode) Node

func (b *BeaconNode) Node() beacon.Node

func (*BeaconNode) OnReady

func (b *BeaconNode) OnReady(_ context.Context, callback func(ctx context.Context) error)

func (*BeaconNode) Start

func (b *BeaconNode) Start(ctx context.Context) error

func (*BeaconNode) Synced

func (b *BeaconNode) Synced(ctx context.Context) error

type Config

type Config struct {
	// The address of the Beacon node to connect to
	BeaconNodeAddress string `yaml:"beaconNodeAddress"`
	// OverrideNetworkName is the name of the network to use for the sentry.
	// If not set, the network name will be retrieved from the beacon node.
	OverrideNetworkName string `yaml:"overrideNetworkName"  default:""`
	// BeaconNodeHeaders is a map of headers to send to the beacon node.
	BeaconNodeHeaders map[string]string `yaml:"beaconNodeHeaders"`
	// BeaconSubscriptions is a list of beacon subscriptions to subscribe to.
	BeaconSubscriptions *[]string `yaml:"beaconSubscriptions"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Options added in v1.0.1

type Options struct {
	FetchBeaconCommittees bool
	FetchProposerDuties   bool
}

func (*Options) WithFetchBeaconCommittees added in v1.0.1

func (o *Options) WithFetchBeaconCommittees(fetchBeaconCommittees bool) *Options

func (*Options) WithFetchProposerDuties added in v1.0.1

func (o *Options) WithFetchProposerDuties(fetchProposerDuties bool) *Options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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