diff options
author | Riccardo Spagni <ric@spagni.net> | 2018-01-27 17:24:07 -0800 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2018-01-27 17:24:08 -0800 |
commit | 087a77324770e512eaa8417fb30b9110639783c9 (patch) | |
tree | b14c597ff76e97d22c835c78abf9c2add878e6e1 /src/wallet/api/wallet2_api.h | |
parent | Merge pull request #3102 (diff) | |
parent | Wallet API: all recover options with password (diff) | |
download | monero-087a77324770e512eaa8417fb30b9110639783c9.tar.xz |
Merge pull request #3104
939629e8 Wallet API: all recover options with password (m2049r)
Diffstat (limited to 'src/wallet/api/wallet2_api.h')
-rw-r--r-- | src/wallet/api/wallet2_api.h | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/src/wallet/api/wallet2_api.h b/src/wallet/api/wallet2_api.h index e4c5759b5..d0690f6ac 100644 --- a/src/wallet/api/wallet2_api.h +++ b/src/wallet/api/wallet2_api.h @@ -755,7 +755,7 @@ struct WalletManager * \brief Creates new wallet * \param path Name of wallet file * \param password Password of wallet file - * \param language Language to be used to generate electrum seed memo + * \param language Language to be used to generate electrum seed mnemonic * \return Wallet instance (Wallet::status() needs to be called to check if created successfully) */ virtual Wallet * createWallet(const std::string &path, const std::string &password, const std::string &language, bool testnet = false) = 0; @@ -769,16 +769,51 @@ struct WalletManager virtual Wallet * openWallet(const std::string &path, const std::string &password, bool testnet = false) = 0; /*! - * \brief recovers existing wallet using memo (electrum seed) + * \brief recovers existing wallet using mnemonic (electrum seed) * \param path Name of wallet file to be created - * \param memo memo (25 words electrum seed) + * \param password Password of wallet file + * \param mnemonic mnemonic (25 words electrum seed) * \param testnet testnet * \param restoreHeight restore from start height * \return Wallet instance (Wallet::status() needs to be called to check if recovered successfully) */ - virtual Wallet * recoveryWallet(const std::string &path, const std::string &memo, bool testnet = false, uint64_t restoreHeight = 0) = 0; + virtual Wallet * recoveryWallet(const std::string &path, const std::string &password, const std::string &mnemonic, + bool testnet = false, uint64_t restoreHeight = 0) = 0; + + /*! + * \deprecated this method creates a wallet WITHOUT a passphrase, use the alternate recoverWallet() method + * \brief recovers existing wallet using mnemonic (electrum seed) + * \param path Name of wallet file to be created + * \param mnemonic mnemonic (25 words electrum seed) + * \param testnet testnet + * \param restoreHeight restore from start height + * \return Wallet instance (Wallet::status() needs to be called to check if recovered successfully) + */ + virtual Wallet * recoveryWallet(const std::string &path, const std::string &mnemonic, bool testnet = false, uint64_t restoreHeight = 0) = 0; + + /*! + * \brief recovers existing wallet using keys. Creates a view only wallet if spend key is omitted + * \param path Name of wallet file to be created + * \param password Password of wallet file + * \param language language + * \param testnet testnet + * \param restoreHeight restore from start height + * \param addressString public address + * \param viewKeyString view key + * \param spendKeyString spend key (optional) + * \return Wallet instance (Wallet::status() needs to be called to check if recovered successfully) + */ + virtual Wallet * createWalletFromKeys(const std::string &path, + const std::string &password, + const std::string &language, + bool testnet, + uint64_t restoreHeight, + const std::string &addressString, + const std::string &viewKeyString, + const std::string &spendKeyString = "") = 0; /*! + * \deprecated this method creates a wallet WITHOUT a passphrase, use createWalletFromKeys(..., password, ...) instead * \brief recovers existing wallet using keys. Creates a view only wallet if spend key is omitted * \param path Name of wallet file to be created * \param language language |