rpc

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: GPL-3.0 Imports: 24 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(name, endpoint string, headers map[string]string, sshcfg *sshtunnel.SshConfig, disableSSZ bool, logger logrus.FieldLogger) (*BeaconClient, error)

NewBeaconClient is used to create a new beacon client

func (*BeaconClient) GetBlobSidecarsByBlockroot

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

func (*BeaconClient) GetBlockBodyByBlockroot

func (bc *BeaconClient) GetBlockBodyByBlockroot(ctx context.Context, blockroot phase0.Root) (*spec.VersionedSignedBeaconBlock, error)

func (*BeaconClient) GetBlockHeaderByBlockroot

func (bc *BeaconClient) GetBlockHeaderByBlockroot(ctx context.Context, blockroot phase0.Root) (*v1.BeaconBlockHeader, error)

func (*BeaconClient) GetBlockHeaderBySlot

func (bc *BeaconClient) GetBlockHeaderBySlot(ctx context.Context, slot phase0.Slot) (*v1.BeaconBlockHeader, error)

func (*BeaconClient) GetConfigSpecs

func (bc *BeaconClient) GetConfigSpecs(ctx context.Context) (map[string]interface{}, error)

func (*BeaconClient) GetFinalityCheckpoints

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

func (*BeaconClient) GetForkState

func (bc *BeaconClient) GetForkState(ctx context.Context, stateRef string) (*phase0.Fork, error)

func (*BeaconClient) GetGenesis

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

func (*BeaconClient) GetLatestBlockHead

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

func (*BeaconClient) GetNodeIdentity added in v1.11.2

func (bc *BeaconClient) GetNodeIdentity(ctx context.Context) (*NodeIdentity, error)

func (*BeaconClient) GetNodePeers

func (bc *BeaconClient) GetNodePeers(ctx context.Context) ([]*v1.Peer, error)

func (*BeaconClient) GetNodeSyncStatus

func (bc *BeaconClient) GetNodeSyncStatus(ctx context.Context) (*SyncStatus, error)

func (*BeaconClient) GetNodeSyncing

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

func (*BeaconClient) GetNodeVersion

func (bc *BeaconClient) GetNodeVersion(ctx context.Context) (string, error)

func (*BeaconClient) GetState

func (bc *BeaconClient) GetState(ctx context.Context, stateRef string) (*spec.VersionedBeaconState, error)

func (*BeaconClient) Initialize

func (bc *BeaconClient) Initialize(ctx context.Context) error

func (*BeaconClient) NewBlockStream

func (bc *BeaconClient) NewBlockStream(ctx context.Context, logger logrus.FieldLogger, events uint16) *BeaconStream

func (*BeaconClient) SubmitAttesterSlashing

func (bc *BeaconClient) SubmitAttesterSlashing(ctx context.Context, slashing *phase0.AttesterSlashing) error

func (*BeaconClient) SubmitBLSToExecutionChanges

func (bc *BeaconClient) SubmitBLSToExecutionChanges(ctx context.Context, blsChanges []*capella.SignedBLSToExecutionChange) error

func (*BeaconClient) SubmitProposerSlashing

func (bc *BeaconClient) SubmitProposerSlashing(ctx context.Context, slashing *phase0.ProposerSlashing) error

func (*BeaconClient) SubmitVoluntaryExits

func (bc *BeaconClient) SubmitVoluntaryExits(ctx context.Context, exit *phase0.SignedVoluntaryExit) error

type BeaconStream

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

func (*BeaconStream) Close

func (bs *BeaconStream) Close()

type BeaconStreamEvent

type BeaconStreamEvent struct {
	Event uint16
	Data  interface{}
}

type BeaconStreamStatus

type BeaconStreamStatus struct {
	Ready bool
	Error error
}

type NodeIdentity added in v1.11.2

type NodeIdentity struct {
	PeerID             string   `json:"peer_id"`
	Enr                string   `json:"enr"`
	P2PAddresses       []string `json:"p2p_addresses"`
	DiscoveryAddresses []string `json:"discovery_addresses"`
	Metadata           struct {
		Attnets string `json:"attnets"`
	} `json:"metadata"`
}

type SyncStatus

type SyncStatus struct {
	IsSyncing                bool
	IsOptimistic             bool
	HeadSlot                 uint64
	EstimatedHighestHeadSlot uint64
	SyncDistance             uint64
}

func NewSyncStatus

func NewSyncStatus(state *v1.SyncState) SyncStatus

func (*SyncStatus) Percent

func (s *SyncStatus) Percent() float64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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