diff options
author | kenshi84 <kenshi84@protonmail.ch> | 2016-12-16 12:06:50 +0900 |
---|---|---|
committer | kenshi84 <kenshi84@protonmail.ch> | 2016-12-21 23:12:15 +0900 |
commit | 99580adf66b7d2f9d744f8d8a162de1b88955ddf (patch) | |
tree | d5da012e2f8bc28d2a3fdff7d4759bd16a46bea0 /src/common/dns_utils.h | |
parent | Merge pull request #1479 (diff) | |
download | monero-99580adf66b7d2f9d744f8d8a162de1b88955ddf.tar.xz |
make openalias also available for solo miner; introduce namespace tools::dns_utils; support integrated address with dns lookup
Diffstat (limited to '')
-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 |