2016-01-20 15:15:29 +01:00
|
|
|
// Copyright (c) 2016 The Bitcoin Core developers
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
|
|
|
#ifndef BITCOIN_WALLET_RPCWALLET_H
|
|
|
|
#define BITCOIN_WALLET_RPCWALLET_H
|
|
|
|
|
2016-03-31 10:55:06 +02:00
|
|
|
class CRPCTable;
|
2017-03-03 13:37:19 +01:00
|
|
|
class JSONRPCRequest;
|
2016-03-31 10:55:06 +02:00
|
|
|
|
2016-08-31 16:04:22 +02:00
|
|
|
void RegisterWalletRPCCommands(CRPCTable &t);
|
2016-01-20 15:15:29 +01:00
|
|
|
|
2017-03-03 13:37:19 +01:00
|
|
|
/**
|
|
|
|
* Figures out what wallet, if any, to use for a JSONRPCRequest.
|
|
|
|
*
|
|
|
|
* @param[in] request JSONRPCRequest that wishes to access a wallet
|
2019-08-06 05:08:33 +02:00
|
|
|
* @return nullptr if no wallet should be used, or a pointer to the CWallet
|
2017-03-03 13:37:19 +01:00
|
|
|
*/
|
2017-07-16 23:41:24 +02:00
|
|
|
CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest& request);
|
2017-03-03 13:37:19 +01:00
|
|
|
|
|
|
|
std::string HelpRequiringPassphrase(CWallet *);
|
|
|
|
void EnsureWalletIsUnlocked(CWallet *);
|
|
|
|
bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
|
|
|
|
|
2016-01-20 15:15:29 +01:00
|
|
|
#endif //BITCOIN_WALLET_RPCWALLET_H
|