Bitcoin Core 32.99.0
P2P Digital Currency
wallet.h
Go to the documentation of this file.
1// Copyright (c) 2018-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_INTERFACES_WALLET_H
6#define BITCOIN_INTERFACES_WALLET_H
7
8#include <addresstype.h>
10#include <common/types.h>
11#include <consensus/amount.h>
12#include <interfaces/chain.h>
14#include <pubkey.h>
16#include <util/expected.h>
17#include <util/fs.h>
18#include <util/result.h>
19#include <util/ui_change_type.h>
20#include <wallet/types.h>
21
22#include <compare>
23#include <cstddef>
24#include <cstdint>
25#include <functional>
26#include <map>
27#include <memory>
28#include <optional>
29#include <set>
30#include <string>
31#include <tuple>
32#include <utility>
33#include <vector>
34
35class ArgsManager;
36class CScript;
38class uint256;
39enum class FeeReason;
40enum class OutputType;
41struct bilingual_str;
42struct CExtKey;
43
44namespace wallet {
45class CCoinControl;
46class CWallet;
47struct ImportDescriptorRequest;
48struct ImportResult;
49struct CRecipient;
50struct WalletContext;
51} // namespace wallet
52
53namespace interfaces {
54
55class Handler;
56struct WalletAddress;
57struct WalletBalances;
58struct WalletTx;
59struct WalletTxOut;
60struct WalletTxStatus;
61struct WalletMigrationResult;
62
64class Wallet
65{
66public:
67 virtual ~Wallet() = default;
68
70 virtual bool encryptWallet(const SecureString& wallet_passphrase) = 0;
71
73 virtual bool isCrypted() = 0;
74
76 virtual bool lock() = 0;
77
79 virtual util::Expected<void, wallet::WalletError> unlock(const SecureString& wallet_passphrase) = 0;
80
82 virtual bool isLocked() = 0;
83
86 const SecureString& new_wallet_passphrase) = 0;
87
89 virtual void abortRescan() = 0;
90
92 virtual bool backupWallet(const std::string& filename) = 0;
93
95 virtual std::string getWalletName() = 0;
96
97 // Get a new address.
98 virtual util::Result<CTxDestination> getNewDestination(OutputType type, const std::string& label) = 0;
99
101 virtual bool getPubKey(const CScript& script, const CKeyID& address, CPubKey& pub_key) = 0;
102
108 virtual util::Expected<CExtPubKey, wallet::WalletError> addHDKey(const std::optional<CExtKey>& key) = 0;
109
111 virtual SigningResult signMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) = 0;
112
114 virtual bool isSpendable(const CTxDestination& dest) = 0;
115
117 virtual bool setAddressBook(const CTxDestination& dest, const std::string& name, const std::optional<wallet::AddressPurpose>& purpose) = 0;
118
119 // Remove address.
120 virtual bool delAddressBook(const CTxDestination& dest) = 0;
121
123 virtual bool getAddress(const CTxDestination& dest,
124 std::string* name,
125 wallet::AddressPurpose* purpose) = 0;
126
128 virtual std::vector<WalletAddress> getAddresses() = 0;
129
131 virtual std::vector<std::string> getAddressReceiveRequests() = 0;
132
134 virtual bool setAddressReceiveRequest(const CTxDestination& dest, const std::string& id, const std::string& value) = 0;
135
138
140 virtual bool lockCoin(const COutPoint& output, bool write_to_db) = 0;
141
143 virtual bool unlockCoin(const COutPoint& output) = 0;
144
146 virtual bool isLockedCoin(const COutPoint& output) = 0;
147
149 virtual void listLockedCoins(std::vector<COutPoint>& outputs) = 0;
150
152 virtual util::Result<wallet::CreatedTransactionResult> createTransaction(const std::vector<wallet::CRecipient>& recipients,
153 const wallet::CCoinControl& coin_control,
154 bool sign,
155 std::optional<unsigned int> change_pos) = 0;
156
158 virtual void commitTransaction(CTransactionRef tx, const std::vector<std::string>& messages) = 0;
159
161 virtual bool transactionCanBeAbandoned(const Txid& txid) = 0;
162
164 virtual bool abandonTransaction(const Txid& txid) = 0;
165
167 virtual bool transactionCanBeBumped(const Txid& txid) = 0;
168
170 virtual bool createBumpTransaction(const Txid& txid,
171 const wallet::CCoinControl& coin_control,
172 std::vector<bilingual_str>& errors,
173 CAmount& old_fee,
174 CAmount& new_fee,
175 CMutableTransaction& mtx) = 0;
176
179
181 virtual bool commitBumpTransaction(const Txid& txid,
183 std::vector<bilingual_str>& errors,
184 Txid& bumped_txid) = 0;
185
187 virtual CTransactionRef getTx(const Txid& txid) = 0;
188
190 virtual WalletTx getWalletTx(const Txid& txid) = 0;
191
193 virtual std::set<WalletTx> getWalletTxs() = 0;
194
196 virtual bool tryGetTxStatus(const Txid& txid,
197 WalletTxStatus& tx_status,
198 int& num_blocks,
199 int64_t& block_time) = 0;
200
202 virtual WalletTx getWalletTxDetails(const Txid& txid,
203 WalletTxStatus& tx_status,
204 std::vector<std::string>& messages,
205 std::vector<std::string>& payment_requests,
206 bool& in_mempool,
207 int& num_blocks) = 0;
208
210 virtual std::optional<common::PSBTError> fillPSBT(const common::PSBTFillOptions& options,
211 size_t* n_signed,
213 bool& complete) = 0;
214
216 virtual std::vector<wallet::ImportResult> importDescriptors(std::vector<wallet::ImportDescriptorRequest>& requests) = 0;
217
220
222 virtual bool tryGetBalances(WalletBalances& balances, uint256& block_hash) = 0;
223
225 virtual CAmount getBalance() = 0;
226
228 virtual CAmount getAvailableBalance(const wallet::CCoinControl& coin_control) = 0;
229
231 virtual bool txinIsMine(const CTxIn& txin) = 0;
232
234 virtual bool txoutIsMine(const CTxOut& txout) = 0;
235
237 virtual CAmount getDebit(const CTxIn& txin) = 0;
238
240 virtual CAmount getCredit(const CTxOut& txout) = 0;
241
244 using CoinsList = std::map<CTxDestination, std::vector<std::tuple<COutPoint, WalletTxOut>>>;
245 virtual CoinsList listCoins() = 0;
246
248 virtual std::vector<WalletTxOut> getCoins(const std::vector<COutPoint>& outputs) = 0;
249
251 virtual CAmount getRequiredFee(unsigned int tx_bytes) = 0;
252
254 virtual CAmount getMinimumFee(unsigned int tx_bytes,
255 const wallet::CCoinControl& coin_control,
256 std::optional<int>* returned_target,
257 FeeReason* reason) = 0;
258
260 virtual unsigned int getConfirmTarget() = 0;
261
262 // Return whether HD enabled.
263 virtual bool hdEnabled() = 0;
264
265 // Return whether the wallet is blank.
266 virtual bool canGetAddresses() = 0;
267
268 // Return whether private keys enabled.
269 virtual bool privateKeysDisabled() = 0;
270
271 // Return whether the wallet contains a Taproot scriptPubKeyMan
272 virtual bool taprootEnabled() = 0;
273
274 // Return whether wallet uses an external signer.
275 virtual bool hasExternalSigner() = 0;
276
277 // Get default address type.
279
281 virtual CAmount getMaxTxFee() = 0;
282
283 // Remove wallet.
284 virtual void remove() = 0;
285
287 using UnloadFn = std::function<void()>;
288 virtual std::unique_ptr<Handler> handleUnload(UnloadFn fn) = 0;
289
291 using ShowProgressFn = std::function<void(const std::string& title, int progress)>;
292 virtual std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) = 0;
293
295 using StatusChangedFn = std::function<void()>;
296 virtual std::unique_ptr<Handler> handleStatusChanged(StatusChangedFn fn) = 0;
297
299 using AddressBookChangedFn = std::function<void(const CTxDestination& address,
300 const std::string& label,
301 bool is_mine,
303 ChangeType status)>;
304 virtual std::unique_ptr<Handler> handleAddressBookChanged(AddressBookChangedFn fn) = 0;
305
307 using TransactionChangedFn = std::function<void(const Txid& txid, ChangeType status)>;
308 virtual std::unique_ptr<Handler> handleTransactionChanged(TransactionChangedFn fn) = 0;
309
311 using CanGetAddressesChangedFn = std::function<void()>;
312 virtual std::unique_ptr<Handler> handleCanGetAddressesChanged(CanGetAddressesChangedFn fn) = 0;
313
315 virtual wallet::CWallet* wallet() { return nullptr; }
316
318 virtual util::Result<std::string> exportWatchOnlyWallet(const fs::path& destination) = 0;
319};
320
325{
326public:
328 virtual util::Result<std::unique_ptr<Wallet>> createWallet(const std::string& name, const SecureString& passphrase, uint64_t wallet_creation_flags, std::vector<bilingual_str>& warnings) = 0;
329
331 virtual util::Result<std::unique_ptr<Wallet>> loadWallet(const std::string& name, std::vector<bilingual_str>& warnings) = 0;
332
334 virtual std::string getWalletDir() = 0;
335
337 virtual util::Result<std::unique_ptr<Wallet>> restoreWallet(const fs::path& backup_file, const std::string& wallet_name, std::vector<bilingual_str>& warnings, bool load_after_restore) = 0;
338
340 virtual util::Result<WalletMigrationResult> migrateWallet(const std::string& name, const SecureString& passphrase, bool load_wallet) = 0;
341
343 virtual bool isEncrypted(const std::string& wallet_name) = 0;
344
346 virtual std::vector<std::pair<std::string, std::string>> listWalletDir() = 0;
347
349 virtual std::vector<std::unique_ptr<Wallet>> getWallets() = 0;
350
354 using LoadWalletFn = std::function<void(std::unique_ptr<Wallet> wallet)>;
355 virtual std::unique_ptr<Handler> handleLoadWallet(LoadWalletFn fn) = 0;
356
358 virtual wallet::WalletContext* context() { return nullptr; }
359};
360
363{
367 std::string name;
368
370 : dest(std::move(dest)), is_mine(is_mine), purpose(std::move(purpose)), name(std::move(name))
371 {
372 }
373};
374
377{
383
384 bool balanceChanged(const WalletBalances& prev) const
385 {
386 return balance != prev.balance || unconfirmed_balance != prev.unconfirmed_balance ||
389 }
390};
391
392// Wallet transaction information.
394{
396 std::vector<bool> txin_is_mine;
397 std::vector<bool> txout_is_mine;
398 std::vector<bool> txout_is_change;
399 std::vector<CTxDestination> txout_address;
400 std::vector<bool> txout_address_is_mine;
404 int64_t time;
405 std::optional<std::string> from; // Deprecated
406 std::optional<std::string> message; // Deprecated
407 std::optional<std::string> comment;
408 std::optional<std::string> comment_to;
410
411 bool operator<(const WalletTx& a) const { return tx->GetHash() < a.tx->GetHash(); }
412};
413
416{
420 unsigned int time_received;
421 uint32_t lock_time;
426};
427
430{
432 int64_t time;
434 bool is_spent = false;
435};
436
439{
440 std::unique_ptr<Wallet> wallet;
441 std::optional<std::string> watchonly_wallet_name;
442 std::optional<std::string> solvables_wallet_name;
443 fs::path backup_path;
444};
445
448std::unique_ptr<Wallet> MakeWallet(wallet::WalletContext& context, const std::shared_ptr<wallet::CWallet>& wallet);
449
452std::unique_ptr<WalletLoader> MakeWalletLoader(Chain& chain, ArgsManager& args);
453
454} // namespace interfaces
455
456#endif // BITCOIN_INTERFACES_WALLET_H
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
Definition: addresstype.h:143
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
ArgsManager & args
Definition: bitcoind.cpp:280
A reference to a CKey: the Hash160 of its serialized public key.
Definition: pubkey.h:29
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:30
An encapsulated public key.
Definition: pubkey.h:43
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:406
An input of a transaction.
Definition: transaction.h:63
An output of a transaction.
Definition: transaction.h:141
A version of CTransaction with the PSBT format.
Definition: psbt.h:1239
Interface to let node manage chain clients (wallets, or maybe tools for monitoring and analysis in th...
Definition: chain.h:402
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition: chain.h:117
Interface for accessing a wallet.
Definition: wallet.h:65
virtual void commitTransaction(CTransactionRef tx, const std::vector< std::string > &messages)=0
Commit transaction.
virtual std::unique_ptr< Handler > handleShowProgress(ShowProgressFn fn)=0
virtual bool unlockCoin(const COutPoint &output)=0
Unlock coin.
virtual CoinsList listCoins()=0
virtual bool getAddress(const CTxDestination &dest, std::string *name, wallet::AddressPurpose *purpose)=0
Look up address in wallet, return whether exists.
virtual bool txinIsMine(const CTxIn &txin)=0
Return whether transaction input belongs to wallet.
virtual bool getPubKey(const CScript &script, const CKeyID &address, CPubKey &pub_key)=0
Get public key.
virtual std::vector< WalletAddress > getAddresses()=0
Get wallet address list.
std::function< void(const std::string &title, int progress)> ShowProgressFn
Register handler for show progress messages.
Definition: wallet.h:291
virtual util::Result< std::string > exportWatchOnlyWallet(const fs::path &destination)=0
Export a watchonly wallet file. See CWallet::ExportWatchOnlyWallet.
virtual bool encryptWallet(const SecureString &wallet_passphrase)=0
Encrypt wallet.
virtual std::unique_ptr< Handler > handleStatusChanged(StatusChangedFn fn)=0
virtual CAmount getMaxTxFee()=0
Get max tx fee.
virtual bool abandonTransaction(const Txid &txid)=0
Abandon transaction.
virtual std::vector< WalletTxOut > getCoins(const std::vector< COutPoint > &outputs)=0
Return wallet transaction output information.
virtual util::Expected< void, wallet::WalletError > changeWalletPassphrase(const SecureString &old_wallet_passphrase, const SecureString &new_wallet_passphrase)=0
Change wallet passphrase.
std::function< void()> UnloadFn
Register handler for unload message.
Definition: wallet.h:287
virtual bool isLocked()=0
Return whether wallet is locked.
virtual std::unique_ptr< Handler > handleAddressBookChanged(AddressBookChangedFn fn)=0
virtual std::unique_ptr< Handler > handleCanGetAddressesChanged(CanGetAddressesChangedFn fn)=0
virtual WalletTx getWalletTx(const Txid &txid)=0
Get transaction information.
virtual bool transactionCanBeAbandoned(const Txid &txid)=0
Return whether transaction can be abandoned.
virtual CAmount getAvailableBalance(const wallet::CCoinControl &coin_control)=0
Get available balance.
virtual std::set< WalletTx > getWalletTxs()=0
Get list of all wallet transactions.
std::function< void(const CTxDestination &address, const std::string &label, bool is_mine, wallet::AddressPurpose purpose, ChangeType status)> AddressBookChangedFn
Register handler for address book changed messages.
Definition: wallet.h:303
virtual CAmount getRequiredFee(unsigned int tx_bytes)=0
Get required fee.
virtual bool setAddressBook(const CTxDestination &dest, const std::string &name, const std::optional< wallet::AddressPurpose > &purpose)=0
Add or update address.
virtual wallet::CWallet * wallet()
Return pointer to internal wallet class, useful for testing.
Definition: wallet.h:315
virtual void abortRescan()=0
Abort a rescan.
std::function< void(const Txid &txid, ChangeType status)> TransactionChangedFn
Register handler for transaction changed messages.
Definition: wallet.h:307
virtual unsigned int getConfirmTarget()=0
Get tx confirm target.
virtual WalletTx getWalletTxDetails(const Txid &txid, WalletTxStatus &tx_status, std::vector< std::string > &messages, std::vector< std::string > &payment_requests, bool &in_mempool, int &num_blocks)=0
Get transaction details.
virtual std::string getWalletName()=0
Get wallet name.
virtual bool hasExternalSigner()=0
virtual bool tryGetBalances(WalletBalances &balances, uint256 &block_hash)=0
Get balances if possible without blocking.
virtual util::Expected< void, wallet::WalletError > unlock(const SecureString &wallet_passphrase)=0
Unlock wallet.
virtual bool isSpendable(const CTxDestination &dest)=0
Return whether wallet has private key.
virtual CAmount getBalance()=0
Get balance.
virtual CAmount getDebit(const CTxIn &txin)=0
Return debit amount if transaction input belongs to wallet.
virtual bool hdEnabled()=0
virtual bool isLockedCoin(const COutPoint &output)=0
Return whether coin is locked.
virtual bool signBumpTransaction(CMutableTransaction &mtx)=0
Sign bump transaction.
std::map< CTxDestination, std::vector< std::tuple< COutPoint, WalletTxOut > > > CoinsList
Return AvailableCoins + LockedCoins grouped by wallet address.
Definition: wallet.h:244
virtual WalletBalances getBalances()=0
Get balances.
virtual OutputType getDefaultAddressType()=0
virtual CAmount getCredit(const CTxOut &txout)=0
Return credit amount if transaction input belongs to wallet.
virtual bool backupWallet(const std::string &filename)=0
Back up wallet.
virtual bool createBumpTransaction(const Txid &txid, const wallet::CCoinControl &coin_control, std::vector< bilingual_str > &errors, CAmount &old_fee, CAmount &new_fee, CMutableTransaction &mtx)=0
Create bump transaction.
virtual std::unique_ptr< Handler > handleTransactionChanged(TransactionChangedFn fn)=0
virtual void listLockedCoins(std::vector< COutPoint > &outputs)=0
List locked coins.
virtual CAmount getMinimumFee(unsigned int tx_bytes, const wallet::CCoinControl &coin_control, std::optional< int > *returned_target, FeeReason *reason)=0
Get minimum fee.
virtual CTransactionRef getTx(const Txid &txid)=0
Get a transaction.
virtual util::Result< CTxDestination > getNewDestination(OutputType type, const std::string &label)=0
virtual std::unique_ptr< Handler > handleUnload(UnloadFn fn)=0
virtual ~Wallet()=default
virtual bool delAddressBook(const CTxDestination &dest)=0
virtual bool transactionCanBeBumped(const Txid &txid)=0
Return whether transaction can be bumped.
virtual util::Result< wallet::CreatedTransactionResult > createTransaction(const std::vector< wallet::CRecipient > &recipients, const wallet::CCoinControl &coin_control, bool sign, std::optional< unsigned int > change_pos)=0
Create transaction.
virtual void remove()=0
std::function< void()> StatusChangedFn
Register handler for status changed messages.
Definition: wallet.h:295
virtual util::Expected< CExtPubKey, wallet::WalletError > addHDKey(const std::optional< CExtKey > &key)=0
Generate and add a new HD key to the wallet.
virtual bool lockCoin(const COutPoint &output, bool write_to_db)=0
Lock coin.
virtual util::Result< void > displayAddress(const CTxDestination &dest)=0
Display address on external signer.
virtual bool setAddressReceiveRequest(const CTxDestination &dest, const std::string &id, const std::string &value)=0
Save or remove receive request.
virtual bool taprootEnabled()=0
virtual bool tryGetTxStatus(const Txid &txid, WalletTxStatus &tx_status, int &num_blocks, int64_t &block_time)=0
Try to get updated status for a particular transaction, if possible without blocking.
virtual bool txoutIsMine(const CTxOut &txout)=0
Return whether transaction output belongs to wallet.
virtual SigningResult signMessage(const std::string &message, const PKHash &pkhash, std::string &str_sig)=0
Sign message.
virtual std::optional< common::PSBTError > fillPSBT(const common::PSBTFillOptions &options, size_t *n_signed, PartiallySignedTransaction &psbtx, bool &complete)=0
Fill PSBT.
virtual bool privateKeysDisabled()=0
virtual std::vector< wallet::ImportResult > importDescriptors(std::vector< wallet::ImportDescriptorRequest > &requests)=0
Import descriptors.
virtual bool lock()=0
Lock wallet.
std::function< void()> CanGetAddressesChangedFn
Register handler for keypool changed messages.
Definition: wallet.h:311
virtual std::vector< std::string > getAddressReceiveRequests()=0
Get receive requests.
virtual bool canGetAddresses()=0
virtual bool isCrypted()=0
Return whether wallet is encrypted.
virtual bool commitBumpTransaction(const Txid &txid, CMutableTransaction &&mtx, std::vector< bilingual_str > &errors, Txid &bumped_txid)=0
Commit bump transaction.
Wallet chain client that in addition to having chain client methods for starting up,...
Definition: wallet.h:325
virtual util::Result< WalletMigrationResult > migrateWallet(const std::string &name, const SecureString &passphrase, bool load_wallet)=0
Migrate a wallet.
virtual util::Result< std::unique_ptr< Wallet > > restoreWallet(const fs::path &backup_file, const std::string &wallet_name, std::vector< bilingual_str > &warnings, bool load_after_restore)=0
Restore backup wallet.
virtual util::Result< std::unique_ptr< Wallet > > createWallet(const std::string &name, const SecureString &passphrase, uint64_t wallet_creation_flags, std::vector< bilingual_str > &warnings)=0
Create new wallet.
virtual std::string getWalletDir()=0
Return default wallet directory.
virtual std::vector< std::unique_ptr< Wallet > > getWallets()=0
Return interfaces for accessing wallets (if any).
virtual wallet::WalletContext * context()
Return pointer to internal context, useful for testing.
Definition: wallet.h:358
virtual std::vector< std::pair< std::string, std::string > > listWalletDir()=0
Return available wallets in wallet directory.
virtual util::Result< std::unique_ptr< Wallet > > loadWallet(const std::string &name, std::vector< bilingual_str > &warnings)=0
Load existing wallet.
virtual bool isEncrypted(const std::string &wallet_name)=0
Returns true if wallet stores encryption keys.
std::function< void(std::unique_ptr< Wallet > wallet)> LoadWalletFn
Register handler for load wallet messages.
Definition: wallet.h:354
virtual std::unique_ptr< Handler > handleLoadWallet(LoadWalletFn fn)=0
256-bit opaque blob.
Definition: uint256.h:196
The util::Expected class provides a standard way for low-level functions to return either error value...
Definition: expected.h:44
Coin Control Features.
Definition: coincontrol.h:83
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:318
is a home for simple enum and struct type definitions that can be used internally by functions in the...
static int sign(const secp256k1_context *ctx, struct signer_secrets *signer_secrets, struct signer *signer, const secp256k1_musig_keyagg_cache *cache, const unsigned char *msg32, unsigned char *sig64)
Definition: musig.c:106
std::unique_ptr< WalletLoader > MakeWalletLoader(Chain &chain, ArgsManager &args)
Return implementation of ChainClient interface for a wallet loader.
Definition: dummywallet.cpp:60
std::unique_ptr< Wallet > MakeWallet(wallet::WalletContext &context, const std::shared_ptr< wallet::CWallet > &wallet)
Return implementation of Wallet interface.
Definition: interfaces.cpp:688
AddressPurpose
Address purpose field that has been been stored with wallet sending and receiving addresses since BIP...
Definition: types.h:44
OutputType
Definition: outputtype.h:18
std::shared_ptr< const CTransaction > CTransactionRef
Definition: transaction.h:417
const char * name
Definition: rest.cpp:71
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: secure.h:53
SigningResult
Definition: signmessage.h:43
Definition: key.h:238
A mutable version of CTransaction.
Definition: transaction.h:372
Bilingual messages:
Definition: translation.h:24
Instructions for how a PSBT should be signed or filled with information.
Definition: types.h:31
Information about one wallet address.
Definition: wallet.h:363
CTxDestination dest
Definition: wallet.h:364
wallet::AddressPurpose purpose
Definition: wallet.h:366
WalletAddress(CTxDestination dest, bool is_mine, wallet::AddressPurpose purpose, std::string name)
Definition: wallet.h:369
Collection of wallet balances.
Definition: wallet.h:377
bool balanceChanged(const WalletBalances &prev) const
Definition: wallet.h:384
Migrated wallet info.
Definition: wallet.h:439
std::optional< std::string > watchonly_wallet_name
Definition: wallet.h:441
std::optional< std::string > solvables_wallet_name
Definition: wallet.h:442
std::unique_ptr< Wallet > wallet
Definition: wallet.h:440
std::vector< bool > txin_is_mine
Definition: wallet.h:396
std::optional< std::string > comment
Definition: wallet.h:407
std::vector< CTxDestination > txout_address
Definition: wallet.h:399
std::vector< bool > txout_address_is_mine
Definition: wallet.h:400
CTransactionRef tx
Definition: wallet.h:395
std::optional< std::string > comment_to
Definition: wallet.h:408
std::vector< bool > txout_is_change
Definition: wallet.h:398
std::vector< bool > txout_is_mine
Definition: wallet.h:397
std::optional< std::string > message
Definition: wallet.h:406
std::optional< std::string > from
Definition: wallet.h:405
bool operator<(const WalletTx &a) const
Definition: wallet.h:411
Wallet transaction output.
Definition: wallet.h:430
Updated transaction status.
Definition: wallet.h:416
unsigned int time_received
Definition: wallet.h:420
WalletContext struct containing references to state shared between CWallet instances,...
Definition: context.h:36
ChangeType
General change type (added, updated, removed).
Definition: ui_change_type.h:9
FeeReason
Definition: fees.h:24
is a home for public enum and struct type definitions that are used by internally by wallet code,...
WalletContext context