7#include <chainparams.h>
19 if (!fs::is_directory(path)) {
27 if (fs::is_directory(path /
"wallets")) {
71 if (
Params().IsTestChain()) {
83 std::vector<std::unique_ptr<Descriptor>> desc =
Parse(
desc_str,
keys, error,
false);
const CChainParams & Params()
Return the currently selected parameters.
fs::path GetPathArg(std::string arg, const fs::path &default_value={}) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return path argument or default value.
bool IsArgSet(const std::string &strArg) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return true if the given argument has been manually set.
fs::path GetDataDirNet() const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Get data directory path with appended network identifier.
A hasher class for SHA-256.
void Finalize(unsigned char hash[OUTPUT_SIZE])
CSHA256 & Write(const unsigned char *data, size_t len)
Descriptor with some wallet metadata.
uint256 GetCanonicalHash() const
std::optional< uint256 > m_canonical_hash
bool IsCanonicallyEquivalent(const WalletDescriptor &other) const
const std::shared_ptr< const Descriptor > descriptor
void UpdateFrom(const WalletDescriptor &other)
Replaces all metadata (range, start, end, creation time), and cache from another WalletDescriptor if ...
static UniValue Parse(std::string_view raw, ParamFormat format=ParamFormat::JSON)
Parse string to UniValue or throw runtime_error if string contains invalid JSON.
std::string EncodeExtPubKey(const CExtPubKey &key)
fs::path GetWalletDir()
Get the path of the wallet directory.
WalletDescriptor GenerateWalletDescriptor(const CExtPubKey &master_key, const OutputType &addr_type, bool internal)
std::vector< uint16_t > keys
int64_t GetTime()
DEPRECATED Use either ClockType::now() or Now<TimePointType>() if a cast is needed.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.