client

package
v0.0.0-...-7a2e46d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBeaconClient

func NewBeaconClient(endpoint string) (*beaconClient, error)

Types

type BeaconClientInstance

type BeaconClientInstance interface {
	BaseEndpoint() string

	// get methods
	GetSlotProposerMap(uint64) (beaconData.SlotProposerMap, error)
	SyncStatus() (*beaconTypes.SyncStatusData, error)
	GetValidatorList(uint64) ([]*beaconTypes.ValidatorData, error)
	GetValidatorIndex([]string) (*beaconTypes.GetValidatorsResponse, error)
	Genesis() (*beaconTypes.GenesisData, error)
	GetWithdrawals(uint64) (*beaconTypes.Withdrawals, error)
	Randao(uint64) (*common.Hash, error)
	GetBlockHeader(slot uint64) (*beaconTypes.BlockHeaderData, error)
	GetCurrentBlockHeader() (*beaconTypes.BlockHeaderData, error)
	GetForkVersion(slot uint64, head bool) (forkName string, forkVersion string, err error)

	// post methods
	PublishBlock(context.Context, commonTypes.VersionedSignedBeaconBlock) error

	// subscription methods
	SubscribeToHeadEvents(context.Context, chan beaconTypes.HeadEventData)
	SubscribeToPayloadAttributesEvents(context.Context, chan beaconTypes.PayloadAttributesEvent)
}

Jump to

Keyboard shortcuts

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