[#TaprootSpendData] = TaprootSpendData :mrdocs: Data needed to spend a Taproot output, including its script tree. == Synopsis Declared in `<script/signingprovider.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct TaprootSpendData; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:TaprootSpendData/Merge.adoc[`Merge`] | Merge other TaprootSpendData (for the same scriptPubKey) into this. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:TaprootSpendData/internal_key.adoc[`internal_key`] | The BIP341 internal key. | xref:TaprootSpendData/merkle_root.adoc[`merkle_root`] | The Merkle root of the script tree (0 if no scripts). | xref:TaprootSpendData/scripts.adoc[`scripts`] | Map from (script, leaf_version) to (sets of) control blocks. More than one control block for a given script is only possible if it appears in multiple branches of the tree. We keep them all so that inference can reconstruct the full tree. Within each set, the control blocks are sorted by size, so that the signing logic can easily prefer the cheapest one. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:InferTaprootTree.adoc[`InferTaprootTree`] | Given a TaprootSpendData and the output key, reconstruct its script tree. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#