toBytes method

List<int> toBytes([
  1. bool eip155 = true
])

Gets the byte representation of the 'r', 's', and 'v' components.

Optionally adjusts 'v' according to EIP-155.

Implementation

List<int> toBytes([bool eip155 = true]) {
  return [...rBytes, ...sBytes, !eip155 ? v - 27 : v];
}