From 1aecdf2063cbe28d4715ae5ae1a7e51b860c9f4d Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Fri, 24 May 2019 17:13:13 -0400 Subject: Move wallet creation out of the createwallet rpc into its own function --- src/wallet/wallet.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/wallet/wallet.h') diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 7b5465c219..b4357fb2ef 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -49,6 +49,14 @@ std::vector> GetWallets(); std::shared_ptr GetWallet(const std::string& name); std::shared_ptr LoadWallet(interfaces::Chain& chain, const WalletLocation& location, std::string& error, std::string& warning); +enum WalletCreationStatus { + SUCCESS, + CREATION_FAILED, + ENCRYPTION_FAILED +}; + +std::shared_ptr CreateWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status, const SecureString& passphrase, uint64_t wallet_creation_flags); + //! Default for -keypool static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000; //! -paytxfee default -- cgit v1.2.3