Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.h
// Copyright (c) 2016 The Bitcoin Core developers | // Copyright (c) 2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_WALLET_RPCWALLET_H | #ifndef BITCOIN_WALLET_RPCWALLET_H | ||||
#define BITCOIN_WALLET_RPCWALLET_H | #define BITCOIN_WALLET_RPCWALLET_H | ||||
#include <script/sighashtype.h> | |||||
#include <string> | #include <string> | ||||
class Config; | |||||
class CRPCTable; | class CRPCTable; | ||||
class CTransaction; | |||||
class CWallet; | class CWallet; | ||||
class JSONRPCRequest; | class JSONRPCRequest; | ||||
class CWallet; | struct PartiallySignedTransaction; | ||||
class UniValue; | class UniValue; | ||||
class Config; | |||||
void RegisterWalletRPCCommands(CRPCTable &t); | void RegisterWalletRPCCommands(CRPCTable &t); | ||||
/** | /** | ||||
* Figures out what wallet, if any, to use for a JSONRPCRequest. | * Figures out what wallet, if any, to use for a JSONRPCRequest. | ||||
* | * | ||||
* @param[in] request JSONRPCRequest that wishes to access a wallet | * @param[in] request JSONRPCRequest that wishes to access a wallet | ||||
* @return NULL if no wallet should be used, or a pointer to the CWallet | * @return NULL if no wallet should be used, or a pointer to the CWallet | ||||
*/ | */ | ||||
std::shared_ptr<CWallet> | std::shared_ptr<CWallet> | ||||
GetWalletForJSONRPCRequest(const JSONRPCRequest &request); | GetWalletForJSONRPCRequest(const JSONRPCRequest &request); | ||||
std::string HelpRequiringPassphrase(CWallet *); | std::string HelpRequiringPassphrase(CWallet *); | ||||
void EnsureWalletIsUnlocked(CWallet *); | void EnsureWalletIsUnlocked(CWallet *); | ||||
bool EnsureWalletIsAvailable(CWallet *, bool avoidException); | bool EnsureWalletIsAvailable(CWallet *, bool avoidException); | ||||
UniValue signrawtransactionwithwallet(const Config &config, | UniValue signrawtransactionwithwallet(const Config &config, | ||||
const JSONRPCRequest &request); | const JSONRPCRequest &request); | ||||
UniValue getaddressinfo(const Config &config, const JSONRPCRequest &request); | UniValue getaddressinfo(const Config &config, const JSONRPCRequest &request); | ||||
bool FillPSBT(const CWallet *pwallet, PartiallySignedTransaction &psbtx, | |||||
const CTransaction *txConst, | |||||
SigHashType sighash_type = SigHashType(), bool sign = true, | |||||
bool bip32derivs = false); | |||||
#endif // BITCOIN_WALLET_RPCWALLET_H | #endif // BITCOIN_WALLET_RPCWALLET_H |