diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-01-08 16:31:42 -0800 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-01-08 16:31:42 -0800 |
commit | ff1bb6bc6801da46f1fc06b1e177ed53a19acb53 (patch) | |
tree | 5fa4c8e59e2598fdac67dcc08ca4f62faffd33c4 /src/common/dns_utils.h | |
parent | Merge pull request #1487 (diff) | |
parent | make openalias also available for solo miner; introduce namespace tools::dns_... (diff) | |
download | monero-ff1bb6bc6801da46f1fc06b1e177ed53a19acb53.tar.xz |
Merge pull request #1460
99580adf make openalias also available for solo miner; introduce namespace tools::dns_utils; support integrated address with dns lookup (kenshi84)
Diffstat (limited to 'src/common/dns_utils.h')
-rw-r--r-- | src/common/dns_utils.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/dns_utils.h b/src/common/dns_utils.h index 2e87fb01f..5fe1d4775 100644 --- a/src/common/dns_utils.h +++ b/src/common/dns_utils.h @@ -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_core/cryptonote_basic.h" namespace tools { @@ -155,4 +157,21 @@ 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 get_account_address_from_str_or_url( + cryptonote::account_public_address& address + , bool& has_payment_id + , crypto::hash8& payment_id + , bool testnet + , const std::string& str_or_url + ); + +} // namespace tools::dns_utils + } // namespace tools |