2018-01-02 14:12:05 -03:00
|
|
|
// Copyright (c) 2016-2017 The Bitcoin Core developers
|
2016-01-07 04:33:49 -03: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 14:33:59 -03:00
|
|
|
#include <string>
|
|
|
|
|
2016-03-29 14:43:02 -03:00
|
|
|
class CRPCTable;
|
2017-08-28 14:33:59 -03:00
|
|
|
class CWallet;
|
2017-01-06 14:53:06 -03:00
|
|
|
class JSONRPCRequest;
|
2017-06-12 21:53:46 -04:00
|
|
|
class UniValue;
|
2016-03-29 14:43:02 -03:00
|
|
|
|
2016-06-07 12:42:42 -04:00
|
|
|
void RegisterWalletRPCCommands(CRPCTable &t);
|
2016-01-07 04:33:49 -03:00
|
|
|
|
2017-01-06 14:53:06 -03: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 01:36:37 -04:00
|
|
|
* @return nullptr if no wallet should be used, or a pointer to the CWallet
|
2017-01-06 14:53:06 -03:00
|
|
|
*/
|
2018-05-22 11:18:07 -04:00
|
|
|
std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& request);
|
2017-01-06 14:53:06 -03:00
|
|
|
|
|
|
|
std::string HelpRequiringPassphrase(CWallet *);
|
|
|
|
void EnsureWalletIsUnlocked(CWallet *);
|
|
|
|
bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
|
|
|
|
|
2017-06-12 21:53:46 -04:00
|
|
|
UniValue getaddressinfo(const JSONRPCRequest& request);
|
2017-06-12 15:23:02 -04:00
|
|
|
UniValue signrawtransactionwithwallet(const JSONRPCRequest& request);
|
2016-01-07 04:33:49 -03:00
|
|
|
#endif //BITCOIN_WALLET_RPCWALLET_H
|