recoverPublicKeyFromSignature static method
Implementation
static Uint8List? recoverPublicKeyFromSignature(
ECDSASignature sig, Uint8List message,
{int? chainId}) {
int recoveryId = _calculateSigRecovery(sig.v, chainId: chainId);
if (!_isValidSigRecovery(recoveryId)) {
throw ArgumentError("invalid signature v value");
}
if (!isValidSignature(sig.r, sig.s, sig.v, chainId: chainId)) {
throw ArgumentError("invalid signature");
}
return _recoverPublicKeyFromSignature(recoveryId, sig.r, sig.s, message);
}