Skip to main content

isValidPublic

Callable

  • isValidPublic(publicKey: Buffer, sanitize?: boolean): boolean

  • Checks if the public key satisfies the rules of the curve secp256k1 and the requirements of Ethereum.


    Parameters

    • publicKey: Buffer

      The two points of an uncompressed key, unless sanitize is enabled

    • sanitize: boolean = false

      Accept public keys in other formats

    Returns boolean