mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 15:21:30 +02:00
monero_wallet->is_watch_only()
This commit is contained in:
@@ -129,6 +129,16 @@ namespace monero {
|
||||
*/
|
||||
virtual ~monero_wallet() {}
|
||||
|
||||
/**
|
||||
* Indicates if the wallet is watch-only, meaning it does have the private
|
||||
* spend key and can therefore only observe incoming outputs.
|
||||
*
|
||||
* @return true if the wallet is watch-only, false otherwise
|
||||
*/
|
||||
virtual bool is_watch_only() const {
|
||||
throw runtime_error("is_watch_only() not supported");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the wallet's daemon connection.
|
||||
*
|
||||
|
||||
@@ -173,6 +173,7 @@ namespace monero {
|
||||
/**
|
||||
* Supported wallet methods.
|
||||
*/
|
||||
bool is_watch_only() const { return m_w2->watch_only(); }
|
||||
void set_daemon_connection(const string& uri, const string& username = "", const string& password = "");
|
||||
void set_daemon_connection(const boost::optional<monero_rpc_connection>& connection);
|
||||
boost::optional<monero_rpc_connection> get_daemon_connection() const;
|
||||
|
||||
@@ -178,6 +178,7 @@ namespace monero {
|
||||
}
|
||||
|
||||
// initialize remaining wallet
|
||||
wallet->m_is_watch_only = !has_spend_key;
|
||||
wallet->m_network_type = network_type;
|
||||
if (!spend_key.empty()) {
|
||||
wallet->m_language = language;
|
||||
|
||||
@@ -116,6 +116,7 @@ namespace monero {
|
||||
/**
|
||||
* Supported wallet methods.
|
||||
*/
|
||||
bool is_watch_only() const { return m_is_watch_only; }
|
||||
monero_version get_version() const;
|
||||
monero_network_type get_network_type() const { return m_network_type; }
|
||||
string get_mnemonic() const { return m_mnemonic; }
|
||||
@@ -137,6 +138,7 @@ namespace monero {
|
||||
// --------------------------------- PRIVATE --------------------------------
|
||||
|
||||
private:
|
||||
bool m_is_watch_only;
|
||||
monero_network_type m_network_type;
|
||||
cryptonote::account_base m_account;
|
||||
string m_mnemonic;
|
||||
|
||||
Reference in New Issue
Block a user