Versions in this module Expand all Collapse all v1 v1.0.6 Jun 12, 2023 Changes in this version + func GenerateKey(opt AlgorithmOption) (crypto.PrivateKey, error) + func Unmarshal(data []byte) (crypto.PrivateKey, error) + func UnmarshalPrivateKey(data []byte, opt AlgorithmOption) (crypto.PrivateKey, error) + func UnmarshalPublicKey(data []byte, opt AlgorithmOption) (crypto.PublicKey, error) + type AlgorithmOption string + const Secp256k1 + const Secp256r1 + type PrivateKey struct + K *ecdsa.PrivateKey + func (priv *PrivateKey) Bytes() ([]byte, error) + func (priv *PrivateKey) PublicKey() crypto.PublicKey + func (priv *PrivateKey) Sign(digest []byte) ([]byte, error) + type PublicKey struct + func (pub *PublicKey) Address() (common.Address, error) + func (pub *PublicKey) Bytes() ([]byte, error) + func (pub *PublicKey) Verify(digest []byte, sig []byte) (bool, error) + type Sig struct + R *big.Int + S *big.Int