Bitcoin Core 28.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | List of all members
SignatureData Struct Reference

#include <sign.h>

Collaboration diagram for SignatureData:
[legend]

Public Member Functions

 SignatureData ()=default
 
 SignatureData (const CScript &script)
 
void MergeSignatureData (SignatureData sigdata)
 

Public Attributes

bool complete = false
 Stores whether the scriptSig and scriptWitness are complete. More...
 
bool witness = false
 Stores whether the input this SigData corresponds to is a witness input. More...
 
CScript scriptSig
 The scriptSig of an input. Contains complete signatures or the traditional partial signatures format. More...
 
CScript redeem_script
 The redeemScript (if any) for the input. More...
 
CScript witness_script
 The witnessScript (if any) for the input. witnessScripts are used in P2WSH outputs. More...
 
CScriptWitness 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. More...
 
TaprootSpendData tr_spenddata
 Taproot spending data. More...
 
std::optional< TaprootBuildertr_builder
 Taproot tree used to build tr_spenddata. More...
 
std::map< CKeyID, SigPairsignatures
 BIP 174 style partial signatures for the input. May contain all signatures necessary for producing a final scriptSig or scriptWitness. More...
 
std::map< CKeyID, std::pair< CPubKey, KeyOriginInfo > > misc_pubkeys
 
std::vector< unsigned char > taproot_key_path_sig
 
std::map< std::pair< XOnlyPubKey, uint256 >, std::vector< unsigned char > > taproot_script_sigs
 Schnorr signature for key path spending. More...
 
std::map< XOnlyPubKey, std::pair< std::set< uint256 >, KeyOriginInfo > > 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 key (may have no leaf script hashes). More...
 
std::map< CKeyID, XOnlyPubKeytap_pubkeys
 Misc Taproot pubkeys involved in this input, by hash. (Equivalent of misc_pubkeys but for Taproot.) More...
 
std::vector< CKeyIDmissing_pubkeys
 KeyIDs of pubkeys which could not be found. More...
 
std::vector< CKeyIDmissing_sigs
 KeyIDs of pubkeys for signatures which could not be found. More...
 
uint160 missing_redeem_script
 ScriptID of the missing redeemScript (if any) More...
 
uint256 missing_witness_script
 SHA256 of the missing witnessScript (if any) More...
 
std::map< std::vector< uint8_t >, std::vector< uint8_t > > sha256_preimages
 Mapping from a SHA256 hash to its preimage provided to solve a Script. More...
 
std::map< std::vector< uint8_t >, std::vector< uint8_t > > hash256_preimages
 Mapping from a HASH256 hash to its preimage provided to solve a Script. More...
 
std::map< std::vector< uint8_t >, std::vector< uint8_t > > ripemd160_preimages
 Mapping from a RIPEMD160 hash to its preimage provided to solve a Script. More...
 
std::map< std::vector< uint8_t >, std::vector< uint8_t > > hash160_preimages
 Mapping from a HASH160 hash to its preimage provided to solve a Script. More...
 

Detailed Description

Definition at line 68 of file sign.h.

Constructor & Destructor Documentation

◆ SignatureData() [1/2]

SignatureData::SignatureData ( )
default

◆ SignatureData() [2/2]

SignatureData::SignatureData ( const CScript script)
inlineexplicit

Definition at line 93 of file sign.h.

Member Function Documentation

◆ MergeSignatureData()

void SignatureData::MergeSignatureData ( SignatureData  sigdata)

Definition at line 681 of file sign.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ complete

bool SignatureData::complete = false

Stores whether the scriptSig and scriptWitness are complete.

Definition at line 69 of file sign.h.

◆ hash160_preimages

std::map<std::vector<uint8_t>, std::vector<uint8_t> > SignatureData::hash160_preimages

Mapping from a HASH160 hash to its preimage provided to solve a Script.

Definition at line 90 of file sign.h.

◆ hash256_preimages

std::map<std::vector<uint8_t>, std::vector<uint8_t> > SignatureData::hash256_preimages

Mapping from a HASH256 hash to its preimage provided to solve a Script.

Definition at line 88 of file sign.h.

◆ misc_pubkeys

std::map<CKeyID, std::pair<CPubKey, KeyOriginInfo> > SignatureData::misc_pubkeys

Definition at line 78 of file sign.h.

◆ missing_pubkeys

std::vector<CKeyID> SignatureData::missing_pubkeys

KeyIDs of pubkeys which could not be found.

Definition at line 83 of file sign.h.

◆ missing_redeem_script

uint160 SignatureData::missing_redeem_script

ScriptID of the missing redeemScript (if any)

Definition at line 85 of file sign.h.

◆ missing_sigs

std::vector<CKeyID> SignatureData::missing_sigs

KeyIDs of pubkeys for signatures which could not be found.

Definition at line 84 of file sign.h.

◆ missing_witness_script

uint256 SignatureData::missing_witness_script

SHA256 of the missing witnessScript (if any)

Definition at line 86 of file sign.h.

◆ redeem_script

CScript SignatureData::redeem_script

The redeemScript (if any) for the input.

Definition at line 72 of file sign.h.

◆ ripemd160_preimages

std::map<std::vector<uint8_t>, std::vector<uint8_t> > SignatureData::ripemd160_preimages

Mapping from a RIPEMD160 hash to its preimage provided to solve a Script.

Definition at line 89 of file sign.h.

◆ scriptSig

CScript SignatureData::scriptSig

The scriptSig of an input. Contains complete signatures or the traditional partial signatures format.

Definition at line 71 of file sign.h.

◆ scriptWitness

CScriptWitness SignatureData::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.

Definition at line 74 of file sign.h.

◆ sha256_preimages

std::map<std::vector<uint8_t>, std::vector<uint8_t> > SignatureData::sha256_preimages

Mapping from a SHA256 hash to its preimage provided to solve a Script.

Definition at line 87 of file sign.h.

◆ signatures

std::map<CKeyID, SigPair> SignatureData::signatures

BIP 174 style partial signatures for the input. May contain all signatures necessary for producing a final scriptSig or scriptWitness.

Definition at line 77 of file sign.h.

◆ tap_pubkeys

std::map<CKeyID, XOnlyPubKey> SignatureData::tap_pubkeys

Misc Taproot pubkeys involved in this input, by hash. (Equivalent of misc_pubkeys but for Taproot.)

Definition at line 82 of file sign.h.

◆ taproot_key_path_sig

std::vector<unsigned char> SignatureData::taproot_key_path_sig

Definition at line 79 of file sign.h.

◆ taproot_misc_pubkeys

std::map<XOnlyPubKey, std::pair<std::set<uint256>, KeyOriginInfo> > SignatureData::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 key (may have no leaf script hashes).

Definition at line 81 of file sign.h.

◆ taproot_script_sigs

std::map<std::pair<XOnlyPubKey, uint256>, std::vector<unsigned char> > SignatureData::taproot_script_sigs

Schnorr signature for key path spending.

(Partial) schnorr signatures, indexed by XOnlyPubKey and leaf_hash.

Definition at line 80 of file sign.h.

◆ tr_builder

std::optional<TaprootBuilder> SignatureData::tr_builder

Taproot tree used to build tr_spenddata.

Definition at line 76 of file sign.h.

◆ tr_spenddata

TaprootSpendData SignatureData::tr_spenddata

Taproot spending data.

Definition at line 75 of file sign.h.

◆ witness

bool SignatureData::witness = false

Stores whether the input this SigData corresponds to is a witness input.

Definition at line 70 of file sign.h.

◆ witness_script

CScript SignatureData::witness_script

The witnessScript (if any) for the input. witnessScripts are used in P2WSH outputs.

Definition at line 73 of file sign.h.


The documentation for this struct was generated from the following files: