signer

package
v0.1.1-experimental.5 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BLSSigner

type BLSSigner struct {
	bls.SecretKey
}

BLSSigner holds the secret key used for signing operations.

func NewBLSSigner

func NewBLSSigner(
	keyBz [constants.BLSSecretKeyLength]byte,
) (*BLSSigner, error)

NewBLSSigner creates a new Signer instance given a secret key.

func NewFromCometBFTNodeKey

func NewFromCometBFTNodeKey(filePath string) (*BLSSigner, error)

NewSignerFromFile creates a new Signer instance given a file path to a CometBFT node key.

TODO: In order to make RANDAO signing compatible with the BLS12-381 we need to extend the PrivVal interface to allow signing arbitrary things. @tac0turtle.

func (*BLSSigner) PublicKey

func (b *BLSSigner) PublicKey() primitives.BLSPubkey

PublicKey returns the public key of the signer.

func (*BLSSigner) Sign

func (b *BLSSigner) Sign(msg []byte) (primitives.BLSSignature, error)

Sign generates a signature for a given message using the signer's secret key. It returns the signature and any error encountered during the signing process.

Jump to

Keyboard shortcuts

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