Bitcoin Core  24.99.0
P2P Digital Currency
Classes | Namespaces | Typedefs | Functions | Variables
wallet.h File Reference
#include <consensus/amount.h>
#include <fs.h>
#include <interfaces/chain.h>
#include <interfaces/handler.h>
#include <outputtype.h>
#include <policy/feerate.h>
#include <psbt.h>
#include <tinyformat.h>
#include <util/hasher.h>
#include <util/message.h>
#include <util/result.h>
#include <util/strencodings.h>
#include <util/string.h>
#include <util/system.h>
#include <util/ui_change_type.h>
#include <validationinterface.h>
#include <wallet/crypter.h>
#include <wallet/scriptpubkeyman.h>
#include <wallet/transaction.h>
#include <wallet/walletdb.h>
#include <wallet/walletutil.h>
#include <algorithm>
#include <atomic>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <stdexcept>
#include <stdint.h>
#include <string>
#include <utility>
#include <unordered_map>
#include <vector>
#include <boost/signals2/signal.hpp>
Include dependency graph for wallet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  wallet::ReserveDestination
 A wrapper to reserve an address from a wallet. More...
 
class  wallet::CAddressBookData
 Address book data. More...
 
struct  wallet::CRecipient
 
class  wallet::CWallet
 A CWallet maintains a set of transactions and balances, and provides the ability to create new transactions. More...
 
struct  wallet::CWallet::ScanResult
 
struct  wallet::CWallet::AddrBookFilter
 
class  wallet::WalletRescanReserver
 RAII object to check and reserve a wallet rescan. More...
 
struct  wallet::MigrationResult
 

Namespaces

 wallet
 

Typedefs

using LoadWalletFn = std::function< void(std::unique_ptr< interfaces::Wallet > wallet)>
 

Functions

void wallet::UnloadWallet (std::shared_ptr< CWallet > &&wallet)
 Explicitly unload and delete the wallet. More...
 
bool wallet::AddWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet)
 
bool wallet::RemoveWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start, std::vector< bilingual_str > &warnings)
 
bool wallet::RemoveWallet (WalletContext &context, const std::shared_ptr< CWallet > &wallet, std::optional< bool > load_on_start)
 
std::vector< std::shared_ptr< CWallet > > wallet::GetWallets (WalletContext &context)
 
std::shared_ptr< CWallet > wallet::GetDefaultWallet (WalletContext &context, size_t &count)
 
std::shared_ptr< CWallet > wallet::GetWallet (WalletContext &context, const std::string &name)
 
std::shared_ptr< CWallet > wallet::LoadWallet (WalletContext &context, const std::string &name, std::optional< bool > load_on_start, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
 
std::shared_ptr< CWallet > wallet::CreateWallet (WalletContext &context, const std::string &name, std::optional< bool > load_on_start, DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
 
std::shared_ptr< CWallet > wallet::RestoreWallet (WalletContext &context, const fs::path &backup_file, const std::string &wallet_name, std::optional< bool > load_on_start, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
 
std::unique_ptr< interfaces::Handlerwallet::HandleLoadWallet (WalletContext &context, LoadWalletFn load_wallet)
 
void wallet::NotifyWalletLoaded (WalletContext &context, const std::shared_ptr< CWallet > &wallet)
 
std::unique_ptr< WalletDatabase > wallet::MakeWalletDatabase (const std::string &name, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error_string)
 
void wallet::MaybeResendWalletTxs (WalletContext &context)
 Called periodically by the schedule thread. More...
 
bool wallet::AddWalletSetting (interfaces::Chain &chain, const std::string &wallet_name)
 Add wallet name to persistent configuration so it will be loaded on startup. More...
 
bool wallet::RemoveWalletSetting (interfaces::Chain &chain, const std::string &wallet_name)
 Remove wallet name from persistent configuration so it will not be loaded on startup. More...
 
bool wallet::DummySignInput (const SigningProvider &provider, CTxIn &tx_in, const CTxOut &txout, const CCoinControl *coin_control)
 
bool wallet::FillInputToWeight (CTxIn &txin, int64_t target_weight)
 
util::Result< MigrationResult > wallet::MigrateLegacyToDescriptor (std::shared_ptr< CWallet > &&wallet, WalletContext &context)
 Do all steps to migrate a legacy wallet to a descriptor wallet. More...
 

Variables

constexpr CAmount wallet::DEFAULT_PAY_TX_FEE = 0
 -paytxfee default More...
 
static const CAmount wallet::DEFAULT_FALLBACK_FEE = 0
 -fallbackfee default More...
 
static const CAmount wallet::DEFAULT_DISCARD_FEE = 10000
 -discardfee default More...
 
static const CAmount wallet::DEFAULT_TRANSACTION_MINFEE = 1000
 -mintxfee default More...
 
static const CAmount wallet::DEFAULT_CONSOLIDATE_FEERATE {10000}
 -consolidatefeerate default More...
 
static const CAmount wallet::DEFAULT_MAX_AVOIDPARTIALSPEND_FEE = 0
 maximum fee increase allowed to do partial spend avoidance, even for nodes with this feature disabled by default More...
 
constexpr CAmount wallet::HIGH_APS_FEE {COIN / 10000}
 discourage APS fee higher than this amount More...
 
static const CAmount wallet::WALLET_INCREMENTAL_RELAY_FEE = 5000
 minimum recommended increment for replacement txs More...
 
static const bool wallet::DEFAULT_SPEND_ZEROCONF_CHANGE = true
 Default for -spendzeroconfchange. More...
 
static const bool wallet::DEFAULT_WALLET_REJECT_LONG_CHAINS {true}
 Default for -walletrejectlongchains. More...
 
static const unsigned int wallet::DEFAULT_TX_CONFIRM_TARGET = 6
 -txconfirmtarget default More...
 
static const bool wallet::DEFAULT_WALLET_RBF = true
 -walletrbf default More...
 
static const bool wallet::DEFAULT_WALLETBROADCAST = true
 
static const bool wallet::DEFAULT_DISABLE_WALLET = false
 
static const bool wallet::DEFAULT_WALLETCROSSCHAIN = false
 
constexpr CAmount wallet::DEFAULT_TRANSACTION_MAXFEE {COIN / 10}
 -maxtxfee default More...
 
constexpr CAmount wallet::HIGH_TX_FEE_PER_KB {COIN / 100}
 Discourage users to set fees higher than this amount (in satoshis) per kB. More...
 
constexpr CAmount wallet::HIGH_MAX_TX_FEE {100 * HIGH_TX_FEE_PER_KB}
 -maxtxfee will warn if called with a higher fee than this amount (in satoshis) More...
 
static constexpr size_t wallet::DUMMY_NESTED_P2WPKH_INPUT_SIZE = 91
 Pre-calculated constants for input size estimation in virtual size More...
 
constexpr OutputType wallet::DEFAULT_ADDRESS_TYPE {OutputType::BECH32}
 Default for -addresstype. More...
 
static constexpr uint64_t wallet::KNOWN_WALLET_FLAGS
 
static constexpr uint64_t wallet::MUTABLE_WALLET_FLAGS
 
static const std::map< std::string, WalletFlags > wallet::WALLET_FLAG_MAP
 

Typedef Documentation

◆ LoadWalletFn

using LoadWalletFn = std::function<void(std::unique_ptr<interfaces::Wallet> wallet)>

Definition at line 47 of file wallet.h.