Documentation ¶
Index ¶
- Constants
- type BeaconClient
- func (bc *BeaconClient) GetBlockBodyByBlockroot(ctx context.Context, blockroot phase0.Root) (*spec.VersionedSignedBeaconBlock, error)
- func (bc *BeaconClient) GetBlockHeaderByBlockroot(ctx context.Context, blockroot phase0.Root) (*v1.BeaconBlockHeader, error)
- func (bc *BeaconClient) GetBlockHeaderBySlot(ctx context.Context, slot phase0.Slot) (*v1.BeaconBlockHeader, error)
- func (bc *BeaconClient) GetCommitteeDuties(ctx context.Context, stateRef string, epoch uint64) ([]*v1.BeaconCommittee, error)
- func (bc *BeaconClient) GetConfigSpecs(ctx context.Context) (map[string]interface{}, error)
- func (bc *BeaconClient) GetFinalityCheckpoints(ctx context.Context) (*v1.Finality, error)
- func (bc *BeaconClient) GetForkState(ctx context.Context, stateRef string) (*phase0.Fork, error)
- func (bc *BeaconClient) GetGenesis(ctx context.Context) (*v1.Genesis, error)
- func (bc *BeaconClient) GetLatestBlockHead(ctx context.Context) (*v1.BeaconBlockHeader, error)
- func (bc *BeaconClient) GetNodeSyncStatus(ctx context.Context) (*SyncStatus, error)
- func (bc *BeaconClient) GetNodeSyncing(ctx context.Context) (*v1.SyncState, error)
- func (bc *BeaconClient) GetNodeVersion(ctx context.Context) (string, error)
- func (bc *BeaconClient) GetProposerDuties(ctx context.Context, epoch uint64) ([]*v1.ProposerDuty, error)
- func (bc *BeaconClient) GetState(ctx context.Context, stateRef string) (*spec.VersionedBeaconState, error)
- func (bc *BeaconClient) GetStateValidators(ctx context.Context, stateRef string) (map[phase0.ValidatorIndex]*v1.Validator, error)
- func (bc *BeaconClient) Initialize(ctx context.Context) error
- func (bc *BeaconClient) NewBlockStream(ctx context.Context, events uint16) *BeaconStream
- func (bc *BeaconClient) SubmitAttesterSlashing(ctx context.Context, slashing *phase0.AttesterSlashing) error
- func (bc *BeaconClient) SubmitBLSToExecutionChanges(ctx context.Context, blsChanges []*capella.SignedBLSToExecutionChange) error
- func (bc *BeaconClient) SubmitProposerSlashing(ctx context.Context, slashing *phase0.ProposerSlashing) error
- func (bc *BeaconClient) SubmitVoluntaryExits(ctx context.Context, exit *phase0.SignedVoluntaryExit) error
- type BeaconStream
- type BeaconStreamEvent
- type SyncStatus
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, url string, headers map[string]string) (*BeaconClient, error)
NewBeaconClient is used to create a new beacon client
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) GetCommitteeDuties ¶
func (bc *BeaconClient) GetCommitteeDuties(ctx context.Context, stateRef string, epoch uint64) ([]*v1.BeaconCommittee, error)
func (*BeaconClient) GetConfigSpecs ¶
func (bc *BeaconClient) GetConfigSpecs(ctx context.Context) (map[string]interface{}, error)
func (*BeaconClient) GetFinalityCheckpoints ¶
func (*BeaconClient) GetForkState ¶
func (*BeaconClient) GetGenesis ¶
func (*BeaconClient) GetLatestBlockHead ¶
func (bc *BeaconClient) GetLatestBlockHead(ctx context.Context) (*v1.BeaconBlockHeader, error)
func (*BeaconClient) GetNodeSyncStatus ¶
func (bc *BeaconClient) GetNodeSyncStatus(ctx context.Context) (*SyncStatus, error)
func (*BeaconClient) GetNodeSyncing ¶
func (*BeaconClient) GetNodeVersion ¶
func (bc *BeaconClient) GetNodeVersion(ctx context.Context) (string, error)
func (*BeaconClient) GetProposerDuties ¶
func (bc *BeaconClient) GetProposerDuties(ctx context.Context, epoch uint64) ([]*v1.ProposerDuty, error)
func (*BeaconClient) GetState ¶
func (bc *BeaconClient) GetState(ctx context.Context, stateRef string) (*spec.VersionedBeaconState, error)
func (*BeaconClient) GetStateValidators ¶
func (bc *BeaconClient) GetStateValidators(ctx context.Context, stateRef string) (map[phase0.ValidatorIndex]*v1.Validator, error)
func (*BeaconClient) Initialize ¶
func (bc *BeaconClient) Initialize(ctx context.Context) error
func (*BeaconClient) NewBlockStream ¶
func (bc *BeaconClient) NewBlockStream(ctx context.Context, 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 bool 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 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
Click to show internal directories.
Click to hide internal directories.