Bitcoin Core  24.99.0
P2P Digital Currency
wallet.h
Go to the documentation of this file.
1 // Copyright (c) 2018-2022 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 <consensus/amount.h>
9 #include <fs.h>
10 #include <interfaces/chain.h> // For ChainClient
11 #include <pubkey.h> // For CKeyID and CScriptID (definitions needed in CTxDestination instantiation)
12 #include <script/standard.h> // For CTxDestination
13 #include <support/allocators/secure.h> // For SecureString
14 #include <util/message.h>
15 #include <util/result.h>
16 #include <util/ui_change_type.h>
17 
18 #include <cstdint>
19 #include <functional>
20 #include <map>
21 #include <memory>
22 #include <string>
23 #include <tuple>
24 #include <type_traits>
25 #include <utility>
26 #include <vector>
27 
28 class CFeeRate;
29 class CKey;
30 enum class FeeReason;
31 enum class OutputType;
32 enum class TransactionError;
34 struct bilingual_str;
35 namespace wallet {
36 class CCoinControl;
37 class CWallet;
38 enum isminetype : unsigned int;
39 struct CRecipient;
40 struct WalletContext;
41 using isminefilter = std::underlying_type<isminetype>::type;
42 } // namespace wallet
43 
44 namespace interfaces {
45 
46 class Handler;
47 struct WalletAddress;
48 struct WalletBalances;
49 struct WalletTx;
50 struct WalletTxOut;
51 struct WalletTxStatus;
52 
53 using WalletOrderForm = std::vector<std::pair<std::string, std::string>>;
54 using WalletValueMap = std::map<std::string, std::string>;
55 
57 class Wallet
58 {
59 public:
60  virtual ~Wallet() {}
61 
63  virtual bool encryptWallet(const SecureString& wallet_passphrase) = 0;
64 
66  virtual bool isCrypted() = 0;
67 
69  virtual bool lock() = 0;
70 
72  virtual bool unlock(const SecureString& wallet_passphrase) = 0;
73 
75  virtual bool isLocked() = 0;
76 
78  virtual bool changeWalletPassphrase(const SecureString& old_wallet_passphrase,
79  const SecureString& new_wallet_passphrase) = 0;
80 
82  virtual void abortRescan() = 0;
83 
85  virtual bool backupWallet(const std::string& filename) = 0;
86 
88  virtual std::string getWalletName() = 0;
89 
90  // Get a new address.
91  virtual util::Result<CTxDestination> getNewDestination(const OutputType type, const std::string& label) = 0;
92 
94  virtual bool getPubKey(const CScript& script, const CKeyID& address, CPubKey& pub_key) = 0;
95 
97  virtual SigningResult signMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) = 0;
98 
100  virtual bool isSpendable(const CTxDestination& dest) = 0;
101 
103  virtual bool haveWatchOnly() = 0;
104 
106  virtual bool setAddressBook(const CTxDestination& dest, const std::string& name, const std::string& purpose) = 0;
107 
108  // Remove address.
109  virtual bool delAddressBook(const CTxDestination& dest) = 0;
110 
112  virtual bool getAddress(const CTxDestination& dest,
113  std::string* name,
114  wallet::isminetype* is_mine,
115  std::string* purpose) = 0;
116 
118  virtual std::vector<WalletAddress> getAddresses() const = 0;
119 
121  virtual std::vector<std::string> getAddressReceiveRequests() = 0;
122 
124  virtual bool setAddressReceiveRequest(const CTxDestination& dest, const std::string& id, const std::string& value) = 0;
125 
127  virtual bool displayAddress(const CTxDestination& dest) = 0;
128 
130  virtual bool lockCoin(const COutPoint& output, const bool write_to_db) = 0;
131 
133  virtual bool unlockCoin(const COutPoint& output) = 0;
134 
136  virtual bool isLockedCoin(const COutPoint& output) = 0;
137 
139  virtual void listLockedCoins(std::vector<COutPoint>& outputs) = 0;
140 
142  virtual util::Result<CTransactionRef> createTransaction(const std::vector<wallet::CRecipient>& recipients,
143  const wallet::CCoinControl& coin_control,
144  bool sign,
145  int& change_pos,
146  CAmount& fee) = 0;
147 
150  WalletValueMap value_map,
151  WalletOrderForm order_form) = 0;
152 
154  virtual bool transactionCanBeAbandoned(const uint256& txid) = 0;
155 
157  virtual bool abandonTransaction(const uint256& txid) = 0;
158 
160  virtual bool transactionCanBeBumped(const uint256& txid) = 0;
161 
163  virtual bool createBumpTransaction(const uint256& txid,
164  const wallet::CCoinControl& coin_control,
165  std::vector<bilingual_str>& errors,
166  CAmount& old_fee,
167  CAmount& new_fee,
168  CMutableTransaction& mtx) = 0;
169 
171  virtual bool signBumpTransaction(CMutableTransaction& mtx) = 0;
172 
174  virtual bool commitBumpTransaction(const uint256& txid,
175  CMutableTransaction&& mtx,
176  std::vector<bilingual_str>& errors,
177  uint256& bumped_txid) = 0;
178 
180  virtual CTransactionRef getTx(const uint256& txid) = 0;
181 
183  virtual WalletTx getWalletTx(const uint256& txid) = 0;
184 
186  virtual std::set<WalletTx> getWalletTxs() = 0;
187 
189  virtual bool tryGetTxStatus(const uint256& txid,
190  WalletTxStatus& tx_status,
191  int& num_blocks,
192  int64_t& block_time) = 0;
193 
195  virtual WalletTx getWalletTxDetails(const uint256& txid,
196  WalletTxStatus& tx_status,
197  WalletOrderForm& order_form,
198  bool& in_mempool,
199  int& num_blocks) = 0;
200 
202  virtual TransactionError fillPSBT(int sighash_type,
203  bool sign,
204  bool bip32derivs,
205  size_t* n_signed,
207  bool& complete) = 0;
208 
211 
213  virtual bool tryGetBalances(WalletBalances& balances, uint256& block_hash) = 0;
214 
216  virtual CAmount getBalance() = 0;
217 
219  virtual CAmount getAvailableBalance(const wallet::CCoinControl& coin_control) = 0;
220 
222  virtual wallet::isminetype txinIsMine(const CTxIn& txin) = 0;
223 
225  virtual wallet::isminetype txoutIsMine(const CTxOut& txout) = 0;
226 
228  virtual CAmount getDebit(const CTxIn& txin, wallet::isminefilter filter) = 0;
229 
231  virtual CAmount getCredit(const CTxOut& txout, wallet::isminefilter filter) = 0;
232 
235  using CoinsList = std::map<CTxDestination, std::vector<std::tuple<COutPoint, WalletTxOut>>>;
236  virtual CoinsList listCoins() = 0;
237 
239  virtual std::vector<WalletTxOut> getCoins(const std::vector<COutPoint>& outputs) = 0;
240 
242  virtual CAmount getRequiredFee(unsigned int tx_bytes) = 0;
243 
245  virtual CAmount getMinimumFee(unsigned int tx_bytes,
246  const wallet::CCoinControl& coin_control,
247  int* returned_target,
248  FeeReason* reason) = 0;
249 
251  virtual unsigned int getConfirmTarget() = 0;
252 
253  // Return whether HD enabled.
254  virtual bool hdEnabled() = 0;
255 
256  // Return whether the wallet is blank.
257  virtual bool canGetAddresses() = 0;
258 
259  // Return whether private keys enabled.
260  virtual bool privateKeysDisabled() = 0;
261 
262  // Return whether the wallet contains a Taproot scriptPubKeyMan
263  virtual bool taprootEnabled() = 0;
264 
265  // Return whether wallet uses an external signer.
266  virtual bool hasExternalSigner() = 0;
267 
268  // Get default address type.
270 
273 
274  // Remove wallet.
275  virtual void remove() = 0;
276 
278  virtual bool isLegacy() = 0;
279 
281  using UnloadFn = std::function<void()>;
282  virtual std::unique_ptr<Handler> handleUnload(UnloadFn fn) = 0;
283 
285  using ShowProgressFn = std::function<void(const std::string& title, int progress)>;
286  virtual std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) = 0;
287 
289  using StatusChangedFn = std::function<void()>;
290  virtual std::unique_ptr<Handler> handleStatusChanged(StatusChangedFn fn) = 0;
291 
293  using AddressBookChangedFn = std::function<void(const CTxDestination& address,
294  const std::string& label,
295  bool is_mine,
296  const std::string& purpose,
297  ChangeType status)>;
298  virtual std::unique_ptr<Handler> handleAddressBookChanged(AddressBookChangedFn fn) = 0;
299 
301  using TransactionChangedFn = std::function<void(const uint256& txid, ChangeType status)>;
302  virtual std::unique_ptr<Handler> handleTransactionChanged(TransactionChangedFn fn) = 0;
303 
305  using WatchOnlyChangedFn = std::function<void(bool have_watch_only)>;
306  virtual std::unique_ptr<Handler> handleWatchOnlyChanged(WatchOnlyChangedFn fn) = 0;
307 
309  using CanGetAddressesChangedFn = std::function<void()>;
310  virtual std::unique_ptr<Handler> handleCanGetAddressesChanged(CanGetAddressesChangedFn fn) = 0;
311 
313  virtual wallet::CWallet* wallet() { return nullptr; }
314 };
315 
319 class WalletLoader : public ChainClient
320 {
321 public:
323  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;
324 
326  virtual util::Result<std::unique_ptr<Wallet>> loadWallet(const std::string& name, std::vector<bilingual_str>& warnings) = 0;
327 
329  virtual std::string getWalletDir() = 0;
330 
332  virtual util::Result<std::unique_ptr<Wallet>> restoreWallet(const fs::path& backup_file, const std::string& wallet_name, std::vector<bilingual_str>& warnings) = 0;
333 
335  virtual std::vector<std::string> listWalletDir() = 0;
336 
338  virtual std::vector<std::unique_ptr<Wallet>> getWallets() = 0;
339 
343  using LoadWalletFn = std::function<void(std::unique_ptr<Wallet> wallet)>;
344  virtual std::unique_ptr<Handler> handleLoadWallet(LoadWalletFn fn) = 0;
345 
347  virtual wallet::WalletContext* context() { return nullptr; }
348 };
349 
352 {
355  std::string name;
356  std::string purpose;
357 
359  : dest(std::move(dest)), is_mine(is_mine), name(std::move(name)), purpose(std::move(purpose))
360  {
361  }
362 };
363 
366 {
370  bool have_watch_only = false;
374 
375  bool balanceChanged(const WalletBalances& prev) const
376  {
377  return balance != prev.balance || unconfirmed_balance != prev.unconfirmed_balance ||
381  }
382 };
383 
384 // Wallet transaction information.
385 struct WalletTx
386 {
388  std::vector<wallet::isminetype> txin_is_mine;
389  std::vector<wallet::isminetype> txout_is_mine;
390  std::vector<CTxDestination> txout_address;
391  std::vector<wallet::isminetype> txout_address_is_mine;
395  int64_t time;
396  std::map<std::string, std::string> value_map;
398 
399  bool operator<(const WalletTx& a) const { return tx->GetHash() < a.tx->GetHash(); }
400 };
401 
404 {
408  unsigned int time_received;
409  uint32_t lock_time;
414 };
415 
418 {
420  int64_t time;
422  bool is_spent = false;
423 };
424 
427 std::unique_ptr<Wallet> MakeWallet(wallet::WalletContext& context, const std::shared_ptr<wallet::CWallet>& wallet);
428 
431 std::unique_ptr<WalletLoader> MakeWalletLoader(Chain& chain, ArgsManager& args);
432 
433 } // namespace interfaces
434 
435 #endif // BITCOIN_INTERFACES_WALLET_H
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
Fee rate in satoshis per kilovirtualbyte: CAmount / kvB.
Definition: feerate.h:33
An encapsulated private key.
Definition: key.h:27
A reference to a CKey: the Hash160 of its serialized public key.
Definition: pubkey.h:24
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:36
An encapsulated public key.
Definition: pubkey.h:34
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:411
An input of a transaction.
Definition: transaction.h:75
An output of a transaction.
Definition: transaction.h:158
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
Definition: fs.h:31
Interface to let node manage chain clients (wallets, or maybe tools for monitoring and analysis in th...
Definition: chain.h:333
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition: chain.h:119
Interface for accessing a wallet.
Definition: wallet.h:58
virtual bool unlockCoin(const COutPoint &output)=0
Unlock coin.
virtual CoinsList listCoins()=0
virtual CAmount getCredit(const CTxOut &txout, wallet::isminefilter filter)=0
Return credit amount if transaction input belongs to wallet.
virtual bool getPubKey(const CScript &script, const CKeyID &address, CPubKey &pub_key)=0
Get public key.
std::function< void(const std::string &title, int progress)> ShowProgressFn
Register handler for show progress messages.
Definition: wallet.h:285
virtual WalletTx getWalletTx(const uint256 &txid)=0
Get transaction information.
virtual bool tryGetTxStatus(const uint256 &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 encryptWallet(const SecureString &wallet_passphrase)=0
Encrypt wallet.
virtual wallet::isminetype txoutIsMine(const CTxOut &txout)=0
Return whether transaction output belongs to wallet.
virtual std::vector< WalletAddress > getAddresses() const =0
Get wallet address list.
std::function< void(bool have_watch_only)> WatchOnlyChangedFn
Register handler for watchonly changed messages.
Definition: wallet.h:305
virtual bool isLegacy()=0
Return whether is a legacy wallet.
std::function< void(const uint256 &txid, ChangeType status)> TransactionChangedFn
Register handler for transaction changed messages.
Definition: wallet.h:301
std::function< void()> UnloadFn
Register handler for unload message.
Definition: wallet.h:281
virtual TransactionError fillPSBT(int sighash_type, bool sign, bool bip32derivs, size_t *n_signed, PartiallySignedTransaction &psbtx, bool &complete)=0
Fill PSBT.
virtual bool isLocked()=0
Return whether wallet is locked.
virtual std::unique_ptr< Handler > handleCanGetAddressesChanged(CanGetAddressesChangedFn fn)=0
virtual util::Result< CTxDestination > getNewDestination(const OutputType type, const std::string &label)=0
virtual CAmount getAvailableBalance(const wallet::CCoinControl &coin_control)=0
Get available balance.
virtual std::unique_ptr< Handler > handleWatchOnlyChanged(WatchOnlyChangedFn fn)=0
virtual wallet::isminetype txinIsMine(const CTxIn &txin)=0
Return whether transaction input belongs to wallet.
virtual util::Result< CTransactionRef > createTransaction(const std::vector< wallet::CRecipient > &recipients, const wallet::CCoinControl &coin_control, bool sign, int &change_pos, CAmount &fee)=0
Create transaction.
virtual CAmount getRequiredFee(unsigned int tx_bytes)=0
Get required fee.
virtual std::vector< WalletTxOut > getCoins(const std::vector< COutPoint > &outputs)=0
Return wallet transaction output information.
virtual std::set< WalletTx > getWalletTxs()=0
Get list of all wallet transactions.
virtual void abortRescan()=0
Abort a rescan.
virtual unsigned int getConfirmTarget()=0
Get tx confirm target.
virtual ~Wallet()
Definition: wallet.h:60
virtual bool unlock(const SecureString &wallet_passphrase)=0
Unlock wallet.
virtual std::vector< std::string > getAddressReceiveRequests()=0
Get receive requests.
virtual bool changeWalletPassphrase(const SecureString &old_wallet_passphrase, const SecureString &new_wallet_passphrase)=0
Change wallet passphrase.
virtual std::string getWalletName()=0
Get wallet name.
virtual bool hasExternalSigner()=0
virtual bool setAddressBook(const CTxDestination &dest, const std::string &name, const std::string &purpose)=0
Add or update address.
virtual bool tryGetBalances(WalletBalances &balances, uint256 &block_hash)=0
Get balances if possible without blocking.
virtual CAmount getDefaultMaxTxFee()=0
Get max tx fee.
virtual bool isSpendable(const CTxDestination &dest)=0
Return whether wallet has private key.
virtual CAmount getBalance()=0
Get balance.
virtual bool displayAddress(const CTxDestination &dest)=0
Display address on external signer.
virtual bool hdEnabled()=0
virtual std::unique_ptr< Handler > handleShowProgress(ShowProgressFn fn)=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:235
virtual WalletBalances getBalances()=0
Get balances.
virtual OutputType getDefaultAddressType()=0
virtual std::unique_ptr< Handler > handleUnload(UnloadFn fn)=0
std::function< void(const CTxDestination &address, const std::string &label, bool is_mine, const std::string &purpose, ChangeType status)> AddressBookChangedFn
Register handler for address book changed messages.
Definition: wallet.h:297
virtual bool transactionCanBeBumped(const uint256 &txid)=0
Return whether transaction can be bumped.
virtual bool backupWallet(const std::string &filename)=0
Back up wallet.
virtual void commitTransaction(CTransactionRef tx, WalletValueMap value_map, WalletOrderForm order_form)=0
Commit transaction.
virtual CTransactionRef getTx(const uint256 &txid)=0
Get a transaction.
virtual void listLockedCoins(std::vector< COutPoint > &outputs)=0
List locked coins.
virtual bool lockCoin(const COutPoint &output, const bool write_to_db)=0
Lock coin.
virtual bool createBumpTransaction(const uint256 &txid, const wallet::CCoinControl &coin_control, std::vector< bilingual_str > &errors, CAmount &old_fee, CAmount &new_fee, CMutableTransaction &mtx)=0
Create bump transaction.
virtual WalletTx getWalletTxDetails(const uint256 &txid, WalletTxStatus &tx_status, WalletOrderForm &order_form, bool &in_mempool, int &num_blocks)=0
Get transaction details.
virtual bool delAddressBook(const CTxDestination &dest)=0
virtual void remove()=0
virtual bool commitBumpTransaction(const uint256 &txid, CMutableTransaction &&mtx, std::vector< bilingual_str > &errors, uint256 &bumped_txid)=0
Commit bump transaction.
std::function< void()> StatusChangedFn
Register handler for status changed messages.
Definition: wallet.h:289
virtual bool transactionCanBeAbandoned(const uint256 &txid)=0
Return whether transaction can be abandoned.
virtual std::unique_ptr< Handler > handleStatusChanged(StatusChangedFn fn)=0
virtual bool haveWatchOnly()=0
Return whether wallet has watch only keys.
virtual CAmount getDebit(const CTxIn &txin, wallet::isminefilter filter)=0
Return debit amount if transaction input belongs to wallet.
virtual wallet::CWallet * wallet()
Return pointer to internal wallet class, useful for testing.
Definition: wallet.h:313
virtual std::unique_ptr< Handler > handleAddressBookChanged(AddressBookChangedFn fn)=0
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 SigningResult signMessage(const std::string &message, const PKHash &pkhash, std::string &str_sig)=0
Sign message.
virtual bool abandonTransaction(const uint256 &txid)=0
Abandon transaction.
virtual bool privateKeysDisabled()=0
virtual bool lock()=0
Lock wallet.
std::function< void()> CanGetAddressesChangedFn
Register handler for keypool changed messages.
Definition: wallet.h:309
virtual CAmount getMinimumFee(unsigned int tx_bytes, const wallet::CCoinControl &coin_control, int *returned_target, FeeReason *reason)=0
Get minimum fee.
virtual bool getAddress(const CTxDestination &dest, std::string *name, wallet::isminetype *is_mine, std::string *purpose)=0
Look up address in wallet, return whether exists.
virtual bool canGetAddresses()=0
virtual bool isCrypted()=0
Return whether wallet is encrypted.
virtual std::unique_ptr< Handler > handleTransactionChanged(TransactionChangedFn fn)=0
Wallet chain client that in addition to having chain client methods for starting up,...
Definition: wallet.h:320
virtual std::string getWalletDir()=0
Return default wallet directory.
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::vector< std::unique_ptr< Wallet > > getWallets()=0
Return interfaces for accessing wallets (if any).
virtual std::vector< 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 util::Result< std::unique_ptr< Wallet > > restoreWallet(const fs::path &backup_file, const std::string &wallet_name, std::vector< bilingual_str > &warnings)=0
Restore backup wallet.
virtual wallet::WalletContext * context()
Return pointer to internal context, useful for testing.
Definition: wallet.h:347
virtual std::unique_ptr< Handler > handleLoadWallet(LoadWalletFn fn)=0
std::function< void(std::unique_ptr< Wallet > wallet)> LoadWalletFn
Register handler for load wallet messages.
Definition: wallet.h:343
256-bit opaque blob.
Definition: uint256.h:119
Coin Control Features.
Definition: coincontrol.h:30
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:237
TransactionError
Definition: error.h:22
SigningResult
Definition: message.h:43
std::unique_ptr< WalletLoader > MakeWalletLoader(Chain &chain, ArgsManager &args)
Return implementation of ChainClient interface for a wallet loader.
Definition: dummywallet.cpp:62
std::vector< std::pair< std::string, std::string > > WalletOrderForm
Definition: wallet.h:53
std::unique_ptr< Wallet > MakeWallet(wallet::WalletContext &context, const std::shared_ptr< wallet::CWallet > &wallet)
Return implementation of Wallet interface.
Definition: interfaces.cpp:630
std::map< std::string, std::string > WalletValueMap
Definition: wallet.h:54
Definition: node.h:39
std::underlying_type< isminetype >::type isminefilter
used for bitflags of isminetype
Definition: wallet.h:41
isminetype
IsMine() return codes, which depend on ScriptPubKeyMan implementation.
Definition: ismine.h:41
WalletContext context
ArgsManager args
OutputType
Definition: outputtype.h:17
FeeReason
Definition: fees.h:44
std::shared_ptr< const CTransaction > CTransactionRef
Definition: transaction.h:421
const char * name
Definition: rest.cpp:46
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: secure.h:59
std::variant< CNoDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown > CTxDestination
A txout script template with a specific destination.
Definition: standard.h:149
A mutable version of CTransaction.
Definition: transaction.h:380
A version of CTransaction with the PSBT format.
Definition: psbt.h:947
Bilingual messages:
Definition: translation.h:18
Information about one wallet address.
Definition: wallet.h:352
CTxDestination dest
Definition: wallet.h:353
wallet::isminetype is_mine
Definition: wallet.h:354
std::string purpose
Definition: wallet.h:356
WalletAddress(CTxDestination dest, wallet::isminetype is_mine, std::string name, std::string purpose)
Definition: wallet.h:358
Collection of wallet balances.
Definition: wallet.h:366
CAmount unconfirmed_watch_only_balance
Definition: wallet.h:372
CAmount immature_watch_only_balance
Definition: wallet.h:373
bool balanceChanged(const WalletBalances &prev) const
Definition: wallet.h:375
std::vector< wallet::isminetype > txin_is_mine
Definition: wallet.h:388
std::vector< CTxDestination > txout_address
Definition: wallet.h:390
std::vector< wallet::isminetype > txout_address_is_mine
Definition: wallet.h:391
CTransactionRef tx
Definition: wallet.h:387
std::map< std::string, std::string > value_map
Definition: wallet.h:396
bool operator<(const WalletTx &a) const
Definition: wallet.h:399
std::vector< wallet::isminetype > txout_is_mine
Definition: wallet.h:389
Wallet transaction output.
Definition: wallet.h:418
Updated transaction status.
Definition: wallet.h:404
unsigned int time_received
Definition: wallet.h:408
WalletContext struct containing references to state shared between CWallet instances,...
Definition: context.h:35
ChangeType
General change type (added, updated, removed).
Definition: ui_change_type.h:9