Bitcoin Core  27.99.0
P2P Digital Currency
Classes | Functions | Variables
signingprovider.h File Reference
#include <addresstype.h>
#include <attributes.h>
#include <key.h>
#include <pubkey.h>
#include <script/keyorigin.h>
#include <script/script.h>
#include <sync.h>
Include dependency graph for signingprovider.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ShortestVectorFirstComparator
 
struct  TaprootSpendData
 
class  TaprootBuilder
 Utility class to construct Taproot outputs from internal key and script tree. More...
 
struct  TaprootBuilder::LeafInfo
 Information about a tracked leaf in the Merkle tree. More...
 
struct  TaprootBuilder::NodeInfo
 Information associated with a node in the Merkle tree. More...
 
class  SigningProvider
 An interface to be implemented by keystores that support signing. More...
 
class  HidingSigningProvider
 
struct  FlatSigningProvider
 
class  FillableSigningProvider
 Fillable signing provider that keeps keys in an address->secret map. More...
 
class  MultiSigningProvider
 A signing provider to be used to interface with multiple signing providers at once. More...
 

Functions

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...
 
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...
 

Variables

const SigningProviderDUMMY_SIGNING_PROVIDER
 

Function Documentation

◆ GetKeyForDestination()

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.

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

◆ InferTaprootTree()

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 depth-first 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.

Here is the call graph for this function:

Variable Documentation

◆ DUMMY_SIGNING_PROVIDER

const SigningProvider& DUMMY_SIGNING_PROVIDER
extern

Definition at line 12 of file signingprovider.cpp.