18 "\nRequires wallet passphrase to be set with walletpassphrase call if "
19 "wallet is encrypted.\n"};
28 "wallet does not have the \"avoid reuse\" feature enabled");
62std::shared_ptr<CWallet>
71 "Requested wallet does not exist or is not loaded");
84 "No wallet is loaded. Load a wallet using loadwallet or create a "
85 "new one with createwallet. (Note: A default wallet is no longer "
86 "automatically created)");
90 "Wallet file not specified (must request wallet RPC "
91 "through /wallet/<filename> uri-path).");
97 "Error: Please enter the wallet passphrase with "
98 "walletpassphrase first.");
120 "This type of wallet does not support this command");
126 std::string label = value.
get_str();
133std::tuple<std::shared_ptr<CWallet>, std::vector<bilingual_str>>
140 std::vector<bilingual_str>
warnings;
145 std::shared_ptr<CWallet>
const wallet =
#define CHECK_NONFATAL(condition)
Identity function.
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
bool IsLocked() const override
enum JSONRPCRequest::Mode mode
const std::string & get_str() const
bool IsWalletFlagSet(uint64_t flag) const override
Check if a certain wallet flag is set.
bool error(const char *fmt, const Args &...args)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
UniValue JSONRPCError(int code, const std::string &message)
RPCErrorCode
Bitcoin RPC error codes.
@ RPC_WALLET_NOT_SPECIFIED
No wallet specified (error when there are multiple wallets loaded)
@ RPC_WALLET_INVALID_LABEL_NAME
Invalid label name.
@ RPC_WALLET_UNLOCK_NEEDED
Enter the wallet passphrase with walletpassphrase first.
@ RPC_WALLET_ERROR
Wallet errors Unspecified problem with wallet (key not found etc.)
@ RPC_WALLET_NOT_FOUND
Invalid wallet specified.
WalletContext struct containing references to state shared between CWallet instances,...
interfaces::Chain * chain
std::string urlDecode(const std::string &urlEncoded)
void EnsureWalletIsUnlocked(const CWallet *pwallet)
static const std::string WALLET_ENDPOINT_BASE
std::shared_ptr< CWallet > GetWalletForJSONRPCRequest(const JSONRPCRequest &request)
Figures out what wallet, if any, to use for a JSONRPCRequest.
LegacyScriptPubKeyMan & EnsureLegacyScriptPubKeyMan(CWallet &wallet, bool also_create)
bool GetAvoidReuseFlag(const CWallet *const pwallet, const UniValue ¶m)
bool ParseIncludeWatchonly(const UniValue &include_watchonly, const CWallet &pwallet)
Used by RPC commands that have an include_watchonly parameter.
WalletContext & EnsureWalletContext(const std::any &context)
const std::string HELP_REQUIRING_PASSPHRASE
std::string LabelFromValue(const UniValue &value)
bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest &request, std::string &wallet_name)
std::tuple< std::shared_ptr< CWallet >, std::vector< bilingual_str > > LoadWalletHelper(WalletContext &context, UniValue load_on_start_param, const std::string wallet_name)
std::shared_ptr< CWallet > GetWallet(const std::string &name)
std::vector< std::shared_ptr< CWallet > > GetWallets()
std::shared_ptr< CWallet > LoadWallet(interfaces::Chain &chain, const std::string &name, std::optional< bool > load_on_start, const DatabaseOptions &options, DatabaseStatus &status, bilingual_str &error, std::vector< bilingual_str > &warnings)
@ WALLET_FLAG_DISABLE_PRIVATE_KEYS
@ WALLET_FLAG_AVOID_REUSE