func signature(key *ecdsa.PrivateKey, msg []byte) ([]byte, error) {
	hash := ethcrypto.Keccak256(msg)
	sig, err := ethcrypto.Sign(hash, key)
	if err != nil {
		return nil, err
	}
	sig = sig[:len(sig)-1]
	return sig, nil
}
func signature(key *ecdsa.PrivateKey, msg []byte) ([]byte, error) {
	hash := ethcrypto.Keccak256(msg)
	sig, err := ethcrypto.Sign(hash, key)
	if err != nil {
		return nil, err
	}
	sig = sig[:len(sig)-1]
	return sig, nil
}
func signature ( key * ecdsa . PrivateKey , msg [ ] byte ) ( [ ] byte , error ) { hash := ethcrypto . Keccak256 ( msg ) sig , err := ethcrypto . Sign ( hash , key ) if err != nil { return nil , err } sig = sig [ : len ( sig ) - 1 ] return sig , nil }
// signature computes and returns signature.
signature computes and returns signature .