2018-01-02 18:12:05 +01:00
|
|
|
// Copyright (c) 2016-2017 The Bitcoin Core developers
|
2016-01-07 08:33:49 +01:00
|
|
|
// 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
|
|
|
|
|
2017-08-28 19:33:59 +02:00
|
|
|
#include <string>
|
|
|
|
|
2016-03-29 19:43:02 +02:00
|
|
|
class CRPCTable;
|
2017-08-28 19:33:59 +02:00
|
|
|
class CWallet;
|
2017-01-06 18:53:06 +01:00
|
|
|
class JSONRPCRequest;
|
2017-06-13 03:53:46 +02:00
|
|
|
class UniValue;
|
2016-03-29 19:43:02 +02:00
|
|
|
|
2016-06-07 18:42:42 +02:00
|
|
|
void RegisterWalletRPCCommands(CRPCTable &t);
|
2016-01-07 08:33:49 +01:00
|
|
|
|
2017-01-06 18:53:06 +01:00
|
|
|
/**
|
|
|
|
* Figures out what wallet, if any, to use for a JSONRPCRequest.
|
|
|
|
*
|
|
|
|
* @param[in] request JSONRPCRequest that wishes to access a wallet
|
2017-08-07 07:36:37 +02:00
|
|
|
* @return nullptr if no wallet should be used, or a pointer to the CWallet
|
2017-01-06 18:53:06 +01:00
|
|
|
*/
|
2017-07-16 12:20:49 +02:00
|
|
|
CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest& request);
|
2017-01-06 18:53:06 +01:00
|
|
|
|
|
|
|
std::string HelpRequiringPassphrase(CWallet *);
|
|
|
|
void EnsureWalletIsUnlocked(CWallet *);
|
|
|
|
bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
|
|
|
|
|
2017-06-13 03:53:46 +02:00
|
|
|
UniValue getaddressinfo(const JSONRPCRequest& request);
|
2017-06-12 21:23:02 +02:00
|
|
|
UniValue signrawtransactionwithwallet(const JSONRPCRequest& request);
|
2016-01-07 08:33:49 +01:00
|
|
|
#endif //BITCOIN_WALLET_RPCWALLET_H
|