Changeset View
Changeset View
Standalone View
Standalone View
src/script/sign.h
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_SCRIPT_SIGN_H | #ifndef BITCOIN_SCRIPT_SIGN_H | ||||
#define BITCOIN_SCRIPT_SIGN_H | #define BITCOIN_SCRIPT_SIGN_H | ||||
#include <coins.h> | |||||
#include <hash.h> | #include <hash.h> | ||||
#include <pubkey.h> | #include <pubkey.h> | ||||
#include <script/interpreter.h> | #include <script/interpreter.h> | ||||
#include <script/keyorigin.h> | #include <script/keyorigin.h> | ||||
#include <script/sighashtype.h> | #include <script/sighashtype.h> | ||||
#include <streams.h> | #include <streams.h> | ||||
class CKey; | class CKey; | ||||
▲ Show 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Check whether we know how to sign for an output like this, assuming we have | * Check whether we know how to sign for an output like this, assuming we have | ||||
* all private keys. While this function does not need private keys, the passed | * all private keys. While this function does not need private keys, the passed | ||||
* keystore is used to look up public keys and redeemscripts by hash. | * keystore is used to look up public keys and redeemscripts by hash. | ||||
* Solvability is unrelated to whether we consider this output to be ours. | * Solvability is unrelated to whether we consider this output to be ours. | ||||
*/ | */ | ||||
bool IsSolvable(const SigningProvider &provider, const CScript &script); | bool IsSolvable(const SigningProvider &provider, const CScript &script); | ||||
/** Sign the CMutableTransaction */ | |||||
bool SignTransaction(CMutableTransaction &mtx, const SigningProvider *provider, | |||||
const std::map<COutPoint, Coin> &coins, | |||||
SigHashType sigHashType, | |||||
std::map<int, std::string> &input_errors); | |||||
#endif // BITCOIN_SCRIPT_SIGN_H | #endif // BITCOIN_SCRIPT_SIGN_H |