m2049r / xmrwallet

monerujo: An Android Monero Wallet
https://www.monerujo.io/
Apache License 2.0
617 stars 273 forks source link

Add ENS and UD resolver #779

Open paxriel opened 3 years ago

paxriel commented 3 years ago

Adds capabilities to resolve ENS and Unstoppable Domains via Unstoppable Domain's Java library. The ENS resolver connects to https://cloudflare-eth.com as the default ENS resolver has rate limits on ENS domain requests.

Resolving Domain Address shown once domain name has resolved Fallback to other crypto No suitable address is found
resolving xmr btc no_addr

The app would check for OpenAlias addresses first, before using ENS and Unstoppable Domains addresses. A 1-2 second delay may be expected while waiting for the ENS and UD addresses to be resolved.

m2049r commented 3 years ago

how much data is leaked resolving UD (or even openalias, as UD is done first just-in-case) and to whom? EDIT: and what exactly?

paxriel commented 3 years ago

https://github.com/unstoppabledomains/resolution-java/blob/master/src/main/java/com/unstoppabledomains/resolution/Resolution.java#L32

From what I can see, the library uses 3 different resolvers for different domains. ENS domains will go through Cloudflare's Ethereum node, UNS domains will go through an Infura node, and Zilliqa domains will go through Zilliqa's API. For an invalid domain, the library defaults to UNS domains.

As for what data is sent out, I'm not 100% certain. For ZNS, the namehash version of the domain is sent to the API, and for ENS and UNS, it seems like the raw domain string is sent.

nahuhh commented 2 years ago

@paxriel

Is this also working if scanning a qr code? (Cake wallet will enter the address, but not perform the check until you manually interact with the field)

Is it possible to have it only have it perform a check if the address contains a period?