Secp256k1SigningApi class abstract interface

Backend interface for secp256k1 signing/verification operations.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

normalizePublicKey(List<int> publicKey) → BuBytes?
Validates 33/65-byte publicKey and returns its canonical base (compressed) encoding, or null when invalid (bad length, prefix, range, curve membership, or identity).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sign({required List<int> sk, required List<int> publicKey, required List<int> digest, List<int>? extraEntropy}) → IECDSASignature
Signs 32-byte digest with 32-byte sk using ECDSA (RFC6979 k, low-S). publicKey is 33/65 bytes; returns signature with recovery id. Throws on invalid input.
signBip340({required List<int> sk, required List<int> publicKey, required List<int> digest, List<int>? aux, List<int>? tapTweakHash}) → IECDSASignature
Signs 32-byte digest with 32-byte sk using BIP-340 Schnorr. publicKey is 33/65 bytes; aux and tapTweakHash are optional 32 bytes. Throws on invalid input.
signSchnorr({required List<int> digest, required List<int> sk, required List<int> publicKey, List<int>? extraEntropy}) → IECDSASignature
Signs 32-byte digest with 32-byte sk using BCH Schnorr (RFC6979 k, SHA-256). publicKey is 33/65 bytes; extraEntropy defaults to BCH extra data. Throws on invalid input.
toString() → String
A string representation of this object.
inherited
verify({required List<int> digest, required IECDSASignature signature, required List<int> publicKey}) → bool
Verifies ECDSA signature over 32-byte digest with 33/65-byte publicKey. Returns false if invalid; throws on malformed input.
verifyBip340SignatureUsingXOnly({required List<int> xOnly, required List<int> digest, required IECDSASignature signature, List<int>? tapTweakHash}) → bool
Verifies BIP-340 signature against 32-byte xOnly key and 32-byte digest. Optional 32-byte tapTweakHash tweaks the key first. Returns false if invalid; throws on malformed lengths.
verifyMessageSignature({required List<int> message, required IECDSASignature signature, required List<int> publicKey, required String messagePrefix}) → bool
Verifies Bitcoin signed-message signature over arbitrary message with 33/65-byte publicKey. messagePrefix is the network magic prefix. Returns false if invalid; throws on malformed input.
verifySchnorr({required List<int> digest, required IECDSASignature signature, required List<int> publicKey}) → bool
Verifies BCH Schnorr signature over 32-byte digest with 33/65-byte publicKey. Returns false if invalid; throws on malformed input.

Operators

operator ==(Object other) → bool
The equality operator.
inherited