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

Miniscript satisfier specific to Tapscript context. More...

Inheritance diagram for TapSatisfier:
[legend]
Collaboration diagram for TapSatisfier:
[legend]

Public Member Functions

 TapSatisfier (const SigningProvider &provider LIFETIMEBOUND, SignatureData &sig_data LIFETIMEBOUND, const BaseSignatureCreator &creator LIFETIMEBOUND, const CScript &script LIFETIMEBOUND, const uint256 &leaf_hash LIFETIMEBOUND)
 
template<typename I >
std::optional< XOnlyPubKeyFromPKBytes (I first, I last) const
 Conversion from a raw xonly public key. More...
 
template<typename I >
std::optional< XOnlyPubKeyFromPKHBytes (I first, I last) const
 Conversion from a raw xonly public key hash. More...
 
miniscript::Availability Sign (const XOnlyPubKey &key, std::vector< unsigned char > &sig) const
 Satisfy a BIP340 signature check. More...
 
- Public Member Functions inherited from Satisfier< XOnlyPubKey >
 Satisfier (const SigningProvider &provider LIFETIMEBOUND, SignatureData &sig_data LIFETIMEBOUND, const BaseSignatureCreator &creator LIFETIMEBOUND, const CScript &witscript LIFETIMEBOUND, miniscript::MiniscriptContext script_ctx)
 
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
 

Public Attributes

const uint256m_leaf_hash
 
- Public Attributes inherited from Satisfier< XOnlyPubKey >
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...
 

Additional Inherited Members

- Public Types inherited from Satisfier< XOnlyPubKey >
using Key = XOnlyPubKey
 
- Static Public Member Functions inherited from Satisfier< XOnlyPubKey >
static bool KeyCompare (const Key &a, const Key &b)
 

Detailed Description

Miniscript satisfier specific to Tapscript context.

Definition at line 286 of file sign.cpp.

Constructor & Destructor Documentation

◆ TapSatisfier()

TapSatisfier::TapSatisfier ( const SigningProvider &provider  LIFETIMEBOUND,
SignatureData &sig_data  LIFETIMEBOUND,
const BaseSignatureCreator &creator  LIFETIMEBOUND,
const CScript &script  LIFETIMEBOUND,
const uint256 &leaf_hash  LIFETIMEBOUND 
)
inlineexplicit

Definition at line 289 of file sign.cpp.

Member Function Documentation

◆ FromPKBytes()

template<typename I >
std::optional< XOnlyPubKey > TapSatisfier::FromPKBytes ( first,
last 
) const
inline

Conversion from a raw xonly public key.

Definition at line 297 of file sign.cpp.

Here is the call graph for this function:

◆ FromPKHBytes()

template<typename I >
std::optional< XOnlyPubKey > TapSatisfier::FromPKHBytes ( first,
last 
) const
inline

Conversion from a raw xonly public key hash.

Definition at line 306 of file sign.cpp.

Here is the call graph for this function:

◆ Sign()

miniscript::Availability TapSatisfier::Sign ( const XOnlyPubKey key,
std::vector< unsigned char > &  sig 
) const
inline

Satisfy a BIP340 signature check.

Definition at line 312 of file sign.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_leaf_hash

const uint256& TapSatisfier::m_leaf_hash

Definition at line 287 of file sign.cpp.


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