[#SignatureData]
= SignatureData
:mrdocs:

Signature material collected for a single transaction input&period;

== Synopsis

Declared in `&lt;script&sol;sign&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
struct SignatureData;
----

== Description

This struct contains information from a transaction input and also contains signatures for that input&period; The information contained here can be used to create a signature and is also filled by ProduceSignature in order to construct final scriptSigs and scriptWitnesses&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:SignatureData/2constructor-05a.adoc[`SignatureData`]         [.small]#[constructor]#
| Constructors
| xref:SignatureData/MergeSignatureData.adoc[`MergeSignatureData`] 
| Merge signatures and metadata from another SignatureData into this one&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:SignatureData/complete.adoc[`complete`] 
| Stores whether the scriptSig and scriptWitness are complete
| xref:SignatureData/hash160_preimages.adoc[`hash160&lowbar;preimages`] 
| Mapping from a HASH160 hash to its preimage provided to solve a Script
| xref:SignatureData/hash256_preimages.adoc[`hash256&lowbar;preimages`] 
| Mapping from a HASH256 hash to its preimage provided to solve a Script
| xref:SignatureData/misc_pubkeys.adoc[`misc&lowbar;pubkeys`] 
| Public keys with key origin data collected for the input&period;
| xref:SignatureData/missing_pubkeys.adoc[`missing&lowbar;pubkeys`] 
| KeyIDs of pubkeys which could not be found
| xref:SignatureData/missing_redeem_script.adoc[`missing&lowbar;redeem&lowbar;script`] 
| ScriptID of the missing redeemScript (if any)
| xref:SignatureData/missing_sigs.adoc[`missing&lowbar;sigs`] 
| KeyIDs of pubkeys for signatures which could not be found
| xref:SignatureData/missing_witness_script.adoc[`missing&lowbar;witness&lowbar;script`] 
| SHA256 of the missing witnessScript (if any)
| xref:SignatureData/musig2_partial_sigs.adoc[`musig2&lowbar;partial&lowbar;sigs`] 
| Mapping from pair of MuSig2 aggregate pubkey, and tapleaf hash to map of MuSig2 participant pubkeys to MuSig2 partial signature
| xref:SignatureData/musig2_pubkeys.adoc[`musig2&lowbar;pubkeys`] 
| Map MuSig2 aggregate pubkeys to its participants
| xref:SignatureData/musig2_pubnonces.adoc[`musig2&lowbar;pubnonces`] 
| Mapping from pair of MuSig2 aggregate pubkey, and tapleaf hash to map of MuSig2 participant pubkeys to MuSig2 public nonce
| xref:SignatureData/redeem_script.adoc[`redeem&lowbar;script`] 
| The redeemScript (if any) for the input
| xref:SignatureData/ripemd160_preimages.adoc[`ripemd160&lowbar;preimages`] 
| Mapping from a RIPEMD160 hash to its preimage provided to solve a Script
| xref:SignatureData/scriptSig.adoc[`scriptSig`] 
| The scriptSig of an input&period; Contains complete signatures or the traditional partial signatures format
| xref:SignatureData/scriptWitness.adoc[`scriptWitness`] 
| The scriptWitness of an input&period; Contains complete signatures or the traditional partial signatures format&period; scriptWitness is part of a transaction input per BIP 144&period;
| xref:SignatureData/sha256_preimages.adoc[`sha256&lowbar;preimages`] 
| Mapping from a SHA256 hash to its preimage provided to solve a Script
| xref:SignatureData/signatures.adoc[`signatures`] 
| BIP 174 style partial signatures for the input&period; May contain all signatures necessary for producing a final scriptSig or scriptWitness&period;
| xref:SignatureData/tap_pubkeys.adoc[`tap&lowbar;pubkeys`] 
| Misc Taproot pubkeys involved in this input, by hash&period; (Equivalent of misc&lowbar;pubkeys but for Taproot&period;)
| xref:SignatureData/taproot_key_path_sig.adoc[`taproot&lowbar;key&lowbar;path&lowbar;sig`] 
| Schnorr signature for key path spending
| xref:SignatureData/taproot_misc_pubkeys.adoc[`taproot&lowbar;misc&lowbar;pubkeys`] 
| Miscellaneous Taproot pubkeys involved in this input along with their leaf script hashes and key origin data&period; Also includes the Taproot internal and output keys (may have no leaf script hashes)&period;
| xref:SignatureData/taproot_script_sigs.adoc[`taproot&lowbar;script&lowbar;sigs`] 
| (Partial) schnorr signatures, indexed by XOnlyPubKey and leaf&lowbar;hash&period;
| xref:SignatureData/tr_builder.adoc[`tr&lowbar;builder`] 
| Taproot tree used to build tr&lowbar;spenddata&period;
| xref:SignatureData/tr_spenddata.adoc[`tr&lowbar;spenddata`] 
| Taproot spending data&period;
| xref:SignatureData/witness.adoc[`witness`] 
| Stores whether the input this SigData corresponds to is a witness input
| xref:SignatureData/witness_script.adoc[`witness&lowbar;script`] 
| The witnessScript (if any) for the input&period; witnessScripts are used in P2WSH outputs&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:DataFromTransaction.adoc[`DataFromTransaction`]
| Extract signature data from a transaction input, and insert it&period;
|===


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