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/descriptor.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 <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> | ||||
▲ Show 20 Lines • Show All 594 Lines • ▼ Show 20 Lines | bool GetKey(const CKeyID &address, CKey &key) const override { | ||||
return false; | return false; | ||||
} | } | ||||
bool HaveKey(const CKeyID &address) const override { return false; } | bool HaveKey(const CKeyID &address) const override { return false; } | ||||
bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override { | bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override { | ||||
return m_spk_man.GetKeyOrigin(keyid, info); | return m_spk_man.GetKeyOrigin(keyid, info); | ||||
} | } | ||||
}; | }; | ||||
class DescriptorScriptPubKeyMan : public ScriptPubKeyMan { | |||||
public: | |||||
using ScriptPubKeyMan::ScriptPubKeyMan; | |||||
bool GetNewDestination(const OutputType type, CTxDestination &dest, | |||||
std::string &error) override; | |||||
isminetype IsMine(const CScript &script) const override; | |||||
bool CheckDecryptionKey(const CKeyingMaterial &master_key, | |||||
bool accept_no_keys = false) override; | |||||
bool Encrypt(const CKeyingMaterial &master_key, | |||||
WalletBatch *batch) override; | |||||
bool GetReservedDestination(const OutputType type, bool internal, | |||||
CTxDestination &address, int64_t &index, | |||||
CKeyPool &keypool) override; | |||||
void ReturnDestination(int64_t index, bool internal, | |||||
const CTxDestination &addr) override; | |||||
bool TopUp(unsigned int size = 0) override; | |||||
void MarkUnusedAddresses(const CScript &script) override; | |||||
bool IsHDEnabled() const override; | |||||
bool HavePrivateKeys() const override; | |||||
int64_t GetOldestKeyPoolTime() const override; | |||||
size_t KeypoolCountExternalKeys() const override; | |||||
unsigned int GetKeyPoolSize() const override; | |||||
int64_t GetTimeFirstKey() const override; | |||||
const CKeyMetadata *GetMetadata(const CTxDestination &dest) const override; | |||||
bool CanGetAddresses(bool internal = false) const override; | |||||
std::unique_ptr<SigningProvider> | |||||
GetSolvingProvider(const CScript &script) const override; | |||||
bool CanProvide(const CScript &script, SignatureData &sigdata) override; | |||||
bool | |||||
SignTransaction(CMutableTransaction &tx, | |||||
const std::map<COutPoint, Coin> &coins, SigHashType sighash, | |||||
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 | |||||
FillPSBT(PartiallySignedTransaction &psbt, | |||||
SigHashType sighash_type = SigHashType().withForkId(), | |||||
bool sign = true, bool bip32derivs = false) const override; | |||||
uint256 GetID() const override; | |||||
void SetType(OutputType type, bool internal) override; | |||||
}; | |||||
#endif // BITCOIN_WALLET_SCRIPTPUBKEYMAN_H | #endif // BITCOIN_WALLET_SCRIPTPUBKEYMAN_H |