5 #ifndef BITCOIN_WALLET_WALLETUTIL_H 6 #define BITCOIN_WALLET_WALLETUTIL_H 83 descriptor =
Parse(str, keys, error,
true);
85 throw std::ios_base::failure(
"Invalid descriptor: " + error);
91 std::string descriptor_str;
92 SER_WRITE(obj, descriptor_str = obj.descriptor->ToString());
93 READWRITE(descriptor_str, obj.creation_time, obj.next_index, obj.range_start, obj.range_end);
94 SER_READ(obj, obj.DeserializeDescriptor(descriptor_str));
98 WalletDescriptor(std::shared_ptr<Descriptor> descriptor, uint64_t creation_time, int32_t range_start, int32_t range_end, int32_t next_index) : descriptor(descriptor), creation_time(creation_time), range_start(range_start), range_end(range_end), next_index(next_index) {}
101 #endif // BITCOIN_WALLET_WALLETUTIL_H WalletFeature GetClosestWalletFeature(int version)
fs::path GetWalletDir()
Get the path of the wallet directory.
std::shared_ptr< Descriptor > descriptor
WalletFeature
(client) version numbers for particular wallet features
std::unique_ptr< Descriptor > Parse(const std::string &descriptor, FlatSigningProvider &out, std::string &error, bool require_checksum)
Parse a descriptor string.
SERIALIZE_METHODS(WalletDescriptor, obj)
Flag set when a wallet contains no HD seed and no private keys, scripts, addresses, and other watch only things, and is therefore "blank.".
bool IsFeatureSupported(int wallet_version, int feature_version)
Descriptor with some wallet metadata.
Cache for single descriptor's derived extended pubkeys.
#define SER_READ(obj, code)
#define SER_WRITE(obj, code)
Indicate that this wallet supports DescriptorScriptPubKeyMan.
void DeserializeDescriptor(const std::string &str)
bool error(const char *fmt, const Args &... args)
WalletDescriptor(std::shared_ptr< Descriptor > descriptor, uint64_t creation_time, int32_t range_start, int32_t range_end, int32_t next_index)