Documentation ¶
Index ¶
- Constants
- func AggregateSignatures(signatures [][]byte) ([]byte, error)
- func ECDSAToBLS(privateKeyECDSA *ecdsa.PrivateKey) ([]byte, error)
- func EncodeEpochSnarkData(newValSet []SerializedPublicKey, maximumNonSigners uint32, epochIndex uint16) ([]byte, []byte, error)
- func EncodeEpochSnarkDataCIP22(newValSet []SerializedPublicKey, maximumNonSigners, maxValidators uint32, ...) ([]byte, []byte, error)
- func EpochEntropyFromHash(hash common.Hash) bls.EpochEntropy
- func UncompressKey(serialized SerializedPublicKey) ([]byte, error)
- func VerifyAggregatedSignature(publicKeys []SerializedPublicKey, message []byte, extraData []byte, ...) error
- func VerifySignature(publicKey SerializedPublicKey, message []byte, extraData []byte, ...) error
- type SerializedPublicKey
- type SerializedSignature
Constants ¶
View Source
const ( PUBLICKEYBYTES = bls.PUBLICKEYBYTES SIGNATUREBYTES = bls.SIGNATUREBYTES EPOCHENTROPYBYTES = bls.EPOCHENTROPYBYTES )
Variables ¶
This section is empty.
Functions ¶
func AggregateSignatures ¶
func ECDSAToBLS ¶
func ECDSAToBLS(privateKeyECDSA *ecdsa.PrivateKey) ([]byte, error)
func EncodeEpochSnarkData ¶
func EncodeEpochSnarkDataCIP22 ¶
func EncodeEpochSnarkDataCIP22(newValSet []SerializedPublicKey, maximumNonSigners, maxValidators uint32, epochIndex uint16, round uint8, blockHash, parentHash bls.EpochEntropy) ([]byte, []byte, error)
func EpochEntropyFromHash ¶
func EpochEntropyFromHash(hash common.Hash) bls.EpochEntropy
EpochEntropyFromHash truncates the given hash to the length of epoch SNARK entropy.
func UncompressKey ¶
func UncompressKey(serialized SerializedPublicKey) ([]byte, error)
func VerifySignature ¶
Types ¶
type SerializedPublicKey ¶
type SerializedPublicKey [PUBLICKEYBYTES]byte
func PrivateToPublic ¶
func PrivateToPublic(privateKeyBytes []byte) (SerializedPublicKey, error)
func (SerializedPublicKey) MarshalText ¶
func (pk SerializedPublicKey) MarshalText() ([]byte, error)
MarshalText returns the hex representation of pk.
func (*SerializedPublicKey) UnmarshalJSON ¶
func (pk *SerializedPublicKey) UnmarshalJSON(input []byte) error
UnmarshalJSON parses a BLS public key in hex syntax.
func (*SerializedPublicKey) UnmarshalText ¶
func (pk *SerializedPublicKey) UnmarshalText(input []byte) error
UnmarshalText parses a BLS public key in hex syntax.
type SerializedSignature ¶
type SerializedSignature [SIGNATUREBYTES]byte
func SerializedSignatureFromBytes ¶
func SerializedSignatureFromBytes(serializedSignature []byte) (SerializedSignature, error)
func (SerializedSignature) MarshalText ¶
func (sig SerializedSignature) MarshalText() ([]byte, error)
MarshalText returns the hex representation of sig.
func (*SerializedSignature) UnmarshalJSON ¶
func (sig *SerializedSignature) UnmarshalJSON(input []byte) error
UnmarshalJSON parses a BLS signature in hex syntax.
func (*SerializedSignature) UnmarshalText ¶
func (sig *SerializedSignature) UnmarshalText(input []byte) error
UnmarshalText parses a BLS signature in hex syntax.
Click to show internal directories.
Click to hide internal directories.