Bitcoin Core
27.99.0
P2P Digital Currency

#include <script/keyorigin.h>
#include <script/interpreter.h>
#include <script/signingprovider.h>
#include <logging.h>
Go to the source code of this file.
Functions  
template<typename M , typename K , typename V >  
bool  LookupHelper (const M &map, const K &key, V &value) 
CKeyID  GetKeyForDestination (const SigningProvider &store, const CTxDestination &dest) 
Return the CKeyID of the key involved in a script (if there is a unique one). More...  
std::optional< std::vector< std::tuple< int, std::vector< unsigned char >, int > > >  InferTaprootTree (const TaprootSpendData &spenddata, const XOnlyPubKey &output) 
Given a TaprootSpendData and the output key, reconstruct its script tree. More...  
Variables  
const SigningProvider &  DUMMY_SIGNING_PROVIDER = SigningProvider() 
CKeyID GetKeyForDestination  (  const SigningProvider &  store, 
const CTxDestination &  dest  
) 
Return the CKeyID of the key involved in a script (if there is a unique one).
Definition at line 198 of file signingprovider.cpp.
std::optional<std::vector<std::tuple<int, std::vector<unsigned char>, int> > > InferTaprootTree  (  const TaprootSpendData &  spenddata, 
const XOnlyPubKey &  output  
) 
Given a TaprootSpendData and the output key, reconstruct its script tree.
If the output doesn't match the spenddata, or if the data in spenddata is incomplete, std::nullopt is returned. Otherwise, a vector of (depth, script, leaf_ver) tuples is returned, corresponding to a depthfirst traversal of the script tree.
Data structure to represent the nodes of the tree we're going to build.
Hash of this node, if known; 0 otherwise.
The left and right subtrees (note that their order is irrelevant).
If this is known to be a leaf node, a pointer to the (script, leaf_ver) pair. nullptr otherwise.
Whether or not this node has been explored (is known to be a leaf, or known to have children).
Whether or not this node is an inner node (unknown until explored = true).
Whether or not we have produced output for this subtree.
Definition at line 429 of file signingprovider.cpp.
bool LookupHelper  (  const M &  map, 
const K &  key,  
V &  value  
) 
const SigningProvider& DUMMY_SIGNING_PROVIDER = SigningProvider() 
Definition at line 12 of file signingprovider.cpp.