[#XOnlyPubKey-CreateTapTweak]
= xref:XOnlyPubKey.adoc[XOnlyPubKey]::CreateTapTweak
:relfileprefix: ../
:mrdocs:

Construct a Taproot tweaked output point with this point as internal key&period;

== Synopsis

Declared in `&lt;pubkey&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::optional&lt;std::pair&lt;XOnlyPubKey, bool&gt;&gt;
CreateTapTweak(xref:uint256.adoc[uint256] const* merkle&lowbar;root) const;
----

== Return Value

The tweaked output point and its parity, or std&colon;&colon;nullopt on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *merkle&lowbar;root*
| Optional Merkle root of the script tree&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
