aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/node.h
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2019-05-24 17:14:16 -0400
committerAndrew Chow <achow101-github@achow101.com>2019-09-05 20:36:57 -0400
commit9b41cbb28f603f4f71f5854d6ae2527932bba3cb (patch)
tree2b88b292c10566b75c0df9128ffc8ad913e2635e /src/interfaces/node.h
parent78863e290006e61060622dbdbecc5b58c0fefa05 (diff)
downloadbitcoin-9b41cbb28f603f4f71f5854d6ae2527932bba3cb.tar.xz
Expose wallet creation to the GUI via WalletController
Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
Diffstat (limited to 'src/interfaces/node.h')
-rw-r--r--src/interfaces/node.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index b93b52c5cc..e8c3d0b721 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -9,6 +9,7 @@
#include <amount.h> // For CAmount
#include <net.h> // For CConnman::NumConnections
#include <netaddress.h> // For Network
+#include <support/allocators/secure.h> // For SecureString
#include <functional>
#include <memory>
@@ -27,6 +28,7 @@ class RPCTimerInterface;
class UniValue;
class proxyType;
struct CNodeStateStats;
+enum class WalletCreationStatus;
namespace interfaces {
class Handler;
@@ -200,6 +202,9 @@ public:
//! with handleLoadWallet.
virtual std::unique_ptr<Wallet> loadWallet(const std::string& name, std::string& error, std::string& warning) = 0;
+ //! Create a wallet from file
+ virtual WalletCreationStatus createWallet(const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::string& warning, std::unique_ptr<Wallet>& result) = 0;
+
//! Register handler for init messages.
using InitMessageFn = std::function<void(const std::string& message)>;
virtual std::unique_ptr<Handler> handleInitMessage(InitMessageFn fn) = 0;