Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.h
Show All 13 Lines | |||||
#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; | ||||
class CChainParams; | |||||
struct bilingual_str; | struct bilingual_str; | ||||
// Wallet storage things that ScriptPubKeyMans need in order to be able to store | // Wallet storage things that ScriptPubKeyMans need in order to be able to store | ||||
// things to the wallet database. It provides access to things that are part of | // things to the wallet database. It provides access to things that are part of | ||||
// the entire wallet and not specific to a ScriptPubKeyMan such as wallet flags, | // the entire wallet and not specific to a ScriptPubKeyMan such as wallet flags, | ||||
// wallet version, encryption keys, encryption status, and the database itself. | // wallet version, encryption keys, encryption status, and the database itself. | ||||
// This allows a ScriptPubKeyMan to have callbacks into CWallet without causing | // This allows a ScriptPubKeyMan to have callbacks into CWallet without causing | ||||
// a circular dependency. WalletStorage should be the same for all | // a circular dependency. WalletStorage should be the same for all | ||||
// ScriptPubKeyMans of a wallet. | // ScriptPubKeyMans of a wallet. | ||||
class WalletStorage { | class WalletStorage { | ||||
public: | public: | ||||
virtual ~WalletStorage() = default; | virtual ~WalletStorage() = default; | ||||
virtual const std::string GetDisplayName() const = 0; | virtual const std::string GetDisplayName() const = 0; | ||||
virtual WalletDatabase &GetDatabase() = 0; | virtual WalletDatabase &GetDatabase() = 0; | ||||
virtual const CChainParams &GetChainParams() const = 0; | |||||
virtual bool IsWalletFlagSet(uint64_t) const = 0; | virtual bool IsWalletFlagSet(uint64_t) const = 0; | ||||
virtual void UnsetBlankWalletFlag(WalletBatch &) = 0; | virtual void UnsetBlankWalletFlag(WalletBatch &) = 0; | ||||
virtual bool CanSupportFeature(enum WalletFeature) const = 0; | virtual bool CanSupportFeature(enum WalletFeature) const = 0; | ||||
virtual void SetMinVersion(enum WalletFeature, WalletBatch * = nullptr, | virtual void SetMinVersion(enum WalletFeature, WalletBatch * = nullptr, | ||||
bool = false) = 0; | bool = false) = 0; | ||||
virtual const CKeyingMaterial &GetEncryptionKey() const = 0; | virtual const CKeyingMaterial &GetEncryptionKey() const = 0; | ||||
virtual bool HasEncryptionKeys() const = 0; | virtual bool HasEncryptionKeys() const = 0; | ||||
virtual bool IsLocked() const = 0; | virtual bool IsLocked() const = 0; | ||||
▲ Show 20 Lines • Show All 626 Lines • ▼ Show 20 Lines | void ReturnDestination(int64_t index, bool internal, | ||||
const CTxDestination &addr) override; | const CTxDestination &addr) override; | ||||
bool TopUp(unsigned int size = 0) override; | bool TopUp(unsigned int size = 0) override; | ||||
void MarkUnusedAddresses(const CScript &script) override; | void MarkUnusedAddresses(const CScript &script) override; | ||||
bool IsHDEnabled() const override; | bool IsHDEnabled() const override; | ||||
//! Setup descriptors based on the given CExtkey | |||||
bool SetupDescriptorGeneration(const CExtKey &master_key); | |||||
bool HavePrivateKeys() const override; | bool HavePrivateKeys() const override; | ||||
int64_t GetOldestKeyPoolTime() const override; | int64_t GetOldestKeyPoolTime() const override; | ||||
size_t KeypoolCountExternalKeys() const override; | size_t KeypoolCountExternalKeys() const override; | ||||
unsigned int GetKeyPoolSize() const override; | unsigned int GetKeyPoolSize() const override; | ||||
int64_t GetTimeFirstKey() const override; | int64_t GetTimeFirstKey() const override; | ||||
Show All 32 Lines |