Documentation
¶
Index ¶
- Variables
- func FromFile(keyPath string) (bls.Signer, error)
- func FromFileOrPersistNew(keyPath string) (bls.Signer, error)
- type LocalSigner
- func (s *LocalSigner) PublicKey() *bls.PublicKey
- func (*LocalSigner) Shutdown() error
- func (s *LocalSigner) Sign(msg []byte) (*bls.Signature, error)
- func (s *LocalSigner) SignProofOfPossession(msg []byte) (*bls.Signature, error)
- func (s *LocalSigner) ToBytes() []byte
- func (s *LocalSigner) ToFile(keyPath string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFailedSecretKeyDeserialize = errors.New("couldn't deserialize secret key")
)
Functions ¶
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
Click to show internal directories.
Click to hide internal directories.