Documentation ¶
Index ¶
- type Parameter
- func WithAccountPaths(accountPaths []string) Parameter
- func WithAggregateAndProofDomainProvider(provider eth2client.AggregateAndProofDomainProvider) Parameter
- func WithBeaconAttesterDomainProvider(provider eth2client.BeaconAttesterDomainProvider) Parameter
- func WithBeaconProposerDomainProvider(provider eth2client.BeaconProposerDomainProvider) Parameter
- func WithDomainProvider(provider eth2client.DomainProvider) Parameter
- func WithLocations(locations []string) Parameter
- func WithLogLevel(logLevel zerolog.Level) Parameter
- func WithMonitor(monitor metrics.AccountManagerMonitor) Parameter
- func WithPassphrases(passphrases [][]byte) Parameter
- func WithRANDAODomainProvider(provider eth2client.RANDAODomainProvider) Parameter
- func WithSelectionProofDomainProvider(provider eth2client.SelectionProofDomainProvider) Parameter
- func WithSlotsPerEpochProvider(provider eth2client.SlotsPerEpochProvider) Parameter
- func WithValidatorsProvider(provider eth2client.ValidatorsProvider) Parameter
- type Service
- func (s *Service) Accounts(ctx context.Context) ([]accountmanager.ValidatingAccount, error)
- func (s *Service) AccountsByIndex(ctx context.Context, validatorIndices []spec.ValidatorIndex) ([]accountmanager.ValidatingAccount, error)
- func (s *Service) AccountsByPubKey(ctx context.Context, pubKeys []spec.BLSPubKey) ([]accountmanager.ValidatingAccount, error)
- func (s *Service) RefreshAccounts(ctx context.Context) error
- func (s *Service) UpdateAccountsState(ctx context.Context) error
- type ValidatingAccount
- func (d *ValidatingAccount) Index(ctx context.Context) (spec.ValidatorIndex, error)
- func (d *ValidatingAccount) PubKey(ctx context.Context) (spec.BLSPubKey, error)
- func (d *ValidatingAccount) SignAggregateAndProof(ctx context.Context, slot spec.Slot, aggregateAndProofRoot spec.Root) (spec.BLSSignature, error)
- func (d *ValidatingAccount) SignBeaconAttestation(ctx context.Context, slot spec.Slot, committeeIndex spec.CommitteeIndex, ...) (spec.BLSSignature, error)
- func (d *ValidatingAccount) SignBeaconBlockProposal(ctx context.Context, slot spec.Slot, proposerIndex spec.ValidatorIndex, ...) (spec.BLSSignature, error)
- func (d *ValidatingAccount) SignRANDAOReveal(ctx context.Context, slot spec.Slot) (spec.BLSSignature, error)
- func (d *ValidatingAccount) SignSlotSelection(ctx context.Context, slot spec.Slot) (spec.BLSSignature, error)
- func (d *ValidatingAccount) State() api.ValidatorState
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 WithAccountPaths ¶
WithAccountPaths sets the accounts paths for which to validate.
func WithAggregateAndProofDomainProvider ¶
func WithAggregateAndProofDomainProvider(provider eth2client.AggregateAndProofDomainProvider) Parameter
WithAggregateAndProofDomainProvider sets the aggregate and proof domain provider.
func WithBeaconAttesterDomainProvider ¶
func WithBeaconAttesterDomainProvider(provider eth2client.BeaconAttesterDomainProvider) Parameter
WithBeaconAttesterDomainProvider sets the beacon attester domain provider.
func WithBeaconProposerDomainProvider ¶
func WithBeaconProposerDomainProvider(provider eth2client.BeaconProposerDomainProvider) Parameter
WithBeaconProposerDomainProvider sets the beacon proposer domain provider.
func WithDomainProvider ¶ added in v0.9.0
func WithDomainProvider(provider eth2client.DomainProvider) Parameter
WithDomainProvider sets the domain provider.
func WithLocations ¶
WithLocations sets the locations to look for wallets.
func WithLogLevel ¶
WithLogLevel sets the log level for the module.
func WithMonitor ¶
func WithMonitor(monitor metrics.AccountManagerMonitor) Parameter
WithMonitor sets the monitor for the module.
func WithPassphrases ¶
WithPassphrases sets the passphrases to unlock accounts.
func WithRANDAODomainProvider ¶
func WithRANDAODomainProvider(provider eth2client.RANDAODomainProvider) Parameter
WithRANDAODomainProvider sets the RANDAO domain provider.
func WithSelectionProofDomainProvider ¶
func WithSelectionProofDomainProvider(provider eth2client.SelectionProofDomainProvider) Parameter
WithSelectionProofDomainProvider sets the RANDAO domain provider.
func WithSlotsPerEpochProvider ¶
func WithSlotsPerEpochProvider(provider eth2client.SlotsPerEpochProvider) Parameter
WithSlotsPerEpochProvider sets the slots per epoch provider.
func WithValidatorsProvider ¶
func WithValidatorsProvider(provider eth2client.ValidatorsProvider) Parameter
WithValidatorsProvider sets the validator status provider.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the manager for wallet accounts.
func (*Service) Accounts ¶
func (s *Service) Accounts(ctx context.Context) ([]accountmanager.ValidatingAccount, error)
Accounts returns all attesting accounts.
func (*Service) AccountsByIndex ¶
func (s *Service) AccountsByIndex(ctx context.Context, validatorIndices []spec.ValidatorIndex) ([]accountmanager.ValidatingAccount, error)
AccountsByIndex returns attesting accounts.
func (*Service) AccountsByPubKey ¶
func (s *Service) AccountsByPubKey(ctx context.Context, pubKeys []spec.BLSPubKey) ([]accountmanager.ValidatingAccount, error)
AccountsByPubKey returns validating accounts.
func (*Service) RefreshAccounts ¶
RefreshAccounts refreshes the entire list of validating keys.
func (*Service) UpdateAccountsState ¶
UpdateAccountsState updates account state with the latest information from the beacon chain. This should be run at the beginning of each epoch to ensure that any newly-activated accounts are registered.
type ValidatingAccount ¶
type ValidatingAccount struct {
// contains filtered or unexported fields
}
ValidatingAccount is a wrapper around the wallet account that implements ValidatingAccount.
func (*ValidatingAccount) Index ¶
func (d *ValidatingAccount) Index(ctx context.Context) (spec.ValidatorIndex, error)
Index returns the index of the validating account.
func (*ValidatingAccount) SignAggregateAndProof ¶
func (d *ValidatingAccount) SignAggregateAndProof(ctx context.Context, slot spec.Slot, aggregateAndProofRoot spec.Root) (spec.BLSSignature, error)
SignAggregateAndProof signs an aggregate and proof item.
func (*ValidatingAccount) SignBeaconAttestation ¶
func (d *ValidatingAccount) SignBeaconAttestation(ctx context.Context, slot spec.Slot, committeeIndex spec.CommitteeIndex, blockRoot spec.Root, sourceEpoch spec.Epoch, sourceRoot spec.Root, targetEpoch spec.Epoch, targetRoot spec.Root) (spec.BLSSignature, error)
SignBeaconAttestation signs a beacon attestation item.
func (*ValidatingAccount) SignBeaconBlockProposal ¶
func (d *ValidatingAccount) SignBeaconBlockProposal(ctx context.Context, slot spec.Slot, proposerIndex spec.ValidatorIndex, parentRoot spec.Root, stateRoot spec.Root, bodyRoot spec.Root) (spec.BLSSignature, error)
SignBeaconBlockProposal signs a beacon block proposal item.
func (*ValidatingAccount) SignRANDAOReveal ¶
func (d *ValidatingAccount) SignRANDAOReveal(ctx context.Context, slot spec.Slot) (spec.BLSSignature, error)
SignRANDAOReveal returns a RANDAO reveal signature. This signs an epoch with the "RANDAO reveal" domain.
func (*ValidatingAccount) SignSlotSelection ¶
func (d *ValidatingAccount) SignSlotSelection(ctx context.Context, slot spec.Slot) (spec.BLSSignature, error)
SignSlotSelection returns a slot selection signature. This signs a slot with the "selection proof" domain.
func (*ValidatingAccount) State ¶
func (d *ValidatingAccount) State() api.ValidatorState
State returns the state of the validating account.