Edit this page

Resolution CLI

The Resolution-CLI is built and maintained by Unstoppable Domains. It is a simple CLI tool for resolving Unstoppable domains and interacting with NFT domain names. It can be used to retrieve payment addresses, IPFS hashes for decentralized websites, DNS records and other records types. Each Resolution Library is built and maintained by Unstoppable Domains, so updates happen automatically.

For more information on resolving domains using the Resolution CLI option, please see the Resolution CLI Repository on Github.

important

Unstoppable Domains periodically releases new domain endings, and our Resolution libraries and APIs will automatically detect and support them. Therefore, do not implement a front-end filter into your application (e.g., hard-coding domains or placing a regex filter for just .crypto, .nft, etc.). We also provide an API endpoint to query for supported domain endings.

Installing Resolution CLI

To use resolution via the command line, download one of the binaries or install using Go.

Copy
Copied
go get -u github.com/unstoppabledomains/resolution-cli/resolution

Use Case: Retrieve an ETH Address

This will retrieve the ETH address of a domain:

Copy
Copied
resolution resolve addr ETH -d brad.crypto
"0x8aaD44321A86b170879d7A244c1e8d360c99DdA8"

The crypto.ETH.address can be located in the Records Reference.

Use Case: Retrieve a Domain Record

And this will retrieve any record from the domain, if it exists, and return the following records:

Copy
Copied
resolution resolve records crypto.ETH.address crypto.BTC.address -d brad.crypto
{
   "records": {
      "crypto.BTC.address": "bc1q359khn0phg58xgezyqsuuaha28zkwx047c0c3y",
      "crypto.ETH.address": "0x8aaD44321A86b170879d7A244c1e8d360c99DdA8"
   }
}

Supported Domains for Resolution CLI

The Resolution CLI supports decentralized domains across two main zones:

Name Service Supported Domains
Zilliqa Name Service (ZNS) .zil
Unstoppable Name Service (UNS) .crypto, .nft, .blockchain, .bitcoin, .coin, .wallet, .888, .dao, .x

Custom Ethereum Provider Configuration

By default, the CLI uses Alchemy as its primary gateway to the blockchain. If you'd like to override this default and set another provider you can do so using the --ethereum-provider-url flag for Ethereum and ethereum-l2-provider-url for Polygon.

For example:

Copy
Copied
resolution --ethereum-provider-url https://eth-mainnet.g.alchemy.com/v2/${secret} -d udtestdev-usdt.crypto

Error Codes

Below is a list of all the error codes you might encounter when using the Resolution CLI.

Error Code Description
Domain is not registered Thrown when you resolve a domain not owned by any address.
Domain does not have configured Resolver Thrown when the domain resolver contract address is not found. For example, the domain doesn't have a specified resolver.
Domain is not supported by naming service Thrown when you resolve a domain with an ending not supported by the CLI.
Method is not supported Thrown when the CLI is trying to use a method not supported by the naming service its resolving from.
Domain was returned from metadata provider Thrown when you resolve an invalid domain address.
Invalid UNS configuration value Thrown when the UNS resolution service is misconfigured.

Asking For Help

Having troubles using our services? We’re here to help. Join our Discord Community for real-time support from UD and the community if you need assistance integrating your app.