Documentation ¶
Index ¶
- type Parameter
- type Service
- func (s *Service) AddOnBeaconChainHeadUpdatedHandler(ctx context.Context, handler client.BeaconChainHeadUpdatedHandler) error
- func (s *Service) Address() string
- func (s *Service) AggregateAndProofDomain(ctx context.Context) ([]byte, error)
- func (s *Service) AttestationData(ctx context.Context, slot uint64, committeeIndex uint64) (*spec.AttestationData, error)
- func (s *Service) AttesterDuties(ctx context.Context, epoch uint64, validators []client.ValidatorIDProvider) ([]*api.AttesterDuty, error)
- func (s *Service) BeaconAttesterDomain(ctx context.Context) ([]byte, error)
- func (s *Service) BeaconBlockProposal(ctx context.Context, slot uint64, randaoReveal []byte, graffiti []byte) (*spec.BeaconBlock, error)
- func (s *Service) BeaconBlockRootBySlot(ctx context.Context, slot uint64) ([]byte, error)
- func (s *Service) BeaconCommittees(ctx context.Context, stateID string) ([]*api.BeaconCommittee, error)
- func (s *Service) BeaconProposerDomain(ctx context.Context) ([]byte, error)
- func (s *Service) CurrentEpoch(ctx context.Context) (uint64, error)
- func (s *Service) CurrentSlot(ctx context.Context) (uint64, error)
- func (s *Service) DepositDomain(ctx context.Context) ([]byte, error)
- func (s *Service) EpochFromStateID(ctx context.Context, stateID string) (uint64, error)
- func (s *Service) FarFutureEpoch(ctx context.Context) (uint64, error)
- func (s *Service) Fork(ctx context.Context, stateID string) (*spec.Fork, error)
- func (s *Service) Genesis(ctx context.Context) (*api.Genesis, error)
- func (s *Service) GenesisTime(ctx context.Context) (time.Time, error)
- func (s *Service) GenesisValidatorsRoot(ctx context.Context) ([]byte, error)
- func (s *Service) Name() string
- func (s *Service) NodeVersion(ctx context.Context) (string, error)
- func (s *Service) NonSpecAggregateAttestation(ctx context.Context, attestation *spec.Attestation, validatorPubKey []byte, ...) (*spec.Attestation, error)
- func (s *Service) ProposerDuties(ctx context.Context, epoch uint64, validators []client.ValidatorIDProvider) ([]*api.ProposerDuty, error)
- func (s *Service) RANDAODomain(ctx context.Context) ([]byte, error)
- func (s *Service) SelectionProofDomain(ctx context.Context) ([]byte, error)
- func (s *Service) SignatureDomain(ctx context.Context, domain []byte, epoch uint64) ([]byte, error)
- func (s *Service) SignedBeaconBlockBySlot(ctx context.Context, slot uint64) (*spec.SignedBeaconBlock, error)
- func (s *Service) SlotDuration(ctx context.Context) (time.Duration, error)
- func (s *Service) SlotFromStateID(ctx context.Context, stateID string) (uint64, error)
- func (s *Service) SlotsPerEpoch(ctx context.Context) (uint64, error)
- func (s *Service) StateRootFromStateID(ctx context.Context, stateID string) ([]byte, error)
- func (s *Service) SubmitAggregateAttestations(ctx context.Context, aggregateAndProofs []*spec.SignedAggregateAndProof) error
- func (s *Service) SubmitAttestation(ctx context.Context, specAttestation *spec.Attestation) error
- func (s *Service) SubmitBeaconBlock(ctx context.Context, specBlock *spec.SignedBeaconBlock) error
- func (s *Service) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*client.BeaconCommitteeSubscription) error
- func (s *Service) SyncState(ctx context.Context) (*api.SyncState, error)
- func (s *Service) TargetAggregatorsPerCommittee(ctx context.Context) (uint64, error)
- func (s *Service) ValidatorBalances(ctx context.Context, stateID string, validatorIDs []client.ValidatorIDProvider) (map[uint64]uint64, error)
- func (s *Service) Validators(ctx context.Context, stateID string, validatorIDs []client.ValidatorIDProvider) (map[uint64]*api.Validator, error)
- func (s *Service) VoluntaryExitDomain(ctx context.Context) ([]byte, 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 WithAddress ¶
WithAddress provides the address for the endpoint.
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 {
// contains filtered or unexported fields
}
Service is an Ethereum 2 client service.
func (*Service) AddOnBeaconChainHeadUpdatedHandler ¶
func (s *Service) AddOnBeaconChainHeadUpdatedHandler(ctx context.Context, handler client.BeaconChainHeadUpdatedHandler) error
AddOnBeaconChainHeadUpdatedHandler adds a handler provided with beacon chain head updates.
func (*Service) AggregateAndProofDomain ¶
AggregateAndProofDomain provides the aggregate and proof domain of the chain.
func (*Service) AttestationData ¶
func (s *Service) AttestationData(ctx context.Context, slot uint64, committeeIndex uint64) (*spec.AttestationData, error)
AttestationData obtains attestation data for a slot.
func (*Service) AttesterDuties ¶
func (s *Service) AttesterDuties(ctx context.Context, epoch uint64, validators []client.ValidatorIDProvider) ([]*api.AttesterDuty, error)
AttesterDuties obtains attester duties.
func (*Service) BeaconAttesterDomain ¶
BeaconAttesterDomain provides the beacon attester domain of the chain.
func (*Service) BeaconBlockProposal ¶
func (s *Service) BeaconBlockProposal(ctx context.Context, slot uint64, randaoReveal []byte, graffiti []byte) (*spec.BeaconBlock, error)
BeaconBlockProposal fetches a proposed beacon block for signing.
func (*Service) BeaconBlockRootBySlot ¶
BeaconBlockRootBySlot fetches a block's root given its slot.
func (*Service) BeaconCommittees ¶
func (s *Service) BeaconCommittees(ctx context.Context, stateID string) ([]*api.BeaconCommittee, error)
BeaconCommittees fetches the chain's beacon committees given a state.
func (*Service) BeaconProposerDomain ¶
BeaconProposerDomain provides the beacon proposer domain of the chain.
func (*Service) CurrentEpoch ¶
CurrentEpoch is a helper that calculates the current epoch.
func (*Service) CurrentSlot ¶
CurrentSlot is a helper that calculates the current slot.
func (*Service) DepositDomain ¶
DepositDomain provides the deposit domain of the chain.
func (*Service) EpochFromStateID ¶ added in v0.6.3
EpochFromStateID parses the state ID and returns the relevant epoch.
func (*Service) FarFutureEpoch ¶
FarFutureEpoch provides the value of the far future epoch of the chain.
func (*Service) GenesisTime ¶
GenesisTime provides the genesis time of the chain.
func (*Service) GenesisValidatorsRoot ¶
GenesisValidatorsRoot provides the genesis validators root of the chain.
func (*Service) NodeVersion ¶
NodeVersion returns a free-text string with the node version.
func (*Service) NonSpecAggregateAttestation ¶
func (s *Service) NonSpecAggregateAttestation(ctx context.Context, attestation *spec.Attestation, validatorPubKey []byte, slotSignature []byte) (*spec.Attestation, error)
NonSpecAggregateAttestation fetches the aggregate attestation given an attestation.
func (*Service) ProposerDuties ¶
func (s *Service) ProposerDuties(ctx context.Context, epoch uint64, validators []client.ValidatorIDProvider) ([]*api.ProposerDuty, error)
ProposerDuties obtains proposer duties.
func (*Service) RANDAODomain ¶
RANDAODomain provides the RANDAO domain of the chain.
func (*Service) SelectionProofDomain ¶
SelectionProofDomain provides the selection proof domain of the chain.
func (*Service) SignatureDomain ¶
SignatureDomain provides a signature domain for a given domain at a given epoch.
func (*Service) SignedBeaconBlockBySlot ¶
func (s *Service) SignedBeaconBlockBySlot(ctx context.Context, slot uint64) (*spec.SignedBeaconBlock, error)
SignedBeaconBlockBySlot fetches a signed beacon block given its slot.
func (*Service) SlotDuration ¶
SlotDuration provides the duration of a slot of the chain.
func (*Service) SlotFromStateID ¶ added in v0.6.3
SlotFromStateID parses the state ID and returns the relevant slot.
func (*Service) SlotsPerEpoch ¶
SlotsPerEpoch provides the slots per epoch of the chain.
func (*Service) StateRootFromStateID ¶ added in v0.6.3
StateRootFromStateID parses the state ID and returns the relevant state root.
func (*Service) SubmitAggregateAttestations ¶
func (s *Service) SubmitAggregateAttestations(ctx context.Context, aggregateAndProofs []*spec.SignedAggregateAndProof) error
SubmitAggregateAttestations submits aggregate attestations.
func (*Service) SubmitAttestation ¶
SubmitAttestation submits an attestation.
func (*Service) SubmitBeaconBlock ¶
SubmitBeaconBlock submits a beacon block.
func (*Service) SubmitBeaconCommitteeSubscriptions ¶
func (s *Service) SubmitBeaconCommitteeSubscriptions(ctx context.Context, subscriptions []*client.BeaconCommitteeSubscription) error
SubmitBeaconCommitteeSubscriptions subscribes to beacon committees.
func (*Service) SyncState ¶
SyncState provides the state of the node's synchronization with the chain.
func (*Service) TargetAggregatorsPerCommittee ¶
TargetAggregatorsPerCommittee provides the target number of aggregators for each attestation committee.
func (*Service) ValidatorBalances ¶
func (s *Service) ValidatorBalances(ctx context.Context, stateID string, validatorIDs []client.ValidatorIDProvider) (map[uint64]uint64, error)
ValidatorBalances provides the validator balances for a given state. stateID can be a slot number or state root, or one of the special values "genesis", "head", "justified" or "finalized". validators is a list of validators to restrict the returned values. If no validators are supplied no filter will be applied.
func (*Service) Validators ¶
func (s *Service) Validators(ctx context.Context, stateID string, validatorIDs []client.ValidatorIDProvider) (map[uint64]*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". validators is a list of validators to restrict the returned values. If no validators are supplied no filter will be applied.
Source Files ¶
- aggregateandproofdomain.go
- aggregateattestation.go
- attestationdata.go
- attesterduties.go
- beaconattesterdomain.go
- beaconblockproposal.go
- beaconblockrootbyslot.go
- beaconchainheadupdated.go
- beaconcommittees.go
- beaconproposerdomain.go
- depositdomain.go
- farfutureepoch.go
- fork.go
- genesis.go
- genesistime.go
- genesisvalidatorsroot.go
- helpers.go
- http.go
- json.go
- nodeversion.go
- parameters.go
- proposerduties.go
- randaodomain.go
- selectionproofdomain.go
- service.go
- signaturedomain.go
- signedbeaconblockbyslot.go
- slotduration.go
- slotsperepoch.go
- stateid.go
- submitaggregateattestations.go
- submitattestation.go
- submitbeaconblock.go
- submitbeaconcommitteesubscriptions.go
- syncstate.go
- targetaggregatorspercommittee.go
- validatorbalances.go
- validators.go
- voluntaryexitdomain.go