Instance Method
isValidSignature(_:for:)
Verifies a BIP-340 Schnorr signature against a pre-computed digest using secp256k1_schnorrsig_verify.
- iOS 13.0+
- macCatalyst 13.0+
- macOS 10.15+
- tvOS 13.0+
- visionOS 1.0+
- watchOS 6.0+
func isValidSignature<D>(_ signature: P256K.Schnorr.SchnorrSignature, for digest: D) -> Bool where D : Digest
Parameters
-
signature
-
The 64-byte P256K.Schnorr.SchnorrSignature to verify.
-
digest
-
The pre-computed digest that was signed. Must be the same digest type and data used when signing.
Return Value
true if the signature is valid for digest under this x-only public key, false otherwise.