code: 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
  }
docs: // signature computes and returns signature.