Bitcoin Core 28.99.0
P2P Digital Currency
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Satisfier< Pk > Struct Template Reference

Context for solving a Miniscript. More...

Inheritance diagram for Satisfier< Pk >:
[legend]
Collaboration diagram for Satisfier< Pk >:
[legend]

Public Types

using Key = Pk
 

Public Member Functions

 Satisfier (const SigningProvider &provider LIFETIMEBOUND, SignatureData &sig_data LIFETIMEBOUND, const BaseSignatureCreator &creator LIFETIMEBOUND, const CScript &witscript LIFETIMEBOUND, miniscript::MiniscriptContext script_ctx)
 
template<typename I >
std::optional< CPubKeyCPubFromPKHBytes (I first, I last) const
 Get a CPubKey from a key hash. Note the key hash may be of an xonly pubkey. More...
 
std::vector< unsigned char > ToPKBytes (const Key &key) const
 Conversion to raw public key. More...
 
bool CheckAfter (uint32_t value) const
 Time lock satisfactions. More...
 
bool CheckOlder (uint32_t value) const
 
miniscript::Availability SatSHA256 (const std::vector< unsigned char > &hash, std::vector< unsigned char > &preimage) const
 Hash preimage satisfactions. More...
 
miniscript::Availability SatRIPEMD160 (const std::vector< unsigned char > &hash, std::vector< unsigned char > &preimage) const
 
miniscript::Availability SatHASH256 (const std::vector< unsigned char > &hash, std::vector< unsigned char > &preimage) const
 
miniscript::Availability SatHASH160 (const std::vector< unsigned char > &hash, std::vector< unsigned char > &preimage) const
 
miniscript::MiniscriptContext MsContext () const
 

Static Public Member Functions

static bool KeyCompare (const Key &a, const Key &b)
 

Public Attributes

const SigningProviderm_provider
 
SignatureDatam_sig_data
 
const BaseSignatureCreatorm_creator
 
const CScriptm_witness_script
 
const miniscript::MiniscriptContext m_script_ctx
 The context of the script we are satisfying (either P2WSH or Tapscript). More...
 

Detailed Description

template<typename Pk>
struct Satisfier< Pk >

Context for solving a Miniscript.

If enough material (access to keys, hash preimages, ..) is given, produces a valid satisfaction.

Definition at line 195 of file sign.cpp.

Member Typedef Documentation

◆ Key

template<typename Pk >
using Satisfier< Pk >::Key = Pk

Definition at line 196 of file sign.cpp.

Constructor & Destructor Documentation

◆ Satisfier()

template<typename Pk >
Satisfier< Pk >::Satisfier ( const SigningProvider &provider  LIFETIMEBOUND,
SignatureData &sig_data  LIFETIMEBOUND,
const BaseSignatureCreator &creator  LIFETIMEBOUND,
const CScript &witscript  LIFETIMEBOUND,
miniscript::MiniscriptContext  script_ctx 
)
inlineexplicit

Definition at line 205 of file sign.cpp.

Member Function Documentation

◆ CheckAfter()

template<typename Pk >
bool Satisfier< Pk >::CheckAfter ( uint32_t  value) const
inline

Time lock satisfactions.

Definition at line 234 of file sign.cpp.

Here is the call graph for this function:

◆ CheckOlder()

template<typename Pk >
bool Satisfier< Pk >::CheckOlder ( uint32_t  value) const
inline

Definition at line 235 of file sign.cpp.

Here is the call graph for this function:

◆ CPubFromPKHBytes()

template<typename Pk >
template<typename I >
std::optional< CPubKey > Satisfier< Pk >::CPubFromPKHBytes ( first,
last 
) const
inline

Get a CPubKey from a key hash. Note the key hash may be of an xonly pubkey.

Definition at line 220 of file sign.cpp.

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

◆ KeyCompare()

template<typename Pk >
static bool Satisfier< Pk >::KeyCompare ( const Key a,
const Key b 
)
inlinestatic

Definition at line 214 of file sign.cpp.

◆ MsContext()

template<typename Pk >
miniscript::MiniscriptContext Satisfier< Pk >::MsContext ( ) const
inline

Definition at line 251 of file sign.cpp.

◆ SatHASH160()

template<typename Pk >
miniscript::Availability Satisfier< Pk >::SatHASH160 ( const std::vector< unsigned char > &  hash,
std::vector< unsigned char > &  preimage 
) const
inline

Definition at line 247 of file sign.cpp.

Here is the call graph for this function:

◆ SatHASH256()

template<typename Pk >
miniscript::Availability Satisfier< Pk >::SatHASH256 ( const std::vector< unsigned char > &  hash,
std::vector< unsigned char > &  preimage 
) const
inline

Definition at line 244 of file sign.cpp.

Here is the call graph for this function:

◆ SatRIPEMD160()

template<typename Pk >
miniscript::Availability Satisfier< Pk >::SatRIPEMD160 ( const std::vector< unsigned char > &  hash,
std::vector< unsigned char > &  preimage 
) const
inline

Definition at line 241 of file sign.cpp.

Here is the call graph for this function:

◆ SatSHA256()

template<typename Pk >
miniscript::Availability Satisfier< Pk >::SatSHA256 ( const std::vector< unsigned char > &  hash,
std::vector< unsigned char > &  preimage 
) const
inline

Hash preimage satisfactions.

Definition at line 238 of file sign.cpp.

Here is the call graph for this function:

◆ ToPKBytes()

template<typename Pk >
std::vector< unsigned char > Satisfier< Pk >::ToPKBytes ( const Key key) const
inline

Conversion to raw public key.

Definition at line 231 of file sign.cpp.

Member Data Documentation

◆ m_creator

template<typename Pk >
const BaseSignatureCreator& Satisfier< Pk >::m_creator

Definition at line 200 of file sign.cpp.

◆ m_provider

template<typename Pk >
const SigningProvider& Satisfier< Pk >::m_provider

Definition at line 198 of file sign.cpp.

◆ m_script_ctx

template<typename Pk >
const miniscript::MiniscriptContext Satisfier< Pk >::m_script_ctx

The context of the script we are satisfying (either P2WSH or Tapscript).

Definition at line 203 of file sign.cpp.

◆ m_sig_data

template<typename Pk >
SignatureData& Satisfier< Pk >::m_sig_data

Definition at line 199 of file sign.cpp.

◆ m_witness_script

template<typename Pk >
const CScript& Satisfier< Pk >::m_witness_script

Definition at line 201 of file sign.cpp.


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