Merge #12079: Improve prioritisetransaction test coverage
[bitcoinplatinum.git] / src / wallet / rpcwallet.h
blob77f7b42b2338760a8e5421c5ee717960732f1bc4
1 // Copyright (c) 2016-2017 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.
5 #ifndef BITCOIN_WALLET_RPCWALLET_H
6 #define BITCOIN_WALLET_RPCWALLET_H
8 #include <string>
10 class CRPCTable;
11 class CWallet;
12 class JSONRPCRequest;
14 void RegisterWalletRPCCommands(CRPCTable &t);
16 /**
17 * Figures out what wallet, if any, to use for a JSONRPCRequest.
19 * @param[in] request JSONRPCRequest that wishes to access a wallet
20 * @return nullptr if no wallet should be used, or a pointer to the CWallet
22 CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest& request);
24 std::string HelpRequiringPassphrase(CWallet *);
25 void EnsureWalletIsUnlocked(CWallet *);
26 bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
28 #endif //BITCOIN_WALLET_RPCWALLET_H