ETHSignature constructor

ETHSignature(
  1. BigInt r,
  2. BigInt s,
  3. int v
)

Creates an Ethereum signature from the 'r', 's', and 'v' components.

Throws a MessageException if the provided 'v' is not 27 or 28.

Implementation

ETHSignature(this.r, this.s, this.v) {
  if (v != 28 && v != 27) {
    throw MessageException("Invalid signature recovery id",
        details: {"input": v});
  }
}