Monero
Loading...
Searching...
No Matches
tools::dns_utils Namespace Reference

Functions

std::string address_from_txt_record (const std::string &s)
std::vector< std::string > addresses_from_url (const std::string &url, bool &dnssec_valid)
 gets a monero address from the TXT record of a DNS entry
std::string get_account_address_as_str_from_url (const std::string &url, bool &dnssec_valid, std::function< std::string(const std::string &, const std::vector< std::string > &, bool)> dns_confirm)
bool load_txt_records_from_dns (std::vector< std::string > &good_records, const std::vector< std::string > &dns_urls)
std::vector< std::string > parse_dns_public (const char *s)

Function Documentation

◆ address_from_txt_record()

std::string tools::dns_utils::address_from_txt_record ( const std::string & s)

◆ addresses_from_url()

std::vector< std::string > tools::dns_utils::addresses_from_url ( const std::string & url,
bool & dnssec_valid )

gets a monero address from the TXT record of a DNS entry

gets the monero address from the TXT record of the DNS entry associated with <url>. If this lookup fails, or the TXT record does not contain an XMR address in the correct format, returns an empty string. <dnssec_valid> will be set true or false according to whether or not the DNS query passes DNSSEC validation.

Parameters
urlthe url to look up
dnssec_validreturn-by-reference for DNSSEC status of query
Returns
a monero address (as a string) or an empty string

◆ get_account_address_as_str_from_url()

std::string tools::dns_utils::get_account_address_as_str_from_url ( const std::string & url,
bool & dnssec_valid,
std::function< std::string(const std::string &, const std::vector< std::string > &, bool)> dns_confirm )

◆ load_txt_records_from_dns()

bool tools::dns_utils::load_txt_records_from_dns ( std::vector< std::string > & good_records,
const std::vector< std::string > & dns_urls )

◆ parse_dns_public()

std::vector< std::string > tools::dns_utils::parse_dns_public ( const char * s)