diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/api/wallet.cpp | 10 | ||||
-rw-r--r-- | src/wallet/api/wallet.h | 2 | ||||
-rw-r--r-- | src/wallet/wallet2_api.h | 17 |
3 files changed, 29 insertions, 0 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 440642291..5b68387ea 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -303,6 +303,16 @@ bool WalletImpl::store(const std::string &path) return m_status == Status_Ok; } +string WalletImpl::filename() const +{ + return m_wallet->get_wallet_file(); +} + +string WalletImpl::keysFilename() const +{ + return m_wallet->get_keys_file(); +} + bool WalletImpl::init(const std::string &daemon_address, uint64_t upper_transaction_size_limit) { clearStatus(); diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h index c0fa31003..c402ef53c 100644 --- a/src/wallet/api/wallet.h +++ b/src/wallet/api/wallet.h @@ -61,6 +61,8 @@ public: bool setPassword(const std::string &password); std::string address() const; bool store(const std::string &path); + std::string filename() const; + std::string keysFilename() const; bool init(const std::string &daemon_address, uint64_t upper_transaction_size_limit); bool connectToDaemon(); void setTrustedDaemon(bool arg); diff --git a/src/wallet/wallet2_api.h b/src/wallet/wallet2_api.h index b98bb8661..bf5ddc3c7 100644 --- a/src/wallet/wallet2_api.h +++ b/src/wallet/wallet2_api.h @@ -135,7 +135,24 @@ struct Wallet virtual std::string errorString() const = 0; virtual bool setPassword(const std::string &password) = 0; virtual std::string address() const = 0; + /*! + * \brief store - stores wallet to file. + * \param path - main filename to store wallet to. additionally stores address file and keys file. + * to store to the same file - just pass empty string; + * \return + */ virtual bool store(const std::string &path) = 0; + /*! + * \brief filename - returns wallet filename + * \return + */ + virtual std::string filename() const = 0; + /*! + * \brief keysFilename - returns keys filename. usually this formed as "wallet_filename".keys + * \return + */ + virtual std::string keysFilename() const = 0; + virtual bool init(const std::string &daemon_address, uint64_t upper_transaction_size_limit) = 0; virtual bool connectToDaemon() = 0; virtual void setTrustedDaemon(bool arg) = 0; |