|
Monero
|
WalletManager - provides functions to manage wallets. More...
#include <wallet2_api.h>

Public Member Functions | |
| virtual Wallet * | createWallet (const std::string &path, const std::string &password, const std::string &language, NetworkType nettype, uint64_t kdf_rounds=1)=0 |
| Creates new wallet. | |
| Wallet * | createWallet (const std::string &path, const std::string &password, const std::string &language, bool testnet=false) |
| virtual Wallet * | openWallet (const std::string &path, const std::string &password, NetworkType nettype, uint64_t kdf_rounds=1, WalletListener *listener=nullptr)=0 |
| Opens existing wallet. | |
| Wallet * | openWallet (const std::string &path, const std::string &password, bool testnet=false) |
| virtual Wallet * | recoveryWallet (const std::string &path, const std::string &password, const std::string &mnemonic, NetworkType nettype=MAINNET, uint64_t restoreHeight=0, uint64_t kdf_rounds=1, const std::string &seed_offset={})=0 |
| recovers existing wallet using mnemonic (electrum seed) | |
| Wallet * | recoveryWallet (const std::string &path, const std::string &password, const std::string &mnemonic, bool testnet=false, uint64_t restoreHeight=0) |
| virtual Wallet * | recoveryWallet (const std::string &path, const std::string &mnemonic, NetworkType nettype, uint64_t restoreHeight=0)=0 |
| recovers existing wallet using mnemonic (electrum seed) | |
| Wallet * | recoveryWallet (const std::string &path, const std::string &mnemonic, bool testnet=false, uint64_t restoreHeight=0) |
| 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)=0 |
| recovers existing wallet using keys. Creates a view only wallet if spend key is omitted | |
| 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="") |
| 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="")=0 |
| recovers existing wallet using keys. Creates a view only wallet if spend key is omitted | |
| 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="") |
| 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)=0 |
| creates wallet using hardware device. | |
| virtual bool | closeWallet (Wallet *wallet, bool store=true)=0 |
| Closes wallet. In case operation succeeded, wallet object deleted. in case operation failed, wallet object not deleted. | |
| virtual bool | walletExists (const std::string &path)=0 |
| TODO: delme walletExists - check if the given filename is the wallet. | |
| virtual bool | verifyWalletPassword (const std::string &keys_file_name, const std::string &password, bool no_spend_key, uint64_t kdf_rounds=1) const =0 |
| verifyWalletPassword - check if the given filename is the wallet | |
| virtual bool | queryWalletDevice (Wallet::Device &device_type, const std::string &keys_file_name, const std::string &password, uint64_t kdf_rounds=1) const =0 |
| determine the key storage for the specified wallet file | |
| virtual std::vector< std::string > | findWallets (const std::string &path)=0 |
| findWallets - searches for the wallet files by given path name recursively | |
| virtual std::string | errorString () const =0 |
| returns verbose error string regarding last error; | |
| virtual void | setDaemonAddress (const std::string &address)=0 |
| set the daemon address (hostname and port) | |
| virtual bool | connected (uint32_t *version=NULL)=0 |
| returns whether the daemon can be reached, and its version number | |
| virtual uint64_t | blockchainHeight ()=0 |
| returns current blockchain height | |
| virtual uint64_t | blockchainTargetHeight ()=0 |
| returns current blockchain target height | |
| virtual uint64_t | networkDifficulty ()=0 |
| returns current network difficulty | |
| virtual double | miningHashRate ()=0 |
| returns current mining hash rate (0 if not mining) | |
| virtual uint64_t | blockTarget ()=0 |
| returns current block target | |
| virtual bool | isMining ()=0 |
| returns true iff mining | |
| virtual bool | startMining (const std::string &address, uint32_t threads=1, bool background_mining=false, bool ignore_battery=true)=0 |
| starts mining with the set number of threads | |
| virtual bool | stopMining ()=0 |
| stops mining | |
| virtual std::string | resolveOpenAlias (const std::string &address, bool &dnssec_valid) const =0 |
| resolves an OpenAlias address to a monero address | |
| virtual bool | setProxy (const std::string &address)=0 |
| sets proxy address, empty string to disable | |
Static Public Member Functions | |
| static std::tuple< bool, std::string, std::string, std::string, std::string > | checkUpdates (const std::string &software, std::string subdir, const char *buildtag=nullptr, const char *current_version=nullptr) |
| checks for an update and returns version, hash and url | |
WalletManager - provides functions to manage wallets.
|
pure virtual |
returns current blockchain height
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
returns current blockchain target height
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
returns current block target
Implemented in Monero::WalletManagerImpl.
|
static |
checks for an update and returns version, hash and url
Closes wallet. In case operation succeeded, wallet object deleted. in case operation failed, wallet object not deleted.
| wallet | previously opened / created wallet instance |
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
returns whether the daemon can be reached, and its version number
Implemented in Monero::WalletManagerImpl.
|
inline |
|
pure virtual |
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 |
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
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 |
Implemented in Monero::WalletManagerImpl.
|
inline |
|
pure 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 |
| nettype | Network type |
| restoreHeight | restore from start height |
| addressString | public address |
| viewKeyString | view key |
| spendKeyString | spend key (optional) |
Implemented in Monero::WalletManagerImpl.
|
inline |
|
pure virtual |
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 |
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
returns verbose error string regarding last error;
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
findWallets - searches for the wallet files by given path name recursively
| path | - starting point to search |
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
returns true iff mining
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
returns current mining hash rate (0 if not mining)
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
returns current network difficulty
Implemented in Monero::WalletManagerImpl.
|
inline |
|
pure virtual |
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 |
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
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
Implemented in Monero::WalletManagerImpl.
|
inline |
|
pure virtual |
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 |
Implemented in Monero::WalletManagerImpl.
|
inline |
|
pure virtual |
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 |
| seed_offset | Seed offset passphrase (optional) |
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
resolves an OpenAlias address to a monero address
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
set the daemon address (hostname and port)
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
sets proxy address, empty string to disable
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
starts mining with the set number of threads
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
stops mining
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
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 |
Implemented in Monero::WalletManagerImpl.
|
pure virtual |
TODO: delme walletExists - check if the given filename is the wallet.
| path | - filename |
Implemented in Monero::WalletManagerImpl.