5#ifndef BITCOIN_WALLET_WALLETUTIL_H
6#define BITCOIN_WALLET_WALLETUTIL_H
30 WALLET_FLAG_DISABLE_PRIVATE_KEYS = (1ULL << 32),
50 WALLET_FLAG_BLANK_WALLET = (1ULL << 33),
53 WALLET_FLAG_DESCRIPTORS = (1ULL << 34),
56 WALLET_FLAG_EXTERNAL_SIGNER = (1ULL << 35),
80 throw std::ios_base::failure(
"Invalid descriptor: " + error);
82 if (
descs.size() > 1) {
83 throw std::ios_base::failure(
"Can't load a multipath descriptor from databases");
Cache for single descriptor's derived extended pubkeys.
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, ParamFormat format=ParamFormat::JSON)
Parse string to UniValue or throw runtime_error if string contains invalid JSON.
fs::path GetWalletDir()
Get the path of the wallet directory.
@ WALLET_FLAG_LAST_HARDENED_XPUB_CACHED
@ WALLET_FLAG_KEY_ORIGIN_METADATA
@ WALLET_FLAG_AVOID_REUSE
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)
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.