5#ifndef BITCOIN_WALLET_WALLETUTIL_H
6#define BITCOIN_WALLET_WALLETUTIL_H
99 auto descs =
Parse(str, keys, error,
true);
101 throw std::ios_base::failure(
"Invalid descriptor: " + error);
103 if (descs.size() > 1) {
104 throw std::ios_base::failure(
"Can't load a multipath descriptor from databases");
112 std::string descriptor_str;
113 SER_WRITE(obj, descriptor_str = obj.descriptor->ToString());
114 READWRITE(descriptor_str, obj.creation_time, obj.next_index, obj.range_start, obj.range_end);
115 SER_READ(obj, obj.DeserializeDescriptor(descriptor_str));
Cache for single descriptor's derived extended pubkeys.
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
Descriptor with some wallet metadata.
WalletDescriptor()=default
WalletDescriptor(std::shared_ptr< Descriptor > descriptor, uint64_t creation_time, int32_t range_start, int32_t range_end, int32_t next_index)
void DeserializeDescriptor(const std::string &str)
SERIALIZE_METHODS(WalletDescriptor, obj)
std::shared_ptr< Descriptor > descriptor
static UniValue Parse(std::string_view raw)
Parse string to UniValue or throw runtime_error if string contains invalid JSON.
fs::path GetWalletDir()
Get the path of the wallet directory.
WalletFeature
(client) version numbers for particular wallet features
@ FEATURE_PRE_SPLIT_KEYPOOL
bool IsFeatureSupported(int wallet_version, int feature_version)
@ WALLET_FLAG_EXTERNAL_SIGNER
Indicates that the wallet needs an external signer.
@ WALLET_FLAG_LAST_HARDENED_XPUB_CACHED
@ WALLET_FLAG_KEY_ORIGIN_METADATA
@ WALLET_FLAG_AVOID_REUSE
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
@ WALLET_FLAG_DISABLE_PRIVATE_KEYS
@ WALLET_FLAG_BLANK_WALLET
Flag set when a wallet contains no HD seed and no private keys, scripts, addresses,...
WalletFeature GetClosestWalletFeature(int version)
WalletDescriptor GenerateWalletDescriptor(const CExtPubKey &master_key, const OutputType &addr_type, bool internal)
uint256 DescriptorID(const Descriptor &desc)
Unique identifier that may not change over time, unless explicitly marked as not backwards compatible...
#define SER_WRITE(obj, code)
#define SER_READ(obj, code)