Bitcoin Core 32.1.0
P2P Digital Currency
Loading...
Searching...
No Matches
export.h
Go to the documentation of this file.
1// Copyright (c) 2026-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or https://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_WALLET_EXPORT_H
6#define BITCOIN_WALLET_EXPORT_H
7
8#include <threadsafety.h>
9#include <util/expected.h>
10#include <wallet/wallet.h>
11
12#include <optional>
13#include <vector>
14
15namespace wallet {
16// Struct containing all of the info from WalletDescriptor, except with the descriptor as a string,
17// and without its ID.
18// Used when exporting descriptors from the wallet.
20 std::string descriptor;
21 uint64_t creation_time;
22 bool active;
23 std::optional<bool> internal;
24 std::optional<std::pair<int64_t,int64_t>> range;
25 int64_t next_index;
27};
28
31
34util::Result<std::string> ExportWatchOnlyWallet(const CWallet& wallet, const fs::path& destination, WalletContext& context) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet);
35} // namespace wallet
36
37#endif // BITCOIN_WALLET_EXPORT_H
Cache for single descriptor's derived extended pubkeys.
Definition descriptor.h:29
The util::Expected class provides a standard way for low-level functions to return either error value...
Definition expected.h:44
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition wallet.h:310
util::Result< std::string > ExportWatchOnlyWallet(const CWallet &wallet, const fs::path &destination, WalletContext &context)
Definition export.cpp:47
util::Expected< std::vector< WalletDescInfo >, std::string > ExportDescriptors(const CWallet &wallet, bool export_private)
Export the descriptors from a wallet so that they can be imported elsewhere.
Definition export.cpp:18
std::optional< bool > internal
Definition export.h:23
std::optional< std::pair< int64_t, int64_t > > range
Definition export.h:24
std::string descriptor
Definition export.h:20
uint64_t creation_time
Definition export.h:21
DescriptorCache cache
Definition export.h:26
#define EXCLUSIVE_LOCKS_REQUIRED(...)