aboutsummaryrefslogtreecommitdiff
path: root/src/common/dns_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/dns_utils.h')
-rw-r--r--src/common/dns_utils.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h
index 2e87fb01f..53c0c1c7b 100644
--- a/src/common/dns_utils.h
+++ b/src/common/dns_utils.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2016, The Monero Project
+// Copyright (c) 2014-2017, The Monero Project
//
// All rights reserved.
//
@@ -25,9 +25,11 @@
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#pragma once
#include <vector>
#include <string>
+#include "cryptonote_basic/cryptonote_basic.h"
namespace tools
{
@@ -155,4 +157,16 @@ private:
DNSResolverData *m_data;
}; // class DNSResolver
+namespace dns_utils
+{
+
+std::string address_from_txt_record(const std::string& s);
+std::vector<std::string> addresses_from_url(const std::string& url, bool& dnssec_valid);
+
+std::string get_account_address_as_str_from_url(const std::string& url, bool& dnssec_valid, bool cli_confirm = true);
+
+bool load_txt_records_from_dns(std::vector<std::string> &records, const std::vector<std::string> &dns_urls);
+
+} // namespace tools::dns_utils
+
} // namespace tools