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 Web3 domain names. It can be used to retrieve crypto 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 application, please see the Resolution CLI Repository on Github.

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) .x, .polygon, .nft, .crypto, .blockchain, .bitcoin, .dao, .888, .wallet, .binanceus, .hi, .klever, .kresus, .anime, .manga, .go, .altimist, .pudgy, .unstoppable, .austin, .bitget, .pog, .clay, .witg, .metropolis, .wrkx, .secret, .raiin, .stepn, .kryptic, .ubu, .tball, .farms, .dfz, .smobler, .lfg, .dream, .benji, .mumu
Ethereum Name Service (ENS) .eth

For the full list, check the supported TLDs endpoint.

important

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 .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 install github.com/unstoppabledomains/resolution-cli/resolution@latest

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"
   }
}

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/{API_KEY} -d udtestdev-usdt.crypto
info

Use the -h or --help flag to see all the available CLI options.

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.