sign method

Uint8List sign(
  1. SecretKey key
)

Returns 65 bytes: r (32) + s (32) + v (1).

Implementation

Uint8List sign(SecretKey key) {
  final hash = signingHash();
  final sig = RecoverableEcdsaSig.sign(hash, key.bytes);
  final out = Uint8List(65);
  out.setRange(0, 64, sig.bytes);
  out[64] = sig.recId + 27;
  return out;
}