aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet_manager.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-17 12:48:22 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-12-17 13:05:17 +0000
commit9a2cd7225727b3cdb7fb8b414cd99b32d974d249 (patch)
tree380330a491ab6a6c3ad2b16791c25031cf7fcbda /src/wallet/api/wallet_manager.cpp
parentMerge pull request #1459 (diff)
downloadmonero-9a2cd7225727b3cdb7fb8b414cd99b32d974d249.tar.xz
wallet2_api: add an API to the OpenAlias resolver
Diffstat (limited to '')
-rw-r--r--src/wallet/api/wallet_manager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp
index 5a6f02b01..4ee5ab8df 100644
--- a/src/wallet/api/wallet_manager.cpp
+++ b/src/wallet/api/wallet_manager.cpp
@@ -352,6 +352,14 @@ double WalletManagerImpl::miningHashRate() const
return mres.speed;
}
+std::string WalletManagerImpl::resolveOpenAlias(const std::string &address, bool &dnssec_valid) const
+{
+ std::vector<std::string> addresses = tools::wallet2::addresses_from_url(address, dnssec_valid);
+ if (addresses.empty())
+ return "";
+ return addresses.front();
+}
+
///////////////////// WalletManagerFactory implementation //////////////////////
WalletManager *WalletManagerFactory::getWalletManager()