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>

uint256
ComputeTapTweakHash(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

Name

Description

merkle_root

Optional Merkle root mixed into the tweak (see above).

Created with MrDocs