Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Classes | Macros | Typedefs | Functions
script.cpp File Reference
#include <boost/foreach.hpp>
#include <boost/tuple/tuple.hpp>
#include "script.h"
#include "keystore.h"
#include "bignum.h"
#include "key.h"
#include "main.h"
#include "sync.h"
#include "util.h"
Include dependency graph for script.cpp:

Go to the source code of this file.

Classes

class  CSignatureCache
 
class  CKeyStoreIsMineVisitor
 
class  CScriptVisitor
 

Macros

#define stacktop(i)   (stack.at(stack.size()+(i)))
 
#define altstacktop(i)   (altstack.at(altstack.size()+(i)))
 

Typedefs

typedef vector< unsigned char > valtype
 

Functions

bool CheckSig (vector< unsigned char > vchSig, const vector< unsigned char > &vchPubKey, const CScript &scriptCode, const CTransaction &txTo, unsigned int nIn, int nHashType, int flags)
 
CBigNum CastToBigNum (const valtype &vch)
 
bool CastToBool (const valtype &vch)
 
const char * GetTxnOutputType (txnouttype t)
 
const char * GetOpName (opcodetype opcode)
 
bool IsCanonicalPubKey (const valtype &vchPubKey)
 
bool IsCanonicalSignature (const valtype &vchSig)
 
bool EvalScript (vector< vector< unsigned char > > &stack, const CScript &script, const CTransaction &txTo, unsigned int nIn, unsigned int flags, int nHashType)
 
uint256 SignatureHash (CScript scriptCode, const CTransaction &txTo, unsigned int nIn, int nHashType)
 
bool Solver (const CScript &scriptPubKey, txnouttype &typeRet, vector< vector< unsigned char > > &vSolutionsRet)
 
bool Sign1 (const CKeyID &address, const CKeyStore &keystore, uint256 hash, int nHashType, CScript &scriptSigRet)
 
bool SignN (const 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)
 
int ScriptSigArgsExpected (txnouttype t, const std::vector< std::vector< unsigned char > > &vSolutions)
 
bool IsStandard (const CScript &scriptPubKey)
 
unsigned int HaveKeys (const vector< valtype > &pubkeys, const CKeyStore &keystore)
 
bool IsMine (const CKeyStore &keystore, const CTxDestination &dest)
 
bool IsMine (const CKeyStore &keystore, const CScript &scriptPubKey)
 
bool ExtractDestination (const CScript &scriptPubKey, CTxDestination &addressRet)
 
bool ExtractDestinations (const CScript &scriptPubKey, txnouttype &typeRet, vector< CTxDestination > &addressRet, int &nRequiredRet)
 
bool VerifyScript (const CScript &scriptSig, const CScript &scriptPubKey, const CTransaction &txTo, unsigned int nIn, unsigned int flags, int nHashType)
 
bool SignSignature (const CKeyStore &keystore, const CScript &fromPubKey, CTransaction &txTo, unsigned int nIn, int nHashType)
 
bool SignSignature (const CKeyStore &keystore, const CTransaction &txFrom, CTransaction &txTo, unsigned int nIn, int nHashType)
 
CScript CombineSignatures (CScript scriptPubKey, const CTransaction &txTo, unsigned int nIn, const CScript &scriptSig1, const CScript &scriptSig2)
 

Macro Definition Documentation

#define altstacktop (   i)    (altstack.at(altstack.size()+(i)))

Definition at line 64 of file script.cpp.

#define stacktop (   i)    (stack.at(stack.size()+(i)))

Definition at line 63 of file script.cpp.

Typedef Documentation

typedef vector<unsigned char> valtype

Definition at line 23 of file script.cpp.

Function Documentation

CBigNum CastToBigNum ( const valtype vch)

Definition at line 34 of file script.cpp.

bool CastToBool ( const valtype vch)

Definition at line 42 of file script.cpp.

bool CheckSig ( vector< unsigned char >  vchSig,
const vector< unsigned char > &  vchPubKey,
const CScript scriptCode,
const CTransaction txTo,
unsigned int  nIn,
int  nHashType,
int  flags 
)

Definition at line 1084 of file script.cpp.

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

Definition at line 1671 of file script.cpp.

bool EvalScript ( vector< vector< unsigned char > > &  stack,
const CScript script,
const CTransaction txTo,
unsigned int  nIn,
unsigned int  flags,
int  nHashType 
)

Definition at line 292 of file script.cpp.

bool ExtractDestination ( const CScript scriptPubKey,
CTxDestination addressRet 
)

Definition at line 1422 of file script.cpp.

bool ExtractDestinations ( const CScript scriptPubKey,
txnouttype typeRet,
vector< CTxDestination > &  addressRet,
int &  nRequiredRet 
)

Definition at line 1448 of file script.cpp.

const char* GetOpName ( opcodetype  opcode)

Definition at line 87 of file script.cpp.

const char* GetTxnOutputType ( txnouttype  t)

Definition at line 73 of file script.cpp.

unsigned int HaveKeys ( const vector< valtype > &  pubkeys,
const CKeyStore keystore 
)

Definition at line 1354 of file script.cpp.

bool IsCanonicalPubKey ( const valtype vchPubKey)

Definition at line 230 of file script.cpp.

bool IsCanonicalSignature ( const valtype vchSig)

Definition at line 245 of file script.cpp.

bool IsMine ( const CKeyStore keystore,
const CTxDestination dest 
)

Definition at line 1378 of file script.cpp.

bool IsMine ( const CKeyStore keystore,
const CScript scriptPubKey 
)

Definition at line 1383 of file script.cpp.

bool IsStandard ( const CScript scriptPubKey)

Definition at line 1332 of file script.cpp.

int ScriptSigArgsExpected ( txnouttype  t,
const std::vector< std::vector< unsigned char > > &  vSolutions 
)

Definition at line 1312 of file script.cpp.

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

Definition at line 1239 of file script.cpp.

uint256 SignatureHash ( CScript  scriptCode,
const CTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 966 of file script.cpp.

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

Definition at line 1254 of file script.cpp.

bool SignSignature ( const CKeyStore keystore,
const CScript fromPubKey,
CTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 1519 of file script.cpp.

bool SignSignature ( const CKeyStore keystore,
const CTransaction txFrom,
CTransaction txTo,
unsigned int  nIn,
int  nHashType 
)

Definition at line 1554 of file script.cpp.

bool Solver ( const CScript scriptPubKey,
txnouttype typeRet,
vector< vector< unsigned char > > &  vSolutionsRet 
)

Definition at line 1127 of file script.cpp.

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

Definition at line 1274 of file script.cpp.

bool VerifyScript ( const CScript scriptSig,
const CScript scriptPubKey,
const CTransaction txTo,
unsigned int  nIn,
unsigned int  flags,
int  nHashType 
)

Definition at line 1477 of file script.cpp.