verifySignature method

bool verifySignature(
  1. Uint8List msgHash,
  2. Uint8List sig
)

verify if the signature sig and message hash msgHash were signed by the privte key of this wallet

Implementation

bool verifySignature(Uint8List msgHash, Uint8List sig) {
  var pub = secp256k1.recover(msgHash, ThorSignature.fromBytes(sig));

  return bytesToInt(this.pub).compareTo(bytesToInt(pub)) == 0;
}