Here are best practices to ensure the proper integration of the Unstoppable Domains resolution features into your applications:
Unstoppable Domains periodically adds new domain endings, and our Resolution libraries and APIs are designed to detect and support them automatically. This means you do not need to implement a front-end filter in your application (e.g., by hard-coding specific domains or using a regex filter for only
.nft, etc.). We also provide an API endpoint to query for supported domain endings.
Always display the resolved crypto address near the domain name for additional security. Doing this helps your application's user detect and avoid Man-in-the-middle (MITM) attacks aimed at replacing the payment address with the attacker's own.
For the best user experience of your application, don't overwrite the domain input field with cryptocurrency addresses after resolving the domain. Doing this allows them to quickly fix typos if they make any without typing the domain name again because an address has replaced it.
When you don't find a currency address record for a domain, please do not make assumptions about the currency code and try others. Instead, inform the user that they have not set an address for the requested currency.
When you encounter errors using any resolution method (Resolution Libraries, Resolution Service API, CLI, Blockchain Calls), handle them according to the error type rather than generically handling them or passing them silently. Please see the Resolution Libraries docs for language-specific error handling guides and library error codes you might encounter during integration.
Always validate the addresses you resolve from domains using the resolution methods (Resolution Libraries, Resolution Service API, CLI, Blockchain Calls) because the user has complete control over the domain and can set invalid values for its records.
Add notes, hints, and placeholders in your application to remind users that they can use their UD domains to send crypto instead of using long wallet addresses every time.