mirror of
https://github.com/monero-project/monero.git
synced 2025-05-19 22:10:25 -04:00
wallet2_api: add an API to the OpenAlias resolver
This commit is contained in:
parent
29735c8f8f
commit
9a2cd72257
3 changed files with 12 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue