rpc

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamBlockEvent     uint16 = 0x01
	StreamHeadEvent      uint16 = 0x02
	StreamFinalizedEvent uint16 = 0x04
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BeaconClient

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

func NewBeaconClient

func NewBeaconClient(endpoint string, name string, headers map[string]string, sshcfg *types.EndpointSshConfig) (*BeaconClient, error)

NewBeaconClient is used to create a new beacon client

func (*BeaconClient) GetBlobSidecarsByBlockroot

func (bc *BeaconClient) GetBlobSidecarsByBlockroot(blockroot []byte) ([]*deneb.BlobSidecar, error)

func (*BeaconClient) GetBlockBodyByBlockroot

func (bc *BeaconClient) GetBlockBodyByBlockroot(blockroot []byte) (*spec.VersionedSignedBeaconBlock, error)

func (*BeaconClient) GetBlockHeaderByBlockroot

func (bc *BeaconClient) GetBlockHeaderByBlockroot(blockroot []byte) (*v1.BeaconBlockHeader, error)

func (*BeaconClient) GetBlockHeaderBySlot

func (bc *BeaconClient) GetBlockHeaderBySlot(slot uint64) (*v1.BeaconBlockHeader, error)

func (*BeaconClient) GetCommitteeDuties

func (bc *BeaconClient) GetCommitteeDuties(stateRef string, epoch uint64) ([]*v1.BeaconCommittee, error)

func (*BeaconClient) GetEpochAssignments

func (bc *BeaconClient) GetEpochAssignments(epoch uint64, dependendRoot []byte) (*EpochAssignments, error)

GetEpochAssignments will get the epoch assignments from Lighthouse RPC api

func (*BeaconClient) GetFinalityCheckpoints

func (bc *BeaconClient) GetFinalityCheckpoints() (*v1.Finality, error)

func (*BeaconClient) GetGenesis

func (bc *BeaconClient) GetGenesis() (*v1.Genesis, error)

func (*BeaconClient) GetLatestBlockHead

func (bc *BeaconClient) GetLatestBlockHead() (*v1.BeaconBlockHeader, error)

func (*BeaconClient) GetNodeSyncing

func (bc *BeaconClient) GetNodeSyncing() (*v1.SyncState, error)

func (*BeaconClient) GetNodeVersion

func (bc *BeaconClient) GetNodeVersion() (string, error)

func (*BeaconClient) GetProposerDuties

func (bc *BeaconClient) GetProposerDuties(epoch uint64) (*ProposerDuties, error)

func (*BeaconClient) GetStateValidators

func (bc *BeaconClient) GetStateValidators(stateRef string) (map[phase0.ValidatorIndex]*v1.Validator, error)

func (*BeaconClient) GetSyncCommitteeDuties

func (bc *BeaconClient) GetSyncCommitteeDuties(stateRef string, epoch uint64) (*v1.SyncCommittee, error)

func (*BeaconClient) Initialize

func (bc *BeaconClient) Initialize() error

func (*BeaconClient) NewBlockStream

func (bc *BeaconClient) NewBlockStream(events uint16) *BeaconStream

type BeaconStream

type BeaconStream struct {
	ReadyChan chan bool
	EventChan chan *BeaconStreamEvent
	// contains filtered or unexported fields
}

func (*BeaconStream) Close

func (bs *BeaconStream) Close()

func (*BeaconStream) Start

func (bs *BeaconStream) Start()

type BeaconStreamEvent

type BeaconStreamEvent struct {
	Event uint16
	Data  interface{}
}

type EpochAssignments

type EpochAssignments struct {
	DependendRoot       phase0.Root         `json:"dep_root"`
	DependendStateRef   string              `json:"dep_state"`
	ProposerAssignments map[uint64]uint64   `json:"prop"`
	AttestorAssignments map[string][]uint64 `json:"att"`
	SyncAssignments     []uint64            `json:"sync"`
}

type ProposerDuties

type ProposerDuties struct {
	DependentRoot phase0.Root        `json:"dependent_root"`
	Data          []*v1.ProposerDuty `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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