signer

package
v1.6.0-beta2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package signer is a package that provides application-level signing operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateAndProofSigner

type AggregateAndProofSigner interface {
	// SignAggregateAndProof signs an aggregate attestation for given slot and root.
	SignAggregateAndProof(ctx context.Context,
		account e2wtypes.Account,
		slot phase0.Slot,
		root phase0.Root,
	) (
		phase0.BLSSignature,
		error,
	)
}

AggregateAndProofSigner provides methods to sign aggregate and proofs.

type BeaconAttestationSigner

type BeaconAttestationSigner interface {
	// SignBeaconAttestation signs a beacon attestation.
	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,
	)
}

BeaconAttestationSigner provides methods to sign beacon attestations.

type BeaconAttestationsSigner

type BeaconAttestationsSigner interface {
	// SignBeaconAttestation signs multiple beacon attestations.
	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,
	)
}

BeaconAttestationsSigner provides methods to sign multiple beacon attestations.

type BeaconBlockSigner

type BeaconBlockSigner interface {
	// SignBeaconBlockProposal signs a beacon block proposal.
	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,
	)
}

BeaconBlockSigner provides methods to sign beacon blocks.

type ContributionAndProofSigner added in v1.2.0

type ContributionAndProofSigner interface {
	// SignContributionAndProof signs a sync committee contribution for given slot and root.
	SignContributionAndProof(ctx context.Context,
		account e2wtypes.Account,
		contributionAndProof *altair.ContributionAndProof,
	) (
		phase0.BLSSignature,
		error,
	)
}

ContributionAndProofSigner provides methods to sign contribution and proofs.

type RANDAORevealSigner

type RANDAORevealSigner interface {
	// SignRANDAOReveal returns a RANDAO signature.
	// This signs an epoch with the "RANDAO" domain.
	SignRANDAOReveal(ctx context.Context,
		account e2wtypes.Account,
		slot phase0.Slot,
	) (
		phase0.BLSSignature,
		error,
	)
}

RANDAORevealSigner provides methods to sign RANDAO reveals.

type Service

type Service interface{}

Service is the generic signer service.

type SlotSelectionSigner

type SlotSelectionSigner interface {
	// SignSlotSelection returns a slot selection signature.
	// This signs a slot with the "selection proof" domain.
	SignSlotSelection(ctx context.Context,
		account e2wtypes.Account,
		slot phase0.Slot,
	) (
		phase0.BLSSignature,
		error,
	)
}

SlotSelectionSigner provides methods to sign slot selections.

type SyncCommitteeRootSigner added in v1.2.0

type SyncCommitteeRootSigner interface {
	// SignSyncCommittee returns a root signature.
	// This signs a beacon block root with the "sync committee" domain.
	SignSyncCommitteeRoot(ctx context.Context,
		account e2wtypes.Account,
		epoch phase0.Epoch,
		root phase0.Root,
	) (
		phase0.BLSSignature,
		error,
	)
}

SyncCommitteeRootSigner provides methods to sign a sync committee root.

type SyncCommitteeSelectionSigner added in v1.2.0

type SyncCommitteeSelectionSigner interface {
	// SignSyncCommitteeSelection returns a sync committee selection signature.
	// This signs a slot and subcommittee with the "sync committee selection proof" domain.
	SignSyncCommitteeSelection(ctx context.Context,
		account e2wtypes.Account,
		slot phase0.Slot,
		subcommitteeIndex uint64,
	) (
		phase0.BLSSignature,
		error,
	)
}

SyncCommitteeSelectionSigner provides methods to sign sync committee selections.

type ValidatorRegistrationSigner added in v1.6.0

type ValidatorRegistrationSigner interface {
	// SignValidatorRegistration signs a validator registration.
	SignValidatorRegistration(ctx context.Context,
		account e2wtypes.Account,
		registration *api.VersionedValidatorRegistration,
	) (
		phase0.BLSSignature,
		error,
	)
}

ValidatorRegistrationSigner provides methods to sign validator registrations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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