import { validateSecp256k1PrivateKey } from "https://deno.land/x/libauth@v2.0.0-alpha.6/src/lib/key/key-utils.ts";
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
0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140
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.