Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
wallet.h File Reference
#include <addresstype.h>
#include <consensus/amount.h>
#include <interfaces/chain.h>
#include <interfaces/handler.h>
#include <kernel/cs_main.h>
#include <logging.h>
#include <node/types.h>
#include <outputtype.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
#include <primitives/transaction_identifier.h>
#include <script/interpreter.h>
#include <script/script.h>
#include <support/allocators/secure.h>
#include <sync.h>
#include <tinyformat.h>
#include <uint256.h>
#include <util/fs.h>
#include <util/hasher.h>
#include <util/result.h>
#include <util/string.h>
#include <util/time.h>
#include <util/ui_change_type.h>
#include <wallet/crypter.h>
#include <wallet/db.h>
#include <wallet/scriptpubkeyman.h>
#include <wallet/transaction.h>
#include <wallet/types.h>
#include <wallet/walletutil.h>
#include <atomic>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#include <boost/signals2/signal.hpp>
Include dependency graph for wallet.h:

Go to the source code of this file.

Classes

class  wallet::ReserveDestination
 A wrapper to reserve an address from a wallet. More...
struct  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

namespace  common
namespace  interfaces
namespace  wallet

Typedefs

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

Functions

void wallet::WaitForDeleteWallet (std::shared_ptr< CWallet > &&wallet)
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< CWalletwallet::GetDefaultWallet (WalletContext &context, size_t &count)
std::shared_ptr< CWalletwallet::GetWallet (WalletContext &context, const std::string &name)
std::shared_ptr< CWalletwallet::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< CWalletwallet::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< CWalletwallet::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, bool load_after_restore, bool allow_unnamed)
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< WalletDatabasewallet::MakeWalletDatabase (const std::string &name, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error_string)
std::string wallet::PurposeToString (AddressPurpose p)
std::optional< AddressPurposewallet::PurposeFromString (std::string_view s)
void wallet::MaybeResendWalletTxs (WalletContext &context)
 Called periodically by the schedule thread.
bool wallet::AddWalletSetting (interfaces::Chain &chain, const std::string &wallet_name)
 Add wallet name to persistent configuration so it will be loaded on startup.
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.
util::Result< MigrationResultwallet::MigrateLegacyToDescriptor (const std::string &wallet_name, const SecureString &passphrase, WalletContext &context)
 Do all steps to migrate a legacy wallet to a descriptor wallet.
util::Result< MigrationResultwallet::MigrateLegacyToDescriptor (std::shared_ptr< CWallet > local_wallet, const SecureString &passphrase, WalletContext &context)
 Requirement: The wallet provided to this function must be isolated, with no attachment to the node's context.

Variables

static const CAmount wallet::DEFAULT_FALLBACK_FEE = 0
 -fallbackfee default
static const CAmount wallet::DEFAULT_DISCARD_FEE = 10000
 -discardfee default
static const CAmount wallet::DEFAULT_TRANSACTION_MINFEE = 1000
 -mintxfee default
static const CAmount wallet::DEFAULT_CONSOLIDATE_FEERATE {10000}
 -consolidatefeerate default
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
constexpr CAmount wallet::HIGH_APS_FEE {COIN / 10000}
 discourage APS fee higher than this amount
static const CAmount wallet::WALLET_INCREMENTAL_RELAY_FEE = 5000
 minimum recommended increment for replacement txs
static const bool wallet::DEFAULT_SPEND_ZEROCONF_CHANGE = true
 Default for -spendzeroconfchange.
static const bool wallet::DEFAULT_WALLET_REJECT_LONG_CHAINS {true}
 Default for -walletrejectlongchains.
static const unsigned int wallet::DEFAULT_TX_CONFIRM_TARGET = 6
 -txconfirmtarget default
static const bool wallet::DEFAULT_WALLET_RBF = true
 -walletrbf default
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
constexpr CAmount wallet::HIGH_TX_FEE_PER_KB {COIN / 100}
 Discourage users to set fees higher than this amount (in satoshis) per kB.
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)
static constexpr size_t wallet::DUMMY_NESTED_P2WPKH_INPUT_SIZE = 91
 Pre-calculated constants for input size estimation in virtual size.
constexpr OutputType wallet::DEFAULT_ADDRESS_TYPE {OutputType::BECH32}
 Default for -addresstype.
static constexpr uint64_t wallet::KNOWN_WALLET_FLAGS
static constexpr uint64_t wallet::MUTABLE_WALLET_FLAGS
static const std::map< WalletFlags, std::string > wallet::WALLET_FLAG_TO_STRING
static const std::map< std::string, WalletFlagswallet::STRING_TO_WALLET_FLAG

Typedef Documentation

◆ LoadWalletFn

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

Definition at line 81 of file wallet.h.