standard

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 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 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 WithSpecProvider added in v1.2.0

func WithSpecProvider(provider eth2client.SpecProvider) Parameter

WithSpecProvider sets the spec 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 phase0.Slot,
	aggregateAndProofRoot phase0.Root,
) (
	phase0.BLSSignature,
	error,
)

SignAggregateAndProof signs an aggregate and proof item.

func (*Service) SignBeaconAttestation

func (s *Service) SignBeaconAttestation(ctx context.Context,
	account e2wtypes.Account,
	slot phase0.Slot,
	committeeIndex phase0.CommitteeIndex,
	blockRoot phase0.Root,
	sourceEpoch phase0.Epoch,
	sourceRoot phase0.Root,
	targetEpoch phase0.Epoch,
	targetRoot phase0.Root,
) (
	phase0.BLSSignature,
	error,
)

SignBeaconAttestation signs a beacon attestation item.

func (*Service) SignBeaconAttestations

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

SignBeaconAttestations signs multiple beacon attestations.

func (*Service) SignBeaconBlockProposal

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

SignBeaconBlockProposal signs a beacon block proposal.

func (*Service) SignBlobSidecar added in v1.8.0

func (s *Service) SignBlobSidecar(ctx context.Context,
	account e2wtypes.Account,
	slot phase0.Slot,
	sidecarRoot phase0.Root,
) (
	phase0.BLSSignature,
	error,
)

SignBlobSidecar signs a blob sidecar.

func (*Service) SignContributionAndProof added in v1.2.0

func (s *Service) SignContributionAndProof(ctx context.Context,
	account e2wtypes.Account,
	contributionAndProof *altair.ContributionAndProof,
) (
	phase0.BLSSignature,
	error,
)

SignContributionAndProof signs a sync committee contribution for given slot and root.

func (*Service) SignRANDAOReveal

func (s *Service) SignRANDAOReveal(ctx context.Context,
	account e2wtypes.Account,
	slot phase0.Slot,
) (
	phase0.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 phase0.Slot,
) (
	phase0.BLSSignature,
	error,
)

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

func (*Service) SignSyncCommitteeRoot added in v1.2.0

func (s *Service) SignSyncCommitteeRoot(ctx context.Context,
	account e2wtypes.Account,
	epoch phase0.Epoch,
	root phase0.Root,
) (
	phase0.BLSSignature,
	error,
)

SignSyncCommitteeRoot returns a root signature. This signs a beacon block root with the "sync committee" domain.

func (*Service) SignSyncCommitteeSelection added in v1.2.0

func (s *Service) SignSyncCommitteeSelection(ctx context.Context,
	account e2wtypes.Account,
	slot phase0.Slot,
	subcommitteeIndex uint64,
) (
	phase0.BLSSignature,
	error,
)

SignSyncCommitteeSelection returns a sync committee selection signature. This signs a slot and subcommittee with the "sync committee selection proof" domain.

func (*Service) SignValidatorRegistration added in v1.6.0

func (s *Service) SignValidatorRegistration(ctx context.Context,
	account e2wtypes.Account,
	registration *api.VersionedValidatorRegistration,
) (
	phase0.BLSSignature,
	error,
)

SignValidatorRegistration signs a validator registration.

Jump to

Keyboard shortcuts

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