standard

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: Apache-2.0 Imports: 12 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 WithAggregateAndProofDomainTypeProvider

func WithAggregateAndProofDomainTypeProvider(provider eth2client.AggregateAndProofDomainProvider) Parameter

WithAggregateAndProofDomainTypeProvider sets the aggregate and proof domain provider.

func WithBeaconAttesterDomainTypeProvider

func WithBeaconAttesterDomainTypeProvider(provider eth2client.BeaconAttesterDomainProvider) Parameter

WithBeaconAttesterDomainTypeProvider sets the beacon attester domain provider.

func WithBeaconProposerDomainTypeProvider

func WithBeaconProposerDomainTypeProvider(provider eth2client.BeaconProposerDomainProvider) Parameter

WithBeaconProposerDomainTypeProvider sets the beacon proposer domain provider.

func WithClientMonitor

func WithClientMonitor(clientMonitor metrics.ClientMonitor) Parameter

WithClientMonitor sets the client monitor for the module.

func WithDomainProvider

func WithDomainProvider(provider eth2client.DomainProvider) Parameter

WithDomainProvider sets the signature domain provider.

func WithLogLevel

func WithLogLevel(logLevel zerolog.Level) Parameter

WithLogLevel sets the log level for the module.

func WithMonitor

func WithMonitor(monitor metrics.SignerMonitor) Parameter

WithMonitor sets the monitor for the module.

func WithRANDAODomainTypeProvider

func WithRANDAODomainTypeProvider(provider eth2client.RANDAODomainProvider) Parameter

WithRANDAODomainTypeProvider sets the RANDAO domain provider.

func WithSelectionProofDomainTypeProvider

func WithSelectionProofDomainTypeProvider(provider eth2client.SelectionProofDomainProvider) Parameter

WithSelectionProofDomainTypeProvider sets the RANDAO domain provider.

func WithSlotsPerEpochProvider

func WithSlotsPerEpochProvider(provider eth2client.SlotsPerEpochProvider) Parameter

WithSlotsPerEpochProvider sets the slots per epoch provider.

type Service

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

Service is the manager for signers.

func New

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

New creates a new dirk account manager.

func (*Service) SignAggregateAndProof

func (s *Service) SignAggregateAndProof(ctx context.Context,
	account e2wtypes.Account,
	slot spec.Slot,
	aggregateAndProofRoot spec.Root,
) (
	spec.BLSSignature,
	error,
)

SignAggregateAndProof signs an aggregate and proof item.

func (*Service) SignBeaconAttestation

func (s *Service) SignBeaconAttestation(ctx context.Context,
	account e2wtypes.Account,
	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 (*Service) SignBeaconAttestations

func (s *Service) SignBeaconAttestations(ctx context.Context,
	accounts []e2wtypes.Account,
	slot spec.Slot,
	committeeIndices []spec.CommitteeIndex,
	blockRoot spec.Root,
	sourceEpoch spec.Epoch,
	sourceRoot spec.Root,
	targetEpoch spec.Epoch,
	targetRoot spec.Root,
) (
	[]spec.BLSSignature,
	error,
)

SignBeaconAttestations signs multiple beacon attestations.

func (*Service) SignBeaconBlockProposal

func (s *Service) SignBeaconBlockProposal(ctx context.Context,
	account e2wtypes.Account,
	slot spec.Slot,
	proposerIndex spec.ValidatorIndex,
	parentRoot spec.Root,
	stateRoot spec.Root,
	bodyRoot spec.Root,
) (
	spec.BLSSignature,
	error,
)

SignBeaconBlockProposal signs a beacon block proposal.

func (*Service) SignRANDAOReveal

func (s *Service) SignRANDAOReveal(ctx context.Context,
	account e2wtypes.Account,
	slot spec.Slot,
) (
	spec.BLSSignature,
	error,
)

SignRANDAOReveal returns a RANDAO reveal signature. This signs an epoch with the "RANDAO reveal" domain.

func (*Service) SignSlotSelection

func (s *Service) SignSlotSelection(ctx context.Context,
	account e2wtypes.Account,
	slot spec.Slot,
) (
	spec.BLSSignature,
	error,
)

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

Jump to

Keyboard shortcuts

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