localsigner

package
v1.13.0-fuji-rc.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedSecretKeyDeserialize = errors.New("couldn't deserialize secret key")
)

Functions

This section is empty.

Types

type LocalSigner

type LocalSigner struct {
	// contains filtered or unexported fields
}

func FromBytes

func FromBytes(skBytes []byte) (*LocalSigner, error)

FromBytes parses the big-endian format of the secret key into a secret key.

func New

func New() (*LocalSigner, error)

NewSecretKey generates a new secret key from the local source of cryptographically secure randomness.

func (*LocalSigner) PublicKey

func (s *LocalSigner) PublicKey() *bls.PublicKey

PublicKey returns the public key that corresponds to this secret key.

func (*LocalSigner) Sign

func (s *LocalSigner) Sign(msg []byte) (*bls.Signature, error)

Sign [msg] to authorize this message

func (*LocalSigner) SignProofOfPossession

func (s *LocalSigner) SignProofOfPossession(msg []byte) (*bls.Signature, error)

Sign [msg] to prove the ownership

func (*LocalSigner) ToBytes

func (s *LocalSigner) ToBytes() []byte

ToBytes returns the big-endian format of the secret key.

Jump to

Keyboard shortcuts

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