aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2017-01-06 17:53:06 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2017-02-27 20:45:18 +0000
commita4356328e00155796cd7aa188e96c51c09562423 (patch)
tree4519a608a1a5eb62017c5dd454eed9351bdddbe4 /src/wallet
parentad1573472e3eff7378f9e28e0d267f919c368907 (diff)
downloadbitcoin-a4356328e00155796cd7aa188e96c51c09562423.tar.xz
Move wallet RPC declarations to rpcwallet.h
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcdump.cpp2
-rw-r--r--src/wallet/rpcwallet.h13
2 files changed, 15 insertions, 0 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index 8f73932452..e4d4d6b36d 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -16,6 +16,8 @@
#include "merkleblock.h"
#include "core_io.h"
+#include "rpcwallet.h"
+
#include <fstream>
#include <stdint.h>
diff --git a/src/wallet/rpcwallet.h b/src/wallet/rpcwallet.h
index 3a68ccf1b2..bd5dad18ca 100644
--- a/src/wallet/rpcwallet.h
+++ b/src/wallet/rpcwallet.h
@@ -6,7 +6,20 @@
#define BITCOIN_WALLET_RPCWALLET_H
class CRPCTable;
+class JSONRPCRequest;
void RegisterWalletRPCCommands(CRPCTable &t);
+/**
+ * Figures out what wallet, if any, to use for a JSONRPCRequest.
+ *
+ * @param[in] request JSONRPCRequest that wishes to access a wallet
+ * @return NULL if no wallet should be used, or a pointer to the CWallet
+ */
+CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest&);
+
+std::string HelpRequiringPassphrase(CWallet *);
+void EnsureWalletIsUnlocked(CWallet *);
+bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
+
#endif //BITCOIN_WALLET_RPCWALLET_H