|
Electroneum
|
#include <wallet_manager.h>


Public Member Functions | |
| Wallet * | createWallet (const std::string &path, const std::string &password, const std::string &language, bool testnet) |
| Creates new wallet. More... | |
| Wallet * | openWallet (const std::string &path, const std::string &password, bool testnet) |
| Opens existing wallet. More... | |
| virtual Wallet * | recoveryWallet (const std::string &path, const std::string &memo, bool testnet, uint64_t restoreHeight) |
| recovers existing wallet using memo (electrum seed) More... | |
| virtual 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="") |
| recovers existing wallet using keys. Creates a view only wallet if spend key is omitted More... | |
| virtual bool | closeWallet (Wallet *wallet) |
| Closes wallet. In case operation succeded, wallet object deleted. in case operation failed, wallet object not deleted. More... | |
| bool | walletExists (const std::string &path) |
| 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 watch_only) const |
| verifyWalletPassword - check if the given filename is the wallet More... | |
| std::vector< std::string > | findWallets (const std::string &path) |
| findWallets - searches for the wallet files by given path name recursively More... | |
| std::string | errorString () const |
| returns verbose error string regarding last error; More... | |
| void | setDaemonAddress (const std::string &address) |
| set the daemon address (hostname and port) More... | |
| bool | connected (uint32_t *version=NULL) const |
| returns whether the daemon can be reached, and its version number More... | |
| bool | checkPayment (const std::string &address, const std::string &txid, const std::string &txkey, const std::string &daemon_address, uint64_t &received, uint64_t &height, std::string &error) const |
| checkPayment - checks a payment was made using a txkey More... | |
| uint64_t | blockchainHeight () const |
| returns current blockchain height More... | |
| uint64_t | blockchainTargetHeight () const |
| returns current blockchain target height More... | |
| uint64_t | networkDifficulty () const |
| returns current network difficulty More... | |
| double | miningHashRate () const |
| returns current mining hash rate (0 if not mining) More... | |
| uint64_t | blockTarget () const |
| returns current block target More... | |
| bool | isMining () const |
| returns true iff mining More... | |
| bool | startMining (const std::string &address, uint32_t threads=1, bool background_mining=false, bool ignore_battery=true) |
| starts mining with the set number of threads More... | |
| bool | stopMining () |
| stops mining More... | |
| std::string | resolveOpenAlias (const std::string &address, bool &dnssec_valid) const |
| resolves an OpenAlias address to a electroneum address More... | |
Private Member Functions | |
| WalletManagerImpl () | |
Private Attributes | |
| std::string | m_daemonAddress |
| std::string | m_errorString |
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, const std::string &subdir) |
| checks for an update and returns version, hash and url More... | |
|
inlineprivate |
|
virtual |
returns current blockchain height
Implements Electroneum::WalletManager.
|
virtual |
returns current blockchain target height
Implements Electroneum::WalletManager.
|
virtual |
returns current block target
Implements Electroneum::WalletManager.
|
virtual |
checkPayment - checks a payment was made using a txkey
| address | - the address the payment was sent to |
| txid | - the transaction id for that payment |
| txkey | - the transaction's secret key |
| daemon_address | - the address (host and port) to the daemon to request transaction data |
| received | - if succesful, will hold the amount of electroneum received |
| height | - if succesful, will hold the height of the transaction (0 if only in the pool) |
| error | - if unsuccesful, will hold an error string with more information about the error |
Implements Electroneum::WalletManager.
Closes wallet. In case operation succeded, wallet object deleted. in case operation failed, wallet object not deleted.
| wallet | previously opened / created wallet instance |
Implements Electroneum::WalletManager.
|
virtual |
returns whether the daemon can be reached, and its version number
Implements Electroneum::WalletManager.
|
virtual |
Creates new wallet.
| path | Name of wallet file |
| password | Password of wallet file |
| language | Language to be used to generate electrum seed memo |
Implements Electroneum::WalletManager.
|
virtual |
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 |
| testnet | testnet |
| restoreHeight | restore from start height |
| addressString | public address |
| viewKeyString | view key |
| spendKeyString | spend key (optional) |
Implements Electroneum::WalletManager.
|
virtual |
returns verbose error string regarding last error;
Implements Electroneum::WalletManager.
|
virtual |
findWallets - searches for the wallet files by given path name recursively
| path | - starting point to search |
Implements Electroneum::WalletManager.
|
virtual |
returns true iff mining
Implements Electroneum::WalletManager.
|
virtual |
returns current mining hash rate (0 if not mining)
Implements Electroneum::WalletManager.
|
virtual |
returns current network difficulty
Implements Electroneum::WalletManager.
|
virtual |
Opens existing wallet.
| path | Name of wallet file |
| password | Password of wallet file |
Implements Electroneum::WalletManager.
|
virtual |
recovers existing wallet using memo (electrum seed)
| path | Name of wallet file to be created |
| memo | memo (25 words electrum seed) |
| testnet | testnet |
| restoreHeight | restore from start height |
Implements Electroneum::WalletManager.
|
virtual |
resolves an OpenAlias address to a electroneum address
Implements Electroneum::WalletManager.
|
virtual |
set the daemon address (hostname and port)
Implements Electroneum::WalletManager.
|
virtual |
starts mining with the set number of threads
Implements Electroneum::WalletManager.
|
virtual |
stops mining
Implements Electroneum::WalletManager.
|
virtual |
verifyWalletPassword - check if the given filename is the wallet
| keys_file_name | - location of keys file |
| password | - password to verify |
| watch_only | - verify only view keys? |
Implements Electroneum::WalletManager.
|
virtual |
TODO: delme walletExists - check if the given filename is the wallet.
| path | - filename |
Implements Electroneum::WalletManager.
|
friend |
|
private |
|
private |
1.8.14