[#XOnlyPubKey-ComputeTapTweakHash] = xref:XOnlyPubKey.adoc[XOnlyPubKey]::ComputeTapTweakHash :relfileprefix: ../ :mrdocs: Compute the Taproot tweak as specified in BIP341, with *this as internal key: ‐ if merkle_root == nullptr: H_TapTweak(xonly_pubkey) ‐ otherwise: H_TapTweak(xonly_pubkey || *merkle_root) == Synopsis Declared in `<pubkey.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:uint256.adoc[uint256] ComputeTapTweakHash(xref:uint256.adoc[uint256] const* merkle_root) const; ---- == Description Note that the behavior of this function with merkle_root != nullptr is consensus critical. == Return Value The computed Taproot tweak hash. == Parameters [cols="1,4"] |=== | Name| Description | *merkle_root* | Optional Merkle root mixed into the tweak (see above). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#