Versions in this module Expand all Collapse all v0 v0.1.1 May 12, 2022 Changes in this version + func ToKeystore(k *Key, password string) ([]byte, error) + type Key struct + Id string + Prv *SecretKey + Pub *PublicKey + func FromKeystore(content []byte, password string) (*Key, error) + func NewKeyFromPriv(priv []byte) (*Key, error) + func NewRandomKey() *Key + func (k *Key) Equal(kk *Key) bool + func (k *Key) Marshal() ([]byte, error) + func (k *Key) PubKey() (out [48]byte) + func (k *Key) Sign(root [32]byte) ([]byte, error) + func (k *Key) Unmarshal(data []byte) error + type PublicKey struct + func (p *PublicKey) Deserialize(buf []byte) error + func (p *PublicKey) HashTreeRootWith(hh *ssz.Hasher) error + func (p *PublicKey) MarshalSSZTo(dst []byte) ([]byte, error) + func (p *PublicKey) Serialize() []byte + func (p *PublicKey) SizeSSZ() int + func (p *PublicKey) UnmarshalSSZ(buf []byte) error + type SecretKey struct + func RandomKey() *SecretKey + func (s *SecretKey) GetPublicKey() *PublicKey + func (s *SecretKey) Marshal() ([]byte, error) + func (s *SecretKey) Sign(msg []byte) *Signature + func (s *SecretKey) Unmarshal(data []byte) error + type Signature struct + func (s *Signature) Deserialize(buf []byte) error + func (s *Signature) HashTreeRootWith(hh *ssz.Hasher) error + func (s *Signature) MarshalSSZTo(dst []byte) ([]byte, error) + func (s *Signature) Serialize() []byte + func (s *Signature) SizeSSZ() int + func (s *Signature) UnmarshalSSZ(buf []byte) error + func (s *Signature) VerifyByte(pub *PublicKey, msg []byte) bool