Returns true if p is a valid SEC1-encoded secp256k1 point.
Compressed (33 bytes) or uncompressed (65 bytes) SEC1 encoding.
Returns true if d is a valid secp256k1 private key (32 bytes, in range [1, n)).
Raw bytes to test.
Returns true if p is a valid 32-byte x-only public key whose
x-coordinate lies on the secp256k1 curve.
32-byte x-only encoding.
Derives the public key for a private key scalar.
Private key scalar.
Optionalcompressed: booleanReturn compressed (33 bytes) when true (default), uncompressed (65 bytes) when false.
The public key, or null if d is invalid.
Adds two private key scalars modulo the curve order ((d + tweak) mod n).
First scalar (private key).
Second scalar.
The sum, or null if the result is zero mod n.
Negates a private key scalar modulo the curve order (n - d).
Scalar to negate.
Produces a compact (64-byte) ECDSA signature.
32-byte message hash.
Signing key.
OptionalextraEntropy: Uint8Array<ArrayBufferLike>Optional additional randomness for RFC 6979.
OptionalsignProduces a 64-byte BIP-340 Schnorr signature.
Optional — backends that omit this method will cause ECPairSigner.signSchnorr to throw at runtime.
32-byte message hash.
Signing key.
OptionalextraEntropy: Uint8Array<ArrayBufferLike>Optional auxiliary randomness.
Verifies a compact ECDSA signature.
32-byte message hash.
Signer's public key.
64-byte compact signature.
OptionalverifyVerifies a 64-byte BIP-340 Schnorr signature.
Optional — backends that omit this method will cause ECPairSigner.verifySchnorr to throw at runtime.
32-byte message hash.
32-byte x-only public key.
64-byte Schnorr signature.
Adds a scalar tweak to an x-only public key, returning the resulting x-only key together with its Y-coordinate parity.
32-byte x-only public key.
32-byte scalar.
Tweak result, or null on failure (infinity or invalid tweak).
Low-level secp256k1 operations required by the signer layer.
Two concrete implementations ship with this package:
@noble/curves)tiny-secp256k1)Third-party implementations must satisfy every non-optional method.