modulepackage
2.8.2
Repository: https://github.com/wealdtech/go-eth2-types.git
Documentation: pkg.go.dev
# README
go-eth2-types
Go library providing Ethereum 2 types.
Please note that this library uses standards that are not yet final, and as such may result in changes that alter public and private keys. Do not use this library for production use just yet
Table of Contents
Install
go-eth2-types
is a standard Go module which can be installed with:
go get github.com/wealdtech/go-eth2-types
Usage
Before using any cryptographic features you must call InitBLS()
.
Please read the Go documentation for this library for interface information.
Maintainers
Jim McDonald: @mcdee.
Contribute
Contributions welcome. Please check out the issues.
License
Apache-2.0 © 2019 Weald Technology Trading Ltd
# Functions
AggregateSignatures aggregates signatures.
BLSPrivateKeyFromBytes creates a BLS private key from a byte slice.
BLSPublicKeyFromBytes creates a BLS public key from a byte slice.
BLSSignatureFromBytes creates a BLS signature from a byte slice.
BLSSignatureFromSig creates a BLS signature from an existing signature.
ComputeDomain computes a domain.
Domain returns a complete domain.
GenerateBLSPrivateKey generates a random BLS private key.
InitBLS initialises the BLS library with the appropriate curve and parameters for Ethereum 2.
# Variables
DomainAggregateAndProof is a domain constant.
DomainBeaconAttester is a domain constant.
DomainBeaconProposer is a domain constant.
DomainBlsToExecutionChange is a domain constant.
DomainContributionAndProof is a domain constant.
DomainDeposit is a domain constant.
DomainRANDAO is a domain constant.
DomainSelectionProof is a domain constant.
DomainSyncCommittee is a domain constant.
DomainSyncCommitteeSelectionProof is a domain constant.
DomainVoluntaryExit is a domain constant.
ErrMalformed is returned when an external representation cannot be turned in to a native representation.
ZeroForkVersion is an empty fork version.
ZeroGenesisValidatorsRoot is an empty genesis validators root.
# Structs
BLSPrivateKey is a private key in Ethereum 2.
BLSPublicKey used in the BLS signature scheme.
BLSSignature is a BLS signature.
ForkData is a spec struct.
# Interfaces
PrivateKey is a private key in Ethereum 2.
PublicKey is an interface for public keys.
Signature is an interface for signatures.
# Type aliases
DomainType defines the type of the domain, as per https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/beacon-chain.md#custom-types.