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

#include <signingprovider.h>

Collaboration diagram for TaprootSpendData:
[legend]

Public Member Functions

void Merge (TaprootSpendData other)
 Merge other TaprootSpendData (for the same scriptPubKey) into this. More...
 

Public Attributes

XOnlyPubKey internal_key
 The BIP341 internal key. More...
 
uint256 merkle_root
 The Merkle root of the script tree (0 if no scripts). More...
 
std::map< std::pair< std::vector< unsigned char >, int >, std::set< std::vector< unsigned char >, ShortestVectorFirstComparator > > scripts
 Map from (script, leaf_version) to (sets of) control blocks. More...
 

Detailed Description

Definition at line 27 of file signingprovider.h.

Member Function Documentation

◆ Merge()

void TaprootSpendData::Merge ( TaprootSpendData  other)

Merge other TaprootSpendData (for the same scriptPubKey) into this.

Definition at line 302 of file signingprovider.cpp.

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

Member Data Documentation

◆ internal_key

XOnlyPubKey TaprootSpendData::internal_key

The BIP341 internal key.

Definition at line 30 of file signingprovider.h.

◆ merkle_root

uint256 TaprootSpendData::merkle_root

The Merkle root of the script tree (0 if no scripts).

Definition at line 32 of file signingprovider.h.

◆ scripts

std::map<std::pair<std::vector<unsigned char>, int>, std::set<std::vector<unsigned char>, ShortestVectorFirstComparator> > TaprootSpendData::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.

Definition at line 39 of file signingprovider.h.


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