pub fn ecrecover(
hash: &[u8],
signature: &[u8],
v: u8,
malleability_flag: bool,
) -> Option<[u8; 64]>
Expand description
Recovers an ECDSA signer address from a 32-byte message hash
and a corresponding signature
along with v
recovery byte.
Takes in an additional flag to check for malleability of the signature which is generally only ideal for transactions.
Returns 64 bytes representing the public key if the recovery was successful.