wallet

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

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

func WithAccountPaths(accountPaths []string) Parameter

WithAccountPaths sets the accounts paths for which to validate.

func WithCurrentEpochProvider added in v1.0.3

func WithCurrentEpochProvider(provider chaintime.Service) Parameter

WithCurrentEpochProvider sets the current epoch provider.

func WithDomainProvider added in v0.9.0

func WithDomainProvider(provider eth2client.DomainProvider) Parameter

WithDomainProvider sets the domain provider.

func WithFarFutureEpochProvider added in v1.0.0

func WithFarFutureEpochProvider(provider eth2client.FarFutureEpochProvider) Parameter

WithFarFutureEpochProvider sets the far future epoch provider.

func WithLocations

func WithLocations(locations []string) Parameter

WithLocations sets the locations to look for wallets.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

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

func WithPassphrases(passphrases [][]byte) Parameter

WithPassphrases sets the passphrases to unlock accounts.

func WithProcessConcurrency added in v1.2.0

func WithProcessConcurrency(concurrency int64) Parameter

WithProcessConcurrency sets the concurrency for the service.

func WithSlotsPerEpochProvider

func WithSlotsPerEpochProvider(provider eth2client.SlotsPerEpochProvider) Parameter

WithSlotsPerEpochProvider sets the slots per epoch provider.

func WithValidatorsManager added in v1.0.0

func WithValidatorsManager(manager validatorsmanager.Service) Parameter

WithValidatorsManager sets the validator manager.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service is the manager for wallet accounts.

func New

func New(ctx context.Context, params ...Parameter) (*Service, error)

New creates a new wallet account manager.

func (*Service) Refresh added in v1.0.0

func (s *Service) Refresh(ctx context.Context)

Refresh refreshes the accounts from local store, and account validator state from the validators provider. This is a relatively expensive operation, so should not be run in the validating path.

func (*Service) ValidatingAccountsForEpoch added in v1.0.0

func (s *Service) ValidatingAccountsForEpoch(ctx context.Context, epoch phase0.Epoch) (map[phase0.ValidatorIndex]e2wtypes.Account, error)

ValidatingAccountsForEpoch obtains the validating accounts for a given epoch.

func (*Service) ValidatingAccountsForEpochByIndex added in v1.0.0

func (s *Service) ValidatingAccountsForEpochByIndex(ctx context.Context, epoch phase0.Epoch, indices []phase0.ValidatorIndex) (map[phase0.ValidatorIndex]e2wtypes.Account, error)

ValidatingAccountsForEpochByIndex obtains the specified validating accounts for a given epoch.

Jump to

Keyboard shortcuts

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