mock

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct{}

Service is a mock.

func New

func New() *Service

New provides a mock signer.

func (*Service) SignAggregateAndProof

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

SignAggregateAndProof signs an aggregate attestation for given slot and root.

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.

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) 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 signature. This signs an epoch with the "RANDAO" 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.

Jump to

Keyboard shortcuts

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