Bitcoin ABC 0.30.5
P2P Digital Currency
util.h
Go to the documentation of this file.
1// Copyright (c) 2017-2021 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_WALLET_RPC_UTIL_H
6#define BITCOIN_WALLET_RPC_UTIL_H
7
8#include <any>
9#include <memory>
10#include <string>
11#include <vector>
12
13struct bilingual_str;
14class CWallet;
15class JSONRPCRequest;
17class UniValue;
18struct WalletContext;
19
20extern const std::string HELP_REQUIRING_PASSPHRASE;
21
28std::shared_ptr<CWallet>
31 std::string &wallet_name);
32
34WalletContext &EnsureWalletContext(const std::any &context);
36 bool also_create = false);
37
38bool GetAvoidReuseFlag(const CWallet *const wallet, const UniValue &param);
39bool ParseIncludeWatchonly(const UniValue &include_watchonly,
40 const CWallet &wallet);
41std::string LabelFromValue(const UniValue &value);
42
43std::tuple<std::shared_ptr<CWallet>, std::vector<bilingual_str>>
44LoadWalletHelper(WalletContext &context, UniValue load_on_start_param,
45 const std::string wallet_name);
46
47#endif // BITCOIN_WALLET_RPC_UTIL_H
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:254
WalletContext struct containing references to state shared between CWallet instances,...
Definition: context.h:23
Bilingual messages:
Definition: translation.h:17
LegacyScriptPubKeyMan & EnsureLegacyScriptPubKeyMan(CWallet &wallet, bool also_create=false)
Definition: util.cpp:112
std::shared_ptr< CWallet > GetWalletForJSONRPCRequest(const JSONRPCRequest &request)
Figures out what wallet, if any, to use for a JSONRPCRequest.
Definition: util.cpp:63
bool ParseIncludeWatchonly(const UniValue &include_watchonly, const CWallet &wallet)
Used by RPC commands that have an include_watchonly parameter.
Definition: util.cpp:38
bool GetAvoidReuseFlag(const CWallet *const wallet, const UniValue &param)
Definition: util.cpp:21
WalletContext & EnsureWalletContext(const std::any &context)
Definition: util.cpp:102
const std::string HELP_REQUIRING_PASSPHRASE
Definition: util.cpp:17
std::string LabelFromValue(const UniValue &value)
Definition: util.cpp:125
bool GetWalletNameFromJSONRPCRequest(const JSONRPCRequest &request, std::string &wallet_name)
Definition: util.cpp:50
std::tuple< std::shared_ptr< CWallet >, std::vector< bilingual_str > > LoadWalletHelper(WalletContext &context, UniValue load_on_start_param, const std::string wallet_name)
Definition: util.cpp:134
void EnsureWalletIsUnlocked(const CWallet *)
Definition: util.cpp:94