wallet

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Code generated by fastssz. DO NOT EDIT.

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 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 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 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 WithSignatureDomainProvider

func WithSignatureDomainProvider(provider eth2client.SignatureDomainProvider) Parameter

WithSignatureDomainProvider sets the signature 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 New

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

New creates a new wallet account manager.

func (*Service) Accounts

Accounts returns all attesting accounts.

func (*Service) AccountsByIndex

func (s *Service) AccountsByIndex(ctx context.Context, indices []uint64) ([]accountmanager.ValidatingAccount, error)

AccountsByIndex returns attesting accounts.

func (*Service) AccountsByPubKey

func (s *Service) AccountsByPubKey(ctx context.Context, pubKeys [][]byte) ([]accountmanager.ValidatingAccount, error)

AccountsByPubKey returns validating accounts.

func (*Service) RefreshAccounts

func (s *Service) RefreshAccounts(ctx context.Context) error

RefreshAccounts refreshes the entire list of validating keys.

func (*Service) UpdateAccountsState

func (s *Service) UpdateAccountsState(ctx context.Context) error

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 SigningContainer

type SigningContainer struct {
	Root   []byte `ssz-size:"32"`
	Domain []byte `ssz-size:"32"`
}

SigningContainer is the container for signing roots with a domain.

func (*SigningContainer) HashTreeRoot

func (s *SigningContainer) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the SigningContainer object

func (*SigningContainer) HashTreeRootWith

func (s *SigningContainer) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the SigningContainer object with a hasher

func (*SigningContainer) MarshalSSZ

func (s *SigningContainer) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the SigningContainer object

func (*SigningContainer) MarshalSSZTo

func (s *SigningContainer) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the SigningContainer object to a target array

func (*SigningContainer) SizeSSZ

func (s *SigningContainer) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the SigningContainer object

func (*SigningContainer) UnmarshalSSZ

func (s *SigningContainer) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the SigningContainer object

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) (uint64, error)

Index returns the index of the validating account.

func (*ValidatingAccount) PubKey

func (d *ValidatingAccount) PubKey(ctx context.Context) ([]byte, error)

PubKey returns the public key of the validating account.

func (*ValidatingAccount) SignAggregateAndProof

func (d *ValidatingAccount) SignAggregateAndProof(ctx context.Context, slot uint64, aggregateAndProofRoot []byte) ([]byte, error)

SignAggregateAndProof signs an aggregate and proof item.

func (*ValidatingAccount) SignBeaconAttestation

func (d *ValidatingAccount) SignBeaconAttestation(ctx context.Context,
	slot uint64,
	committeeIndex uint64,
	blockRoot []byte,
	sourceEpoch uint64,
	sourceRoot []byte,
	targetEpoch uint64,
	targetRoot []byte) ([]byte, error)

SignBeaconAttestation signs a beacon attestation item.

func (*ValidatingAccount) SignBeaconBlockProposal

func (d *ValidatingAccount) SignBeaconBlockProposal(ctx context.Context,
	slot uint64,
	proposerIndex uint64,
	parentRoot []byte,
	stateRoot []byte,
	bodyRoot []byte) ([]byte, error)

SignBeaconBlockProposal signs a beacon block proposal item.

func (*ValidatingAccount) SignRANDAOReveal

func (d *ValidatingAccount) SignRANDAOReveal(ctx context.Context, slot uint64) ([]byte, error)

SignRANDAOReveal returns a RANDAO reveal signature. This signs an epoch with the "RANDAO reveal" domain. N.B. This passes in a slot, not an epoch.

func (*ValidatingAccount) SignSlotSelection

func (d *ValidatingAccount) SignSlotSelection(ctx context.Context, slot uint64) ([]byte, error)

SignSlotSelection returns a slot selection signature. This signs a slot with the "selection proof" domain.

func (*ValidatingAccount) State

State returns the state of the validating account.

Jump to

Keyboard shortcuts

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