Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.h
// Copyright (c) 2019 The Bitcoin Core developers | // Copyright (c) 2019 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_WALLET_SCRIPTPUBKEYMAN_H | #ifndef BITCOIN_WALLET_SCRIPTPUBKEYMAN_H | ||||
#define BITCOIN_WALLET_SCRIPTPUBKEYMAN_H | #define BITCOIN_WALLET_SCRIPTPUBKEYMAN_H | ||||
#include <psbt.h> | |||||
#include <script/signingprovider.h> | #include <script/signingprovider.h> | ||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <util/error.h> | |||||
#include <wallet/crypter.h> | #include <wallet/crypter.h> | ||||
#include <wallet/ismine.h> | #include <wallet/ismine.h> | ||||
#include <wallet/walletdb.h> | #include <wallet/walletdb.h> | ||||
#include <wallet/walletutil.h> | #include <wallet/walletutil.h> | ||||
#include <boost/signals2/signal.hpp> | #include <boost/signals2/signal.hpp> | ||||
enum class OutputType; | enum class OutputType; | ||||
▲ Show 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | public: | ||||
* all inputs were signed | * all inputs were signed | ||||
*/ | */ | ||||
virtual bool | virtual bool | ||||
SignTransaction(CMutableTransaction &tx, | SignTransaction(CMutableTransaction &tx, | ||||
const std::map<COutPoint, Coin> &coins, SigHashType sighash, | const std::map<COutPoint, Coin> &coins, SigHashType sighash, | ||||
std::map<int, std::string> &input_errors) const { | std::map<int, std::string> &input_errors) const { | ||||
return false; | return false; | ||||
} | } | ||||
/** | |||||
* Adds script and derivation path information to a PSBT, and optionally | |||||
* signs it. | |||||
*/ | |||||
virtual TransactionError | |||||
FillPSBT(PartiallySignedTransaction &psbt, | |||||
SigHashType sighash_type = SigHashType().withForkId(), | |||||
bool sign = true, bool bip32derivs = false) const { | |||||
return TransactionError::INVALID_PSBT; | |||||
} | |||||
virtual uint256 GetID() const { return uint256(); } | virtual uint256 GetID() const { return uint256(); } | ||||
/** | /** | ||||
* Prepends the wallet name in logging output to ease debugging in | * Prepends the wallet name in logging output to ease debugging in | ||||
* multi-wallet use cases | * multi-wallet use cases | ||||
*/ | */ | ||||
template <typename... Params> | template <typename... Params> | ||||
▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | public: | ||||
GetSigningProvider(const CScript &script) const override; | GetSigningProvider(const CScript &script) const override; | ||||
bool CanProvide(const CScript &script, SignatureData &sigdata) override; | bool CanProvide(const CScript &script, SignatureData &sigdata) override; | ||||
bool | bool | ||||
SignTransaction(CMutableTransaction &tx, | SignTransaction(CMutableTransaction &tx, | ||||
const std::map<COutPoint, Coin> &coins, SigHashType sighash, | const std::map<COutPoint, Coin> &coins, SigHashType sighash, | ||||
std::map<int, std::string> &input_errors) const override; | std::map<int, std::string> &input_errors) const override; | ||||
TransactionError | |||||
FillPSBT(PartiallySignedTransaction &psbt, | |||||
SigHashType sighash_type = SigHashType().withForkId(), | |||||
bool sign = true, bool bip32derivs = false) const override; | |||||
uint256 GetID() const override; | uint256 GetID() const override; | ||||
// Map from Key ID to key metadata. | // Map from Key ID to key metadata. | ||||
std::map<CKeyID, CKeyMetadata> mapKeyMetadata GUARDED_BY(cs_KeyStore); | std::map<CKeyID, CKeyMetadata> mapKeyMetadata GUARDED_BY(cs_KeyStore); | ||||
// Map from Script ID to key metadata (for watch-only keys). | // Map from Script ID to key metadata (for watch-only keys). | ||||
std::map<CScriptID, CKeyMetadata> m_script_metadata GUARDED_BY(cs_KeyStore); | std::map<CScriptID, CKeyMetadata> m_script_metadata GUARDED_BY(cs_KeyStore); | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |