SignatureData

Signature material collected for a single transaction input.

Synopsis

Declared in <script/sign.h>

struct SignatureData;

Description

This struct contains information from a transaction input and also contains signatures for that input. 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.

Member Functions

NameDescription
SignatureData [constructor]Constructors
MergeSignatureData Merge signatures and metadata from another SignatureData into this one.

Data Members

NameDescription
complete Stores whether the scriptSig and scriptWitness are complete
hash160_preimages Mapping from a HASH160 hash to its preimage provided to solve a Script
hash256_preimages Mapping from a HASH256 hash to its preimage provided to solve a Script
misc_pubkeys Public keys with key origin data collected for the input.
missing_pubkeys KeyIDs of pubkeys which could not be found
missing_redeem_script ScriptID of the missing redeemScript (if any)
missing_sigs KeyIDs of pubkeys for signatures which could not be found
missing_witness_script SHA256 of the missing witnessScript (if any)
musig2_partial_sigs Mapping from pair of MuSig2 aggregate pubkey, and tapleaf hash to map of MuSig2 participant pubkeys to MuSig2 partial signature
musig2_pubkeys Map MuSig2 aggregate pubkeys to its participants
musig2_pubnonces Mapping from pair of MuSig2 aggregate pubkey, and tapleaf hash to map of MuSig2 participant pubkeys to MuSig2 public nonce
redeem_script The redeemScript (if any) for the input
ripemd160_preimages Mapping from a RIPEMD160 hash to its preimage provided to solve a Script
scriptSig The scriptSig of an input. Contains complete signatures or the traditional partial signatures format
scriptWitness The scriptWitness of an input. Contains complete signatures or the traditional partial signatures format. scriptWitness is part of a transaction input per BIP 144.
sha256_preimages Mapping from a SHA256 hash to its preimage provided to solve a Script
signatures BIP 174 style partial signatures for the input. May contain all signatures necessary for producing a final scriptSig or scriptWitness.
tap_pubkeys Misc Taproot pubkeys involved in this input, by hash. (Equivalent of misc_pubkeys but for Taproot.)
taproot_key_path_sig Schnorr signature for key path spending
taproot_misc_pubkeys Miscellaneous Taproot pubkeys involved in this input along with their leaf script hashes and key origin data. Also includes the Taproot internal and output keys (may have no leaf script hashes).
taproot_script_sigs (Partial) schnorr signatures, indexed by XOnlyPubKey and leaf_hash.
tr_builder Taproot tree used to build tr_spenddata.
tr_spenddata Taproot spending data.
witness Stores whether the input this SigData corresponds to is a witness input
witness_script The witnessScript (if any) for the input. witnessScripts are used in P2WSH outputs.

Non-Member Functions

NameDescription
DataFromTransactionExtract signature data from a transaction input, and insert it.