Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.h
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
bool AddWallet(const std::shared_ptr<CWallet> &wallet); | bool AddWallet(const std::shared_ptr<CWallet> &wallet); | ||||
bool RemoveWallet(const std::shared_ptr<CWallet> &wallet); | bool RemoveWallet(const std::shared_ptr<CWallet> &wallet); | ||||
bool HasWallets(); | bool HasWallets(); | ||||
std::vector<std::shared_ptr<CWallet>> GetWallets(); | std::vector<std::shared_ptr<CWallet>> GetWallets(); | ||||
std::shared_ptr<CWallet> GetWallet(const std::string &name); | std::shared_ptr<CWallet> GetWallet(const std::string &name); | ||||
std::shared_ptr<CWallet> LoadWallet(const CChainParams &chainParams, | std::shared_ptr<CWallet> LoadWallet(const CChainParams &chainParams, | ||||
interfaces::Chain &chain, | interfaces::Chain &chain, | ||||
const WalletLocation &location, | const WalletLocation &location, | ||||
std::string &error, std::string &warning); | std::string &error, | ||||
std::vector<std::string> &warnings); | |||||
enum class WalletCreationStatus { SUCCESS, CREATION_FAILED, ENCRYPTION_FAILED }; | enum class WalletCreationStatus { SUCCESS, CREATION_FAILED, ENCRYPTION_FAILED }; | ||||
WalletCreationStatus | WalletCreationStatus CreateWallet(const CChainParams ¶ms, | ||||
CreateWallet(const CChainParams ¶ms, interfaces::Chain &chain, | interfaces::Chain &chain, | ||||
const SecureString &passphrase, uint64_t wallet_creation_flags, | const SecureString &passphrase, | ||||
const std::string &name, std::string &error, std::string &warning, | uint64_t wallet_creation_flags, | ||||
const std::string &name, std::string &error, | |||||
std::vector<std::string> &warnings, | |||||
std::shared_ptr<CWallet> &result); | std::shared_ptr<CWallet> &result); | ||||
//! Default for -keypool | //! Default for -keypool | ||||
static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000; | static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000; | ||||
//! -paytxfee default | //! -paytxfee default | ||||
constexpr Amount DEFAULT_PAY_TX_FEE = Amount::zero(); | constexpr Amount DEFAULT_PAY_TX_FEE = Amount::zero(); | ||||
//! -fallbackfee default | //! -fallbackfee default | ||||
static const Amount DEFAULT_FALLBACK_FEE = Amount::zero(); | static const Amount DEFAULT_FALLBACK_FEE = Amount::zero(); | ||||
//! -mintxfee default | //! -mintxfee default | ||||
▲ Show 20 Lines • Show All 1,481 Lines • ▼ Show 20 Lines | public: | ||||
*/ | */ | ||||
bool AbandonTransaction(interfaces::Chain::Lock &locked_chain, | bool AbandonTransaction(interfaces::Chain::Lock &locked_chain, | ||||
const TxId &txid); | const TxId &txid); | ||||
//! Verify wallet naming and perform salvage on the wallet if required | //! Verify wallet naming and perform salvage on the wallet if required | ||||
static bool Verify(const CChainParams &chainParams, | static bool Verify(const CChainParams &chainParams, | ||||
interfaces::Chain &chain, const WalletLocation &location, | interfaces::Chain &chain, const WalletLocation &location, | ||||
bool salvage_wallet, std::string &error_string, | bool salvage_wallet, std::string &error_string, | ||||
std::string &warning_string); | std::vector<std::string> &warnings); | ||||
/** | /** | ||||
* Initializes the wallet, returns a new CWallet instance or a null pointer | * Initializes the wallet, returns a new CWallet instance or a null pointer | ||||
* in case of an error. | * in case of an error. | ||||
*/ | */ | ||||
static std::shared_ptr<CWallet> CreateWalletFromFile( | static std::shared_ptr<CWallet> CreateWalletFromFile( | ||||
const CChainParams &chainParams, interfaces::Chain &chain, | const CChainParams &chainParams, interfaces::Chain &chain, | ||||
const WalletLocation &location, uint64_t wallet_creation_flags = 0); | const WalletLocation &location, std::string &error, | ||||
std::vector<std::string> &warnings, uint64_t wallet_creation_flags = 0); | |||||
/** | /** | ||||
* Wallet post-init setup | * Wallet post-init setup | ||||
* Gives the wallet a chance to register repetitive tasks and complete | * Gives the wallet a chance to register repetitive tasks and complete | ||||
* post-init tasks | * post-init tasks | ||||
*/ | */ | ||||
void postInitProcess(); | void postInitProcess(); | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |