PRCYCoin  2.0.0.7rc1
P2P Digital Currency
sign.h
Go to the documentation of this file.
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef BITCOIN_SCRIPT_SIGN_H
7 #define BITCOIN_SCRIPT_SIGN_H
8 
9 #include "script/interpreter.h"
10 #include "key.h"
11 #include "keystore.h"
12 #include "script/standard.h"
13 
14 class CKeyStore;
15 class CScript;
16 class CTransaction;
17 
18 struct CMutableTransaction;
19 
20 bool Sign1(const CKeyID& address, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet);
21 bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
22 bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
23 
28 CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
29 
30 #endif // BITCOIN_SCRIPT_SIGN_H
CKeyStore
A virtual base class for key stores.
Definition: keystore.h:21
Sign1
bool Sign1(const CKeyID &address, const CKeyStore &keystore, uint256 hash, int nHashType, CScript &scriptSigRet)
Definition: sign.cpp:18
interpreter.h
CKeyID
A reference to a CKey: the Hash160 of its serialized public key.
Definition: pubkey.h:29
CTransaction
The basic transaction that is broadcasted on the network and contained in blocks.
Definition: transaction.h:269
SignSignature
bool SignSignature(const CKeyStore &keystore, const CScript &fromPubKey, CMutableTransaction &txTo, unsigned int nIn, int nHashType=SIGHASH_ALL)
Definition: sign.cpp:96
standard.h
keystore.h
uint256
256-bit unsigned big integer.
Definition: uint256.h:38
CScript
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:363
key.h
SIGHASH_ALL
@ SIGHASH_ALL
Definition: interpreter.h:24
CMutableTransaction
A mutable version of CTransaction.
Definition: transaction.h:384
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 intellig...
Definition: sign.cpp:249