Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
MutableTransactionSignatureCreator Class Reference

A signature creator for transactions. More...

#include <sign.h>

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

Public Member Functions

 MutableTransactionSignatureCreator (const CMutableTransaction &tx LIFETIMEBOUND, unsigned int input_idx, const CAmount &amount, int hash_type)
 MutableTransactionSignatureCreator (const CMutableTransaction &tx LIFETIMEBOUND, unsigned int input_idx, const CAmount &amount, const PrecomputedTransactionData *txdata, int hash_type)
const BaseSignatureCheckerChecker () const override
bool CreateSig (const SigningProvider &provider, std::vector< unsigned char > &vchSig, const CKeyID &keyid, const CScript &scriptCode, SigVersion sigversion) const override
 Create a singular (non-script) signature.
bool CreateSchnorrSig (const SigningProvider &provider, std::vector< unsigned char > &sig, const XOnlyPubKey &pubkey, const uint256 *leaf_hash, const uint256 *merkle_root, SigVersion sigversion) const override
std::vector< uint8_t > CreateMuSig2Nonce (const SigningProvider &provider, const CPubKey &aggregate_pubkey, const CPubKey &script_pubkey, const CPubKey &part_pubkey, const uint256 *leaf_hash, const uint256 *merkle_root, SigVersion sigversion, const SignatureData &sigdata) const override
bool CreateMuSig2PartialSig (const SigningProvider &provider, uint256 &partial_sig, const CPubKey &aggregate_pubkey, const CPubKey &script_pubkey, const CPubKey &part_pubkey, const uint256 *leaf_hash, const std::vector< std::pair< uint256, bool > > &tweaks, SigVersion sigversion, const SignatureData &sigdata) const override
bool CreateMuSig2AggregateSig (const std::vector< CPubKey > &participants, std::vector< uint8_t > &sig, const CPubKey &aggregate_pubkey, const CPubKey &script_pubkey, const uint256 *leaf_hash, const std::vector< std::pair< uint256, bool > > &tweaks, SigVersion sigversion, const SignatureData &sigdata) const override
Public Member Functions inherited from BaseSignatureCreator
virtual ~BaseSignatureCreator ()=default

Private Member Functions

std::optional< uint256ComputeSchnorrSignatureHash (const uint256 *leaf_hash, SigVersion sigversion) const

Private Attributes

const CMutableTransactionm_txto
unsigned int nIn
int nHashType
CAmount amount
const MutableTransactionSignatureChecker checker
const PrecomputedTransactionDatam_txdata

Detailed Description

A signature creator for transactions.

Definition at line 43 of file sign.h.

Constructor & Destructor Documentation

◆ MutableTransactionSignatureCreator() [1/2]

MutableTransactionSignatureCreator::MutableTransactionSignatureCreator ( const CMutableTransaction &tx LIFETIMEBOUND,
unsigned int input_idx,
const CAmount & amount,
int hash_type )

◆ MutableTransactionSignatureCreator() [2/2]

MutableTransactionSignatureCreator::MutableTransactionSignatureCreator ( const CMutableTransaction &tx LIFETIMEBOUND,
unsigned int input_idx,
const CAmount & amount,
const PrecomputedTransactionData * txdata,
int hash_type )

Member Function Documentation

◆ Checker()

const BaseSignatureChecker & MutableTransactionSignatureCreator::Checker ( ) const
inlineoverridevirtual

Implements BaseSignatureCreator.

Definition at line 57 of file sign.h.

◆ ComputeSchnorrSignatureHash()

std::optional< uint256 > MutableTransactionSignatureCreator::ComputeSchnorrSignatureHash ( const uint256 * leaf_hash,
SigVersion sigversion ) const
private

Definition at line 64 of file sign.cpp.

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

◆ CreateMuSig2AggregateSig()

bool MutableTransactionSignatureCreator::CreateMuSig2AggregateSig ( const std::vector< CPubKey > & participants,
std::vector< uint8_t > & sig,
const CPubKey & aggregate_pubkey,
const CPubKey & script_pubkey,
const uint256 * leaf_hash,
const std::vector< std::pair< uint256, bool > > & tweaks,
SigVersion sigversion,
const SignatureData & sigdata ) const
overridevirtual

Implements BaseSignatureCreator.

Definition at line 175 of file sign.cpp.

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

◆ CreateMuSig2Nonce()

std::vector< uint8_t > MutableTransactionSignatureCreator::CreateMuSig2Nonce ( const SigningProvider & provider,
const CPubKey & aggregate_pubkey,
const CPubKey & script_pubkey,
const CPubKey & part_pubkey,
const uint256 * leaf_hash,
const uint256 * merkle_root,
SigVersion sigversion,
const SignatureData & sigdata ) const
overridevirtual

Implements BaseSignatureCreator.

Definition at line 103 of file sign.cpp.

Here is the call graph for this function:

◆ CreateMuSig2PartialSig()

bool MutableTransactionSignatureCreator::CreateMuSig2PartialSig ( const SigningProvider & provider,
uint256 & partial_sig,
const CPubKey & aggregate_pubkey,
const CPubKey & script_pubkey,
const CPubKey & part_pubkey,
const uint256 * leaf_hash,
const std::vector< std::pair< uint256, bool > > & tweaks,
SigVersion sigversion,
const SignatureData & sigdata ) const
overridevirtual

Implements BaseSignatureCreator.

Definition at line 131 of file sign.cpp.

Here is the call graph for this function:

◆ CreateSchnorrSig()

bool MutableTransactionSignatureCreator::CreateSchnorrSig ( const SigningProvider & provider,
std::vector< unsigned char > & sig,
const XOnlyPubKey & pubkey,
const uint256 * leaf_hash,
const uint256 * merkle_root,
SigVersion sigversion ) const
overridevirtual

Implements BaseSignatureCreator.

Definition at line 88 of file sign.cpp.

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

◆ CreateSig()

bool MutableTransactionSignatureCreator::CreateSig ( const SigningProvider & provider,
std::vector< unsigned char > & vchSig,
const CKeyID & keyid,
const CScript & scriptCode,
SigVersion sigversion ) const
overridevirtual

Create a singular (non-script) signature.

Implements BaseSignatureCreator.

Definition at line 39 of file sign.cpp.

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

Member Data Documentation

◆ amount

CAmount MutableTransactionSignatureCreator::amount
private

Definition at line 48 of file sign.h.

◆ checker

const MutableTransactionSignatureChecker MutableTransactionSignatureCreator::checker
private

Definition at line 49 of file sign.h.

◆ m_txdata

const PrecomputedTransactionData* MutableTransactionSignatureCreator::m_txdata
private

Definition at line 50 of file sign.h.

◆ m_txto

const CMutableTransaction& MutableTransactionSignatureCreator::m_txto
private

Definition at line 45 of file sign.h.

◆ nHashType

int MutableTransactionSignatureCreator::nHashType
private

Definition at line 47 of file sign.h.

◆ nIn

unsigned int MutableTransactionSignatureCreator::nIn
private

Definition at line 46 of file sign.h.


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