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
|
|
|
|
|
2017-09-08 01:30:28 +02:00
|
|
|
#include <string>
|
|
|
|
|
2016-03-31 10:55:06 +02:00
|
|
|
class CRPCTable;
|
2017-09-08 01:30:28 +02:00
|
|
|
class CWallet;
|
2017-03-03 13:37:19 +01:00
|
|
|
class JSONRPCRequest;
|
2020-12-15 03:41:03 +01:00
|
|
|
class UniValue;
|
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
|
|
|
*/
|
2021-04-01 19:28:43 +02:00
|
|
|
std::shared_ptr<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);
|
|
|
|
|
2020-12-17 13:46:20 +01:00
|
|
|
UniValue getaddressinfo(const JSONRPCRequest& request);
|
2018-02-20 03:29:22 +01:00
|
|
|
UniValue signrawtransactionwithwallet(const JSONRPCRequest& request);
|
2016-01-20 15:15:29 +01:00
|
|
|
#endif //BITCOIN_WALLET_RPCWALLET_H
|