recoverEthMessageSigner function

String recoverEthMessageSigner({
  1. required String message,
  2. required String signature,
})

Implementation

String recoverEthMessageSigner({
  required String message,
  required String signature,
}) {
  final messageHash = _createEthStyleMessageHash(message);
  final sig = _parseEthSignature(signature);
  final recoveredSignerPubKey = recoverPublicKey(messageHash, sig);
  final recoveredSignerAddress =
      publicKeyToAddress(recoveredSignerPubKey).toHex;

  return toChecksumAddress("0x" + recoveredSignerAddress);
}