Function validateSecp256k1PrivateKey

  • Verify that a private key is valid for the Secp256k1 curve. Returns true for success, or false on failure.

    Private keys are 256-bit numbers encoded as a 32-byte, big-endian Uint8Array. Nearly every 256-bit number is a valid secp256k1 private key. Specifically, any 256-bit number greater than 0x01 and less than 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 is a valid private key. This range is part of the definition of the secp256k1 elliptic curve parameters.

    This method does not require a Secp256k1 implementation.


    • privateKey: Uint8Array

      The private key to validate.

    Returns boolean

Generated using TypeDoc