BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
Classes | Typedefs | Functions | Variables
sign.cpp File Reference
#include <script/sign.h>
#include <key.h>
#include <policy/policy.h>
#include <primitives/transaction.h>
#include <script/standard.h>
#include <uint256.h>
Include dependency graph for sign.cpp:

Go to the source code of this file.

Classes

class  SignatureExtractorChecker
 

Typedefs

typedef std::vector< unsigned char > valtype
 

Functions

bool ProduceSignature (const SigningProvider &provider, const BaseSignatureCreator &creator, const CScript &fromPubKey, SignatureData &sigdata)
 Produce a script signature using a generic signature creator. More...
 
bool SignPSBTInput (const SigningProvider &provider, const CMutableTransaction &tx, PSBTInput &input, int index, int sighash)
 Signs a PSBTInput, verifying that all provided data matches what is being signed. More...
 
SignatureData DataFromTransaction (const CMutableTransaction &tx, unsigned int nIn, const CTxOut &txout)
 Extract signature data from a transaction input, and insert it. More...
 
void UpdateInput (CTxIn &input, const SignatureData &data)
 
bool SignSignature (const SigningProvider &provider, const CScript &fromPubKey, CMutableTransaction &txTo, unsigned int nIn, const CAmount &amount, int nHashType)
 Produce a script signature for a transaction. More...
 
bool SignSignature (const SigningProvider &provider, const CTransaction &txFrom, CMutableTransaction &txTo, unsigned int nIn, int nHashType)
 
bool IsSolvable (const SigningProvider &provider, const CScript &script)
 
FlatSigningProvider Merge (const FlatSigningProvider &a, const FlatSigningProvider &b)
 

Variables

const BaseSignatureCreatorDUMMY_SIGNATURE_CREATOR = DummySignatureCreator(32, 32)
 A signature creator that just produces 71-byte empty signatures. More...
 
const BaseSignatureCreatorDUMMY_MAXIMUM_SIGNATURE_CREATOR = DummySignatureCreator(33, 32)
 A signature creator that just produces 72-byte empty signatures. More...
 
const SigningProviderDUMMY_SIGNING_PROVIDER = SigningProvider()
 

Typedef Documentation

◆ valtype

typedef std::vector<unsigned char> valtype

Definition at line 14 of file sign.cpp.

Function Documentation

◆ DataFromTransaction()

SignatureData DataFromTransaction ( const CMutableTransaction tx,
unsigned int  nIn,
const CTxOut txout 
)

Extract signature data from a transaction input, and insert it.

Definition at line 337 of file sign.cpp.

Here is the call graph for this function:

◆ IsSolvable()

bool IsSolvable ( const SigningProvider provider,
const CScript script 
)

Definition at line 497 of file sign.cpp.

Here is the caller graph for this function:

◆ Merge()

FlatSigningProvider Merge ( const FlatSigningProvider a,
const FlatSigningProvider b 
)

Definition at line 697 of file sign.cpp.

◆ ProduceSignature()

bool ProduceSignature ( const SigningProvider provider,
const BaseSignatureCreator creator,
const CScript scriptPubKey,
SignatureData sigdata 
)

Produce a script signature using a generic signature creator.

Definition at line 186 of file sign.cpp.

Here is the caller graph for this function:

◆ SignPSBTInput()

bool SignPSBTInput ( const SigningProvider provider,
const CMutableTransaction tx,
PSBTInput input,
int  index,
int  sighash = SIGHASH_ALL 
)

Signs a PSBTInput, verifying that all provided data matches what is being signed.

Definition at line 242 of file sign.cpp.

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

◆ SignSignature() [1/2]

bool SignSignature ( const SigningProvider provider,
const CScript fromPubKey,
CMutableTransaction txTo,
unsigned int  nIn,
const CAmount amount,
int  nHashType 
)

Produce a script signature for a transaction.

Definition at line 424 of file sign.cpp.

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

◆ SignSignature() [2/2]

bool SignSignature ( const SigningProvider provider,
const CTransaction txFrom,
CMutableTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 436 of file sign.cpp.

Here is the call graph for this function:

◆ UpdateInput()

void UpdateInput ( CTxIn input,
const SignatureData data 
)

Definition at line 402 of file sign.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ DUMMY_MAXIMUM_SIGNATURE_CREATOR

const BaseSignatureCreator& DUMMY_MAXIMUM_SIGNATURE_CREATOR = DummySignatureCreator(33, 32)

A signature creator that just produces 72-byte empty signatures.

Definition at line 494 of file sign.cpp.

◆ DUMMY_SIGNATURE_CREATOR

const BaseSignatureCreator& DUMMY_SIGNATURE_CREATOR = DummySignatureCreator(32, 32)

A signature creator that just produces 71-byte empty signatures.

Definition at line 493 of file sign.cpp.

◆ DUMMY_SIGNING_PROVIDER

const SigningProvider& DUMMY_SIGNING_PROVIDER = SigningProvider()

Definition at line 495 of file sign.cpp.