Function hash_and_sign

Source
pub fn hash_and_sign(hash: Hash, pubkey: XOnlyPublicKey) -> ScriptBuf
Expand description

Contract that requires revealing the preimage to the given hash and a signature using the given (aggregate) pubkey

The expected spending script witness is the preimage followed by the signature.