Versions in this module Expand all Collapse all v0 v0.0.2 Dec 21, 2022 v0.0.1 Dec 21, 2022 Changes in this version + var ErrEmptySignature = errors.New("empty signature") + var S256 = btcec.S256() + func BytesToPrivateKey(input []byte) (*ecdsa.PrivateKey, error) + func CreateAddress(addr types.Address, nonce uint64) types.Address + func CreateAddress2(addr types.Address, salt [32]byte, inithash []byte) types.Address + func Ecrecover(hash, sig []byte) ([]byte, error) + func GenerateAndEncodePrivateKey() (*ecdsa.PrivateKey, []byte, error) + func GenerateKey() (*ecdsa.PrivateKey, error) + func GenerateOrReadPrivateKey(path string) (*ecdsa.PrivateKey, error) + func GetAddressFromKey(key goCrypto.PrivateKey) (types.Address, error) + func Keccak256(v ...[]byte) []byte + func MarshalPrivateKey(priv *ecdsa.PrivateKey) ([]byte, error) + func MarshalPublicKey(pub *ecdsa.PublicKey) []byte + func ParsePrivateKey(buf []byte) (*ecdsa.PrivateKey, error) + func ParsePublicKey(buf []byte) (*ecdsa.PublicKey, error) + func PubKeyToAddress(pub *ecdsa.PublicKey) types.Address + func ReadConsensusKey(manager secrets.SecretsManager) (*ecdsa.PrivateKey, error) + func RecoverPubkey(signature, hash []byte) (*ecdsa.PublicKey, error) + func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) + func Sign(priv *ecdsa.PrivateKey, hash []byte) ([]byte, error) + func ValidateSignatureValues(v byte, r, s *big.Int) bool + type EIP155Signer struct + func NewEIP155Signer(chainID uint64) *EIP155Signer + func (e *EIP155Signer) CalculateV(parity byte) []byte + func (e *EIP155Signer) Hash(tx *types.Transaction) types.Hash + func (e *EIP155Signer) Sender(tx *types.Transaction) (types.Address, error) + func (e *EIP155Signer) SignTx(tx *types.Transaction, privateKey *ecdsa.PrivateKey) (*types.Transaction, error) + type FrontierSigner struct + func (f *FrontierSigner) CalculateV(parity byte) []byte + func (f *FrontierSigner) Hash(tx *types.Transaction) types.Hash + func (f *FrontierSigner) Sender(tx *types.Transaction) (types.Address, error) + func (f *FrontierSigner) SignTx(tx *types.Transaction, privateKey *ecdsa.PrivateKey) (*types.Transaction, error) + type TxSigner interface + CalculateV func(parity byte) []byte + Hash func(tx *types.Transaction) types.Hash + Sender func(tx *types.Transaction) (types.Address, error) + SignTx func(tx *types.Transaction, priv *ecdsa.PrivateKey) (*types.Transaction, error) + func NewSigner(forks chain.ForksInTime, chainID uint64) TxSigner