Function ecrecover

  • 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.

    Parameters

    • hash: Uint8Array

      32-byte message hash

    • sig: Uint8Array

      signature

    • v: number

      number of recovery byte

    • malleabilityFlag: number

      whether to check malleability

    Returns Uint8Array | null

    64 bytes representing the public key if the recovery was successful.

Generated using TypeDoc