signing

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: GPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDataRoot

func GetDataRoot(ctx context.Context, eth2Cl eth2wrap.Client, name DomainName, epoch eth2p0.Epoch, root eth2p0.Root) ([32]byte, error)

GetDataRoot wraps the signing root with the domain and returns signing data hash tree root. The result should be identical to what was signed by the VC.

func GetDomain

func GetDomain(ctx context.Context, eth2Cl eth2wrap.Client, name DomainName, epoch eth2p0.Epoch) (eth2p0.Domain, error)

GetDomain returns the beacon domain for the provided type.

func VerifyAttestation added in v0.10.0

func VerifyAttestation(ctx context.Context, eth2Cl eth2wrap.Client, pubkey *bls_sig.PublicKey, att *eth2p0.Attestation) error

func VerifyBlindedBlock added in v0.10.0

func VerifyBlindedBlock(ctx context.Context, eth2Cl eth2wrap.Client, pubkey *bls_sig.PublicKey, block *eth2api.VersionedSignedBlindedBeaconBlock) error

func VerifyBlock added in v0.10.0

func VerifyBlock(ctx context.Context, eth2Cl eth2wrap.Client, pubkey *bls_sig.PublicKey, block *spec.VersionedSignedBeaconBlock) error

func VerifyRandao added in v0.10.0

func VerifyRandao(ctx context.Context, eth2Cl eth2wrap.Client, pubkey *bls_sig.PublicKey, randao eth2util.SignedEpoch) error

func VerifyValidatorRegistration added in v0.10.0

func VerifyValidatorRegistration(ctx context.Context, eth2Cl eth2wrap.Client, pubkey *bls_sig.PublicKey, reg *eth2api.VersionedSignedValidatorRegistration) error

func VerifyVoluntaryExit added in v0.10.0

func VerifyVoluntaryExit(ctx context.Context, eth2Cl eth2wrap.Client, pubkey *bls_sig.PublicKey, exit *eth2p0.SignedVoluntaryExit) error

Types

type DomainName

type DomainName string

DomainName as defined in eth2 spec. See "specs/[phase0|altair]/beacon-chain.md#domain-types" in https://github.com/ethereum/consensus-specs.

const (
	DomainBeaconProposer     DomainName = "DOMAIN_BEACON_PROPOSER"
	DomainBeaconAttester     DomainName = "DOMAIN_BEACON_ATTESTER"
	DomainRandao             DomainName = "DOMAIN_RANDAO"
	DomainExit               DomainName = "DOMAIN_VOLUNTARY_EXIT"
	DomainApplicationBuilder DomainName = "DOMAIN_APPLICATION_BUILDER"
)

Jump to

Keyboard shortcuts

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