|
Electroneum
|
Interface for wallet operations. TODO: check if /include/IWallet.h is still actual. More...
#include <wallet2_api.h>

Public Types | |
| enum | Status { Status_Ok, Status_Error, Status_Critical } |
| enum | ConnectionStatus { ConnectionStatus_Disconnected, ConnectionStatus_Connected, ConnectionStatus_WrongVersion } |
Public Member Functions | |
| virtual | ~Wallet ()=0 |
| virtual std::string | seed () const =0 |
| virtual std::string | getSeedLanguage () const =0 |
| virtual void | setSeedLanguage (const std::string &arg)=0 |
| virtual int | status () const =0 |
| returns wallet status (Status_Ok | Status_Error) More... | |
| virtual std::string | errorString () const =0 |
| in case error status, returns error string More... | |
| virtual bool | setPassword (const std::string &password)=0 |
| virtual std::string | address () const =0 |
| virtual std::string | path () const =0 |
| virtual bool | testnet () const =0 |
| virtual void | hardForkInfo (uint8_t &version, uint64_t &earliest_height) const =0 |
| returns current hard fork info More... | |
| virtual bool | useForkRules (uint8_t version, int64_t early_blocks) const =0 |
| check if hard fork rules should be used More... | |
| virtual std::string | integratedAddress (const std::string &payment_id) const =0 |
| integratedAddress - returns integrated address for current wallet address and given payment_id. if passed "payment_id" param is an empty string or not-valid payment id string (16 characters hexadecimal string) - random payment_id will be generated More... | |
| virtual std::string | secretViewKey () const =0 |
| secretViewKey - returns secret view key More... | |
| virtual std::string | publicViewKey () const =0 |
| publicViewKey - returns public view key More... | |
| virtual std::string | secretSpendKey () const =0 |
| secretSpendKey - returns secret spend key More... | |
| virtual std::string | publicSpendKey () const =0 |
| publicSpendKey - returns public spend key More... | |
| virtual bool | store (const std::string &path)=0 |
| store - stores wallet to file. More... | |
| virtual std::string | filename () const =0 |
| filename - returns wallet filename More... | |
| virtual std::string | keysFilename () const =0 |
| keysFilename - returns keys filename. usually this formed as "wallet_filename".keys More... | |
| virtual bool | init (const std::string &daemon_address, uint64_t upper_transaction_size_limit, const std::string &daemon_username="", const std::string &daemon_password="")=0 |
| init - initializes wallet with daemon connection params. if daemon_address is local address, "trusted daemon" will be set to true forcibly startRefresh() should be called when wallet is initialized. More... | |
| virtual bool | createWatchOnly (const std::string &path, const std::string &password, const std::string &language) const =0 |
| createWatchOnly - Creates a watch only wallet More... | |
| virtual void | setRefreshFromBlockHeight (uint64_t refresh_from_block_height)=0 |
| setRefreshFromBlockHeight - start refresh from block height on recover More... | |
| virtual uint64_t | getRefreshFromBlockHeight () const =0 |
| getRestoreHeight - get wallet creation height More... | |
| virtual void | setRecoveringFromSeed (bool recoveringFromSeed)=0 |
| setRecoveringFromSeed - set state recover form seed More... | |
| virtual bool | connectToDaemon ()=0 |
| connectToDaemon - connects to the daemon. TODO: check if it can be removed More... | |
| virtual ConnectionStatus | connected () const =0 |
| connected - checks if the wallet connected to the daemon More... | |
| virtual void | setTrustedDaemon (bool arg)=0 |
| virtual bool | trustedDaemon () const =0 |
| virtual uint64_t | balance () const =0 |
| virtual uint64_t | unlockedBalance () const =0 |
| virtual bool | watchOnly () const =0 |
| watchOnly - checks if wallet is watch only More... | |
| virtual uint64_t | blockChainHeight () const =0 |
| blockChainHeight - returns current blockchain height More... | |
| virtual uint64_t | approximateBlockChainHeight () const =0 |
| approximateBlockChainHeight - returns approximate blockchain height calculated from date/time More... | |
| virtual uint64_t | daemonBlockChainHeight () const =0 |
| daemonBlockChainHeight - returns daemon blockchain height More... | |
| virtual uint64_t | daemonBlockChainTargetHeight () const =0 |
| daemonBlockChainTargetHeight - returns daemon blockchain target height More... | |
| virtual bool | synchronized () const =0 |
| synchronized - checks if wallet was ever synchronized More... | |
| virtual void | startRefresh ()=0 |
| StartRefresh - Start/resume refresh thread (refresh every 10 seconds) More... | |
| virtual void | pauseRefresh ()=0 |
| pauseRefresh - pause refresh thread More... | |
| virtual bool | refresh ()=0 |
| refresh - refreshes the wallet, updating transactions from daemon More... | |
| virtual void | refreshAsync ()=0 |
| refreshAsync - refreshes wallet asynchronously. More... | |
| virtual void | setAutoRefreshInterval (int millis)=0 |
| setAutoRefreshInterval - setup interval for automatic refresh. More... | |
| virtual int | autoRefreshInterval () const =0 |
| autoRefreshInterval - returns automatic refresh interval in millis More... | |
| virtual PendingTransaction * | createTransaction (const std::string &dst_addr, const std::string &payment_id, optional< uint64_t > amount, uint32_t mixin_count, PendingTransaction::Priority=PendingTransaction::Priority_Low)=0 |
| createTransaction creates transaction. if dst_addr is an integrated address, payment_id is ignored More... | |
| virtual PendingTransaction * | createSweepUnmixableTransaction ()=0 |
| createSweepUnmixableTransaction creates transaction with unmixable outputs. More... | |
| virtual UnsignedTransaction * | loadUnsignedTx (const std::string &unsigned_filename)=0 |
| loadUnsignedTx - creates transaction from unsigned tx file More... | |
| virtual bool | submitTransaction (const std::string &fileName)=0 |
| submitTransaction - submits transaction in signed tx file More... | |
| virtual void | disposeTransaction (PendingTransaction *t)=0 |
| disposeTransaction - destroys transaction object More... | |
| virtual bool | exportKeyImages (const std::string &filename)=0 |
| exportKeyImages - exports key images to file More... | |
| virtual bool | importKeyImages (const std::string &filename)=0 |
| importKeyImages - imports key images from file More... | |
| virtual TransactionHistory * | history () const =0 |
| virtual AddressBook * | addressBook () const =0 |
| virtual void | setListener (WalletListener *)=0 |
| virtual bool | setUserNote (const std::string &txid, const std::string ¬e)=0 |
| virtual std::string | getUserNote (const std::string &txid) const =0 |
| getUserNote - return an arbitrary string note attached to a txid More... | |
| virtual std::string | getTxKey (const std::string &txid) const =0 |
| virtual std::string | signMessage (const std::string &message)=0 |
| virtual bool | verifySignedMessage (const std::string &message, const std::string &addres, const std::string &signature) const =0 |
| verifySignedMessage - verify a signature matches a given message More... | |
| virtual bool | parse_uri (const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector< std::string > &unknown_parameters, std::string &error)=0 |
| virtual std::string | getDefaultDataDir () const =0 |
| virtual bool | rescanSpent ()=0 |
Static Public Member Functions | |
| static std::string | displayAmount (uint64_t amount) |
| static uint64_t | amountFromString (const std::string &amount) |
| static uint64_t | amountFromDouble (double amount) |
| static std::string | genPaymentId () |
| static bool | paymentIdValid (const std::string &paiment_id) |
| static bool | addressValid (const std::string &str, bool testnet) |
| static bool | keyValid (const std::string &secret_key_string, const std::string &address_string, bool isViewKey, bool testnet, std::string &error) |
| static std::string | paymentIdFromAddress (const std::string &str, bool testnet) |
| static uint64_t | maximumAllowedAmount () |
| static void | init (const char *argv0, const char *default_log_base_name) |
| static void | debug (const std::string &str) |
Interface for wallet operations. TODO: check if /include/IWallet.h is still actual.
|
pure virtual |
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
static |
|
static |
|
pure virtual |
approximateBlockChainHeight - returns approximate blockchain height calculated from date/time
Implemented in Electroneum::WalletImpl.
|
pure virtual |
autoRefreshInterval - returns automatic refresh interval in millis
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
blockChainHeight - returns current blockchain height
Implemented in Electroneum::WalletImpl.
|
pure virtual |
connected - checks if the wallet connected to the daemon
Implemented in Electroneum::WalletImpl.
|
pure virtual |
connectToDaemon - connects to the daemon. TODO: check if it can be removed
Implemented in Electroneum::WalletImpl.
|
pure virtual |
createSweepUnmixableTransaction creates transaction with unmixable outputs.
Implemented in Electroneum::WalletImpl.
|
pure virtual |
createTransaction creates transaction. if dst_addr is an integrated address, payment_id is ignored
| dst_addr | destination address as string |
| payment_id | optional payment_id, can be empty string |
| amount | amount |
| mixin_count | mixin count. if 0 passed, wallet will use default value |
| priority |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
createWatchOnly - Creates a watch only wallet
| path | - where to store the wallet |
| password | |
| language |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
daemonBlockChainHeight - returns daemon blockchain height
Implemented in Electroneum::WalletImpl.
|
pure virtual |
daemonBlockChainTargetHeight - returns daemon blockchain target height
Implemented in Electroneum::WalletImpl.
|
static |
|
static |
|
pure virtual |
disposeTransaction - destroys transaction object
| t | - pointer to the "PendingTransaction" object. Pointer is not valid after function returned; |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
in case error status, returns error string
Implemented in Electroneum::WalletImpl.
|
pure virtual |
exportKeyImages - exports key images to file
| filename |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
|
static |
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
getRestoreHeight - get wallet creation height
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
getUserNote - return an arbitrary string note attached to a txid
| txid | - the transaction id to attach the note to |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
returns current hard fork info
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
importKeyImages - imports key images from file
| filename |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
init - initializes wallet with daemon connection params. if daemon_address is local address, "trusted daemon" will be set to true forcibly startRefresh() should be called when wallet is initialized.
| daemon_address | - daemon address in "hostname:port" format |
| upper_transaction_size_limit |
Implemented in Electroneum::WalletImpl.
|
static |
|
pure virtual |
integratedAddress - returns integrated address for current wallet address and given payment_id. if passed "payment_id" param is an empty string or not-valid payment id string (16 characters hexadecimal string) - random payment_id will be generated
| payment_id | - 16 characters hexadecimal string or empty string if new random payment id needs to be generated |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
keysFilename - returns keys filename. usually this formed as "wallet_filename".keys
Implemented in Electroneum::WalletImpl.
|
static |
|
pure virtual |
loadUnsignedTx - creates transaction from unsigned tx file
Implemented in Electroneum::WalletImpl.
|
static |
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
pauseRefresh - pause refresh thread
Implemented in Electroneum::WalletImpl.
|
static |
|
static |
|
pure virtual |
publicSpendKey - returns public spend key
Implemented in Electroneum::WalletImpl.
|
pure virtual |
publicViewKey - returns public view key
Implemented in Electroneum::WalletImpl.
|
pure virtual |
refresh - refreshes the wallet, updating transactions from daemon
Implemented in Electroneum::WalletImpl.
|
pure virtual |
refreshAsync - refreshes wallet asynchronously.
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
secretSpendKey - returns secret spend key
Implemented in Electroneum::WalletImpl.
|
pure virtual |
secretViewKey - returns secret view key
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
setAutoRefreshInterval - setup interval for automatic refresh.
| seconds | - interval in millis. if zero or less than zero - automatic refresh disabled; |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
setRecoveringFromSeed - set state recover form seed
| recoveringFromSeed | - true/false |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
setRefreshFromBlockHeight - start refresh from block height on recover
| refresh_from_block_height | - blockchain start height |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
StartRefresh - Start/resume refresh thread (refresh every 10 seconds)
Implemented in Electroneum::WalletImpl.
|
pure virtual |
returns wallet status (Status_Ok | Status_Error)
Implemented in Electroneum::WalletImpl.
|
pure virtual |
store - stores wallet to file.
| path | - main filename to store wallet to. additionally stores address file and keys file. to store to the same file - just pass empty string; |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
submitTransaction - submits transaction in signed tx file
Implemented in Electroneum::WalletImpl.
|
pure virtual |
synchronized - checks if wallet was ever synchronized
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
check if hard fork rules should be used
Implemented in Electroneum::WalletImpl.
|
pure virtual |
verifySignedMessage - verify a signature matches a given message
| message | - the message (arbitrary byte data) |
| address | - the address the signature claims to be made with |
| signature | - the signature |
Implemented in Electroneum::WalletImpl.
|
pure virtual |
watchOnly - checks if wallet is watch only
Implemented in Electroneum::WalletImpl.
1.8.14