diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-12-20 17:45:13 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-12-20 17:45:13 +0200 |
commit | 233ba51ad90783cd4caf0a9b38aea0a16264a3bc (patch) | |
tree | d4f58845ab8df060b3baddbd3154ed37567a4c2a /src/wallet/api/wallet_manager.cpp | |
parent | Merge pull request #1467 (diff) | |
parent | wallet2_api: add an API to the OpenAlias resolver (diff) | |
download | monero-233ba51ad90783cd4caf0a9b38aea0a16264a3bc.tar.xz |
Merge pull request #1468
9a2cd722 wallet2_api: add an API to the OpenAlias resolver (moneromooo-monero)
Diffstat (limited to 'src/wallet/api/wallet_manager.cpp')
-rw-r--r-- | src/wallet/api/wallet_manager.cpp | 8 |
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() |