Documentation
¶
Index ¶
- type Parameter
- type Service
- func (s *Service) Address() string
- func (s *Service) BeaconBlockProposal(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, ...) (*phase0.BeaconBlock, error)
- func (s *Service) BeaconBlockRoot(ctx context.Context, blockID string) (*phase0.Root, error)
- func (s *Service) Genesis(ctx context.Context) (*api.Genesis, error)
- func (s *Service) Name() string
- func (s *Service) NodeSyncing(ctx context.Context) (*api.SyncState, error)
- func (s *Service) SyncCommitteeContribution(ctx context.Context, slot phase0.Slot, subcommitteeIndex uint64, ...) (*altair.SyncCommitteeContribution, error)
- func (s *Service) Validators(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]*api.Validator, error)
- func (s *Service) ValidatorsByPubKey(ctx context.Context, stateID string, validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*api.Validator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parameter ¶
type Parameter interface {
// contains filtered or unexported methods
}
Parameter is the interface for service parameters.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithTimeout ¶
WithTimeout sets the maximum duration for all requests to the endpoint.
type Service ¶
type Service struct { // Values that can be altered if required. HeadSlot phase0.Slot SyncDistance phase0.Slot // contains filtered or unexported fields }
Service is a mock Ethereum 2 client service, providing data locally.
func (*Service) BeaconBlockProposal ¶
func (s *Service) BeaconBlockProposal(ctx context.Context, slot phase0.Slot, randaoReveal phase0.BLSSignature, graffiti []byte) (*phase0.BeaconBlock, error)
BeaconBlockProposal fetches a proposed beacon block for signing.
func (*Service) BeaconBlockRoot ¶ added in v0.7.0
BeaconBlockRoot fetches a block's root given a block ID.
func (*Service) NodeSyncing ¶ added in v0.6.25
NodeSyncing provides the state of the node's synchronization with the chain.
func (*Service) SyncCommitteeContribution ¶ added in v0.7.0
func (s *Service) SyncCommitteeContribution(ctx context.Context, slot phase0.Slot, subcommitteeIndex uint64, beaconBlockRoot phase0.Root) (*altair.SyncCommitteeContribution, error)
SyncCommitteeContribution provides a sync committee contribution.
func (*Service) Validators ¶ added in v0.8.1
func (s *Service) Validators(ctx context.Context, stateID string, validatorIndices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]*api.Validator, error)
Validators provides the validators, with their balance and status, for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validatorIndices is a list of validator indices to restrict the returned values. If no validators IDs are supplied no filter will be applied.
func (*Service) ValidatorsByPubKey ¶ added in v0.8.1
func (s *Service) ValidatorsByPubKey(ctx context.Context, stateID string, validatorPubKeys []phase0.BLSPubKey) (map[phase0.ValidatorIndex]*api.Validator, error)
ValidatorsByPubKey provides the validators, with their balance and status, for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validatorPubKeys is a list of validator public keys to restrict the returned values. If no validators public keys are supplied no filter will be applied.