|
Electroneum
|
#include <wallet_manager.h>


Public Member Functions | |
| Wallet * | createWallet (const std::string &path, const std::string &password, const std::string &language, NetworkType nettype, uint64_t kdf_rounds=1) override |
| Creates new wallet. More... | |
| Wallet * | openWallet (const std::string &path, const std::string &password, NetworkType nettype, uint64_t kdf_rounds=1, WalletListener *listener=nullptr) override |
| Opens existing wallet. More... | |
| virtual Wallet * | recoveryWallet (const std::string &path, const std::string &password, const std::string &mnemonic, NetworkType nettype, uint64_t restoreHeight, uint64_t kdf_rounds=1) override |
| recovers existing wallet using mnemonic (electrum seed) More... | |
| virtual Wallet * | createWalletFromKeys (const std::string &path, const std::string &password, const std::string &language, NetworkType nettype, uint64_t restoreHeight, const std::string &addressString, const std::string &viewKeyString, const std::string &spendKeyString="", uint64_t kdf_rounds=1) override |
| recovers existing wallet using keys. Creates a view only wallet if spend key is omitted More... | |
| virtual Wallet * | recoveryWallet (const std::string &path, const std::string &mnemonic, NetworkType nettype, uint64_t restoreHeight) override |
| recovers existing wallet using mnemonic (electrum seed) More... | |
| virtual Wallet * | createWalletFromKeys (const std::string &path, const std::string &language, NetworkType nettype, uint64_t restoreHeight, const std::string &addressString, const std::string &viewKeyString, const std::string &spendKeyString="") override |
| recovers existing wallet using keys. Creates a view only wallet if spend key is omitted More... | |
| virtual Wallet * | createWalletFromDevice (const std::string &path, const std::string &password, NetworkType nettype, const std::string &deviceName, uint64_t restoreHeight=0, const std::string &subaddressLookahead="", uint64_t kdf_rounds=1, WalletListener *listener=nullptr) override |
| creates wallet using hardware device. More... | |
| virtual bool | closeWallet (Wallet *wallet, bool store=true) override |
| Closes wallet. In case operation succeeded, wallet object deleted. in case operation failed, wallet object not deleted. More... | |
| bool | walletExists (const std::string &path) override |
| TODO: delme walletExists - check if the given filename is the wallet. More... | |
| bool | verifyWalletPassword (const std::string &keys_file_name, const std::string &password, bool no_spend_key, uint64_t kdf_rounds=1) const override |
| verifyWalletPassword - check if the given filename is the wallet More... | |
| bool | queryWalletDevice (Wallet::Device &device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds=1) const override |
| determine the key storage for the specified wallet file More... | |
| std::vector< std::string > | findWallets (const std::string &path) override |
| findWallets - searches for the wallet files by given path name recursively More... | |
| std::string | errorString () const override |
| returns verbose error string regarding last error; More... | |
| void | setDaemonAddress (const std::string &address) override |
| set the daemon address (hostname and port) More... | |
| bool | connected (uint32_t *version=NULL) override |
| returns whether the daemon can be reached, and its version number More... | |
| uint64_t | blockchainHeight () override |
| returns current blockchain height More... | |
| uint64_t | blockchainTargetHeight () override |
| returns current blockchain target height More... | |
| uint64_t | networkDifficulty () override |
| returns current network difficulty More... | |
| double | miningHashRate () override |
| returns current mining hash rate (0 if not mining) More... | |
| uint64_t | blockTarget () override |
| returns current block target More... | |
| bool | isMining () override |
| returns true iff mining More... | |
| bool | startMining (const std::string &address, uint32_t threads=1, bool background_mining=false, bool ignore_battery=true) override |
| starts mining with the set number of threads More... | |
| bool | stopMining () override |
| stops mining More... | |
| std::string | resolveOpenAlias (const std::string &address, bool &dnssec_valid) const override |
| resolves an OpenAlias address to a electroneum address More... | |
Public Member Functions inherited from Electroneum::WalletManager | |
| Wallet * | createWallet (const std::string &path, const std::string &password, const std::string &language, bool testnet=false) |
| Wallet * | openWallet (const std::string &path, const std::string &password, bool testnet=false) |
| Wallet * | recoveryWallet (const std::string &path, const std::string &password, const std::string &mnemonic, bool testnet=false, uint64_t restoreHeight=0) |
| Wallet * | recoveryWallet (const std::string &path, const std::string &mnemonic, bool testnet=false, uint64_t restoreHeight=0) |
| 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="") |
| Wallet * | createWalletFromKeys (const std::string &path, const std::string &language, bool testnet, uint64_t restoreHeight, const std::string &addressString, const std::string &viewKeyString, const std::string &spendKeyString="") |
Friends | |
| struct | WalletManagerFactory |
Additional Inherited Members | |
Static Public Member Functions inherited from Electroneum::WalletManager | |
| static std::tuple< bool, std::string, std::string, std::string, std::string > | checkUpdates (const std::string &software, std::string subdir) |
| checks for an update and returns version, hash and url More... | |
Definition at line 39 of file wallet_manager.h.
|
overridevirtual |
returns current blockchain height
Implements Electroneum::WalletManager.
Definition at line 252 of file wallet_manager.cpp.

|
overridevirtual |
returns current blockchain target height
Implements Electroneum::WalletManager.
Definition at line 262 of file wallet_manager.cpp.

|
overridevirtual |
returns current block target
Implements Electroneum::WalletManager.
Definition at line 295 of file wallet_manager.cpp.

|
overridevirtual |
Closes wallet. In case operation succeeded, wallet object deleted. in case operation failed, wallet object not deleted.
| wallet | previously opened / created wallet instance |
Implements Electroneum::WalletManager.
Definition at line 154 of file wallet_manager.cpp.

returns whether the daemon can be reached, and its version number
Implements Electroneum::WalletManager.
Definition at line 237 of file wallet_manager.cpp.

|
overridevirtual |
Creates new wallet.
| path | Name of wallet file |
| password | Password of wallet file |
| language | Language to be used to generate electrum seed mnemonic |
| nettype | Network type |
| kdf_rounds | Number of rounds for key derivation function |
Implements Electroneum::WalletManager.
Definition at line 53 of file wallet_manager.cpp.

|
overridevirtual |
creates wallet using hardware device.
| path | Name of wallet file to be created |
| password | Password of wallet file |
| nettype | Network type |
| deviceName | Device name |
| restoreHeight | restore from start height (0 sets to current height) |
| subaddressLookahead | Size of subaddress lookahead (empty sets to some default low value) |
| kdf_rounds | Number of rounds for key derivation function |
| listener | Wallet listener to set to the wallet after creation |
Implements Electroneum::WalletManager.
Definition at line 125 of file wallet_manager.cpp.

|
overridevirtual |
recovers existing wallet using keys. Creates a view only wallet if spend key is omitted
| path | Name of wallet file to be created |
| password | Password of wallet file |
| language | language |
| nettype | Network type |
| restoreHeight | restore from start height |
| addressString | public address |
| viewKeyString | view key |
| spendKeyString | spend key (optional) |
| kdf_rounds | Number of rounds for key derivation function |
Implements Electroneum::WalletManager.
Definition at line 107 of file wallet_manager.cpp.


|
overridevirtual |
recovers existing wallet using keys. Creates a view only wallet if spend key is omitted
| path | Name of wallet file to be created |
| language | language |
| nettype | Network type |
| restoreHeight | restore from start height |
| addressString | public address |
| viewKeyString | view key |
| spendKeyString | spend key (optional) |
Implements Electroneum::WalletManager.
Definition at line 80 of file wallet_manager.cpp.

|
overridevirtual |
returns verbose error string regarding last error;
Implements Electroneum::WalletManager.
Definition at line 224 of file wallet_manager.cpp.
|
overridevirtual |
findWallets - searches for the wallet files by given path name recursively
| path | - starting point to search |
Implements Electroneum::WalletManager.
Definition at line 192 of file wallet_manager.cpp.
|
overridevirtual |
returns true iff mining
Implements Electroneum::WalletManager.
Definition at line 305 of file wallet_manager.cpp.

|
overridevirtual |
returns current mining hash rate (0 if not mining)
Implements Electroneum::WalletManager.
Definition at line 282 of file wallet_manager.cpp.

|
overridevirtual |
returns current network difficulty
Implements Electroneum::WalletManager.
Definition at line 272 of file wallet_manager.cpp.

|
overridevirtual |
Opens existing wallet.
| path | Name of wallet file |
| password | Password of wallet file |
| nettype | Network type |
| kdf_rounds | Number of rounds for key derivation function |
| listener | Wallet listener to set to the wallet after creation |
Implements Electroneum::WalletManager.
Definition at line 61 of file wallet_manager.cpp.

|
overridevirtual |
determine the key storage for the specified wallet file
| device_type | (OUT) wallet backend as enumerated in Wallet::Device |
| keys_file_name | Keys file to verify password for |
| password | Password to verify |
for verification only - determines key storage hardware
Implements Electroneum::WalletManager.
Definition at line 184 of file wallet_manager.cpp.

|
overridevirtual |
recovers existing wallet using mnemonic (electrum seed)
| path | Name of wallet file to be created |
| password | Password of wallet file |
| mnemonic | mnemonic (25 words electrum seed) |
| nettype | Network type |
| restoreHeight | restore from start height |
| kdf_rounds | Number of rounds for key derivation function |
Implements Electroneum::WalletManager.
Definition at line 92 of file wallet_manager.cpp.


|
overridevirtual |
recovers existing wallet using mnemonic (electrum seed)
| path | Name of wallet file to be created |
| mnemonic | mnemonic (25 words electrum seed) |
| nettype | Network type |
| restoreHeight | restore from start height |
Implements Electroneum::WalletManager.
Definition at line 75 of file wallet_manager.cpp.

|
overridevirtual |
resolves an OpenAlias address to a electroneum address
Implements Electroneum::WalletManager.
Definition at line 340 of file wallet_manager.cpp.

|
overridevirtual |
set the daemon address (hostname and port)
Implements Electroneum::WalletManager.
Definition at line 229 of file wallet_manager.cpp.

|
overridevirtual |
starts mining with the set number of threads
Implements Electroneum::WalletManager.
Definition at line 315 of file wallet_manager.cpp.

|
overridevirtual |
stops mining
Implements Electroneum::WalletManager.
Definition at line 330 of file wallet_manager.cpp.

|
overridevirtual |
verifyWalletPassword - check if the given filename is the wallet
| keys_file_name | - location of keys file |
| password | - password to verify |
| no_spend_key | - verify only view keys? |
| kdf_rounds | - number of rounds for key derivation function |
Implements Electroneum::WalletManager.
Definition at line 179 of file wallet_manager.cpp.

|
overridevirtual |
TODO: delme walletExists - check if the given filename is the wallet.
| path | - filename |
Implements Electroneum::WalletManager.
Definition at line 168 of file wallet_manager.cpp.

|
friend |
Definition at line 98 of file wallet_manager.h.