PIVX Core  5.6.99
P2P Digital Currency
wallet.h
Go to the documentation of this file.
1 // Copyright (c) 2018-2020 The Bitcoin Core developers
2 // Copyright (c) 2020-2021 The PIVX Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or https://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef PIVX_INTERFACES_WALLET_H
7 #define PIVX_INTERFACES_WALLET_H
8 
9 #include <amount.h>
10 #include "wallet/wallet.h"
11 
12 namespace interfaces {
13 
16 {
20  bool have_watch_only{false};
24  bool have_coldstaking{false};
29 
30  bool balanceChanged(const WalletBalances& prev) const
31  {
32  return balance != prev.balance || unconfirmed_balance != prev.unconfirmed_balance ||
38  }
39 };
40 
41 class Wallet {
42 public:
43  explicit Wallet(CWallet& wallet) : m_wallet(wallet) { };
44  // Retrieve all the wallet balances
46 
47 private:
49 };
50 
51 
52 } // namespace interfaces
53 
54 #endif // PIVX_INTERFACES_WALLET_H
int64_t CAmount
Amount in PIV (Can be negative)
Definition: amount.h:13
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
Definition: wallet.h:577
CWallet & m_wallet
Definition: wallet.h:48
WalletBalances getBalances()
Definition: wallet.cpp:11
Wallet(CWallet &wallet)
Definition: wallet.h:43
Collection of wallet balances.
Definition: wallet.h:16
CAmount watch_only_balance
Definition: wallet.h:21
CAmount unconfirmed_balance
Definition: wallet.h:18
CAmount unconfirmed_shielded_balance
Definition: wallet.h:28
CAmount unconfirmed_watch_only_balance
Definition: wallet.h:22
CAmount immature_watch_only_balance
Definition: wallet.h:23
CAmount coldstaked_balance
Definition: wallet.h:26
bool balanceChanged(const WalletBalances &prev) const
Definition: wallet.h:30