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 <psbt.h> | ||||
#include <script/signingprovider.h> | #include <script/signingprovider.h> | ||||
#include <script/standard.h> | #include <script/standard.h> | ||||
#include <util/error.h> | #include <util/error.h> | ||||
#include <util/message.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; | ||||
} | } | ||||
/** Sign a message with the given script */ | |||||
virtual SigningResult SignMessage(const std::string &message, | |||||
const PKHash &pkhash, | |||||
std::string &str_sig) const { | |||||
return SigningResult::SIGNING_FAILED; | |||||
}; | |||||
/** | /** | ||||
* Adds script and derivation path information to a PSBT, and optionally | * Adds script and derivation path information to a PSBT, and optionally | ||||
* signs it. | * signs it. | ||||
*/ | */ | ||||
virtual TransactionError | virtual TransactionError | ||||
FillPSBT(PartiallySignedTransaction &psbt, | FillPSBT(PartiallySignedTransaction &psbt, | ||||
SigHashType sighash_type = SigHashType().withForkId(), | SigHashType sighash_type = SigHashType().withForkId(), | ||||
bool sign = true, bool bip32derivs = false) const { | bool sign = true, bool bip32derivs = false) const { | ||||
▲ Show 20 Lines • Show All 166 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; | ||||
SigningResult SignMessage(const std::string &message, const PKHash &pkhash, | |||||
std::string &str_sig) const override; | |||||
TransactionError | TransactionError | ||||
FillPSBT(PartiallySignedTransaction &psbt, | FillPSBT(PartiallySignedTransaction &psbt, | ||||
SigHashType sighash_type = SigHashType().withForkId(), | SigHashType sighash_type = SigHashType().withForkId(), | ||||
bool sign = true, bool bip32derivs = false) const override; | 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. | ||||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |