txsMsg method

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

Implementation

Uint8List txsMsg(int v, BigInt r, BigInt s) {
  int legacyV;
  if (v == 0 || v == 1) {
    legacyV = v;
  } else if (v > 35) {
    legacyV = (v - 35) % 2 == 1 ? 1 : 0;
  } else {
    legacyV = v;
  }
  data.v = legacyV + network.chainId * 2 + 35;
  data.r = r;
  data.s = s;

  return serialize();
}