sign method

ETHSignature sign(
  1. List<int> digest, {
  2. bool hashMessage = true,
})

Signs a personal message digest with an optional payload length.

The Ethereum personal sign prefix is applied to the message, and the resulting signature is returned as a byte list. Optionally, a payload length can be provided.

Parameters:

  • digest: The personal message digest to be signed.
  • payloadLength: An optional payload length to include in the message prefix.

Returns:

  • A byte list representing the signature of the personal message.

Implementation

ETHSignature sign(List<int> digest, {bool hashMessage = true}) {
  return _signEcdsa(digest, hashMessage: hashMessage);
}