PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Typedefs | Functions
sign.cpp File Reference
#include "script/sign.h"
#include "primitives/transaction.h"
#include "key.h"
#include "keystore.h"
#include "script/standard.h"
#include "uint256.h"
#include "util.h"
Include dependency graph for sign.cpp:

Go to the source code of this file.

Typedefs

typedef std::vector< unsigned char > valtype
 

Functions

bool Sign1 (const CKeyID &address, const CKeyStore &keystore, uint256 hash, int nHashType, CScript &scriptSigRet)
 
bool SignN (const std::vector< valtype > &multisigdata, const CKeyStore &keystore, uint256 hash, int nHashType, CScript &scriptSigRet)
 
bool Solver (const CKeyStore &keystore, const CScript &scriptPubKey, uint256 hash, int nHashType, CScript &scriptSigRet, txnouttype &whichTypeRet)
 Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type. More...
 
bool SignSignature (const CKeyStore &keystore, const CScript &fromPubKey, CMutableTransaction &txTo, unsigned int nIn, int nHashType)
 
bool SignSignature (const CKeyStore &keystore, const CTransaction &txFrom, CMutableTransaction &txTo, unsigned int nIn, int nHashType)
 
CScript CombineSignatures (const CScript &scriptPubKey, const CTransaction &txTo, unsigned int nIn, const CScript &scriptSig1, const CScript &scriptSig2)
 Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders, combine them intelligently and return the result. More...
 

Typedef Documentation

◆ valtype

typedef std::vector<unsigned char> valtype

Definition at line 16 of file sign.cpp.

Function Documentation

◆ CombineSignatures()

CScript CombineSignatures ( const CScript scriptPubKey,
const CTransaction txTo,
unsigned int  nIn,
const CScript scriptSig1,
const CScript scriptSig2 
)

Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders, combine them intelligently and return the result.

Definition at line 249 of file sign.cpp.

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

◆ Sign1()

bool Sign1 ( const CKeyID address,
const CKeyStore keystore,
uint256  hash,
int  nHashType,
CScript scriptSigRet 
)

Definition at line 18 of file sign.cpp.

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

◆ SignN()

bool SignN ( const std::vector< valtype > &  multisigdata,
const CKeyStore keystore,
uint256  hash,
int  nHashType,
CScript scriptSigRet 
)

Definition at line 32 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 CKeyStore keystore,
const CScript fromPubKey,
CMutableTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 96 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 CKeyStore keystore,
const CTransaction txFrom,
CMutableTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 135 of file sign.cpp.

Here is the call graph for this function:

◆ Solver()

bool Solver ( const CKeyStore keystore,
const CScript scriptPubKey,
uint256  hash,
int  nHashType,
CScript scriptSigRet,
txnouttype whichTypeRet 
)

Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type.

Signatures are returned in scriptSigRet (or returns false if scriptPubKey can't be signed), unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script. Returns false if scriptPubKey could not be completely satisfied.

Definition at line 50 of file sign.cpp.

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