Bitcoin Core  0.19.99
P2P Digital Currency
rpcwallet.h
Go to the documentation of this file.
1 // Copyright (c) 2016-2019 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_RPCWALLET_H
6 #define BITCOIN_WALLET_RPCWALLET_H
7 
8 #include <memory>
9 #include <string>
10 #include <vector>
11 
12 class CRPCTable;
13 class CWallet;
14 class JSONRPCRequest;
16 class UniValue;
18 class CTransaction;
19 
20 namespace interfaces {
21 class Chain;
22 class Handler;
23 }
24 
30 
31 void RegisterWalletRPCCommands(interfaces::Chain& chain, std::vector<std::unique_ptr<interfaces::Handler>>& handlers);
32 
39 std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& request);
40 
41 std::string HelpRequiringPassphrase(const CWallet*);
42 void EnsureWalletIsUnlocked(const CWallet*);
43 bool EnsureWalletIsAvailable(const CWallet*, bool avoidException);
44 LegacyScriptPubKeyMan& EnsureLegacyScriptPubKeyMan(CWallet& wallet, bool also_create = false);
45 
46 UniValue getaddressinfo(const JSONRPCRequest& request);
48 #endif //BITCOIN_WALLET_RPCWALLET_H
interfaces::Chain * g_rpc_chain
Pointer to chain interface that needs to be declared as a global to be accessible loadwallet and crea...
Definition: rpcwallet.cpp:4320
Bitcoin RPC command dispatcher.
Definition: server.h:119
bool EnsureWalletIsAvailable(const CWallet *, bool avoidException)
Definition: rpcwallet.cpp:108
A version of CTransaction with the PSBT format.
Definition: psbt.h:388
LegacyScriptPubKeyMan & EnsureLegacyScriptPubKeyMan(CWallet &wallet, bool also_create=false)
Definition: rpcwallet.cpp:128
UniValue getaddressinfo(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:3718
std::shared_ptr< CWallet > GetWalletForJSONRPCRequest(const JSONRPCRequest &request)
Figures out what wallet, if any, to use for a JSONRPCRequest.
Definition: rpcwallet.cpp:88
UniValue signrawtransactionwithwallet(const JSONRPCRequest &request)
Definition: rpcwallet.cpp:3216
void RegisterWalletRPCCommands(interfaces::Chain &chain, std::vector< std::unique_ptr< interfaces::Handler >> &handlers)
Definition: rpcwallet.cpp:4314
void EnsureWalletIsUnlocked(const CWallet *)
Definition: rpcwallet.cpp:120
std::string HelpRequiringPassphrase(const CWallet *)
Definition: rpcwallet.cpp:101
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
Definition: chain.h:54
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition: wallet.h:606
The basic transaction that is broadcasted on the network and contained in blocks. ...
Definition: transaction.h:270