localsigner

package
v1.14.1-db-metrics-fix Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2025 License: BSD-3-Clause Imports: 10 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func FromFile

func FromFile(keyPath string) (bls.Signer, error)

func FromFileOrPersistNew

func FromFileOrPersistNew(keyPath string) (bls.Signer, error)

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) Shutdown

func (*LocalSigner) Shutdown() error

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.

func (*LocalSigner) ToFile

func (s *LocalSigner) ToFile(keyPath string) error

Jump to

Keyboard shortcuts

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