Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@unstoppabledomains/resolution

unstoppabledomains18.5kMIT9.3.3TypeScript support: included

Domain Resolution for blockchain domains

.crypto, zns, ens, ethereum, zilliqa, blockchain, resolution, name, domain, unstoppable

readme

Resolution

NPM version CI Bundle Size Minified Bundle Size Minified Zipped Unstoppable Domains Documentation Get help on Discord

Resolution is a library for interacting with blockchain domain names. It can be used to retrieve payment addresses and IPFS hashes for decentralized websites.

Resolution is primarily built and maintained by Unstoppable Domains.

Resolution supports different decentralized domains. Please, refer to the Top Level Domains List

For more information, see our detailed API Reference.

Installing Resolution

Resolution can be installed with either yarn or npm.

yarn add @unstoppabledomains/resolution
npm install @unstoppabledomains/resolution --save

If you're interested in resolving domains via the command line, see our CLI section.

Updating Resolution

Resolution can be updated with either yarn or npm.

yarn upgrade @unstoppabledomains/resolution --latest
npm update @unstoppabledomains/resolution --save

Using Resolution

Initialize with Unstoppable Domains' UNS Proxy Provider

const {default: Resolution} = require('@unstoppabledomains/resolution');

// obtain a key by following this document https://docs.unstoppabledomains.com/domain-distribution-and-management/quickstart/retrieve-an-api-key/#api-key
const resolution = new Resolution({apiKey: '<api_key>'});

NOTE: The apiKey is only used resolve domains from UNS. Behind the scene, it still uses the default ZNS (Zilliqa) RPC url. For additional control, please specify your ZNS configuration.

const {default: Resolution} = require('@unstoppabledomains/resolution');

const resolution = new Resolution({
  apiKey: '<api_key>',
  sourceConfig: {
    zns: {
      url: 'https://api.zilliqa.com',
      network: 'mainnet',
    },
  },
});

Initialize with Custom Provider Configuration

You may want to specify a custom provider:

  • if you want to use a dedicated blockchain node
  • if you want to monitor app usage
  • if you already have a provider in your app to re-use it for domain resolution

Default provider can be changed by changing constructor options new Resolution(options) or by using one of the factory methods:

  • Resolution.alchemy()
  • Resolution.infura()
  • Resolution.fromWeb3Version1Provider()
  • Resolution.fromEthersProvider()
  • etc.
const {default: Resolution} = require('@unstoppabledomains/resolution');

// obtain a key from https://www.infura.io
const resolution = new Resolution({
  sourceConfig: {
    uns: {
      locations: {
        Layer1: {
          url: 'https://mainnet.infura.io/v3/<infura_api_key>',
          network: 'mainnet',
        },
        Layer2: {
          url: 'https://polygon-mainnet.infura.io/v3/<infura_api_key>',
          network: 'polygon-mainnet',
        },
      },
    },
    zns: {
      url: 'https://api.zilliqa.com',
      network: 'mainnet',
    },
    ens: {
      url: 'https://mainnet.infura.io/v3/<infura_api_key>',
      network: 'mainnet',
    },
  },
});

Initialize with Autoconfiguration of blockchain network

In some scenarios system might not be flexible enough to easy distinguish between various Ethereum testnets at compilation time. In this case, Resolution library provide a special async constructor await Resolution.autonetwork(options). This method makes a JSON RPC "net_version" call to the provider to get the network id.

This method configures only Uns. Zns is supported only on Zilliqa mainnet which is going to be used in any cases. You can provide a configured provider or a blockchain url as in the following example:

await Resolution.autoNetwork({
  uns: {provider},
});

Examples

To see all constructor options and factory methods check Unstoppable API reference.

Look up a domain's crypto address

function resolve(domain, currency) {
  resolution
    .addr(domain, currency)
    .then((address) => console.log(domain, 'resolves to', address))
    .catch(console.error);
}

resolve('brad.crypto', 'ETH');
resolve('brad.zil', 'ZIL');
resolve('vitalik.eth', 'ETH');

Find the IPFS hash for a decentralized website

Create a new file in your project, ipfs_hash.js.

function resolveIpfsHash(domain) {
  resolution
    .ipfsHash(domain)
    .then((hash) =>
      console.log(
        `You can access this website via a public IPFS gateway: https://gateway.ipfs.io/ipfs/${hash}`,
      ),
    )
    .catch(console.error);
}

resolveIpfsHash('homecakes.crypto');
resolveIpfsHash('vitalik.eth');

Find a custom record

Create a new file in your project, custom-resolution.js.

// Does not support ENS

function resolveCustomRecord(domain, record) {
  resolution
    .records(domain, [record])
    .then((value) => console.log(`Domain ${domain} ${record} is: ${value}`))
    .catch(console.error);
}

resolveCustomRecord('homecakes.crypto', 'custom.record.value');

Resolve wallet address using addr

This API is used to retrieve wallet address for single address record. (See Cryptocurrency payment section for the record format)

With homecakes.crypto has crypto.ETH.address on-chain:

function getWalletAddr(domain, ticker) {
  resolution
    .addr(domain, ticker)
    .then((address) =>
      console.log(`Domain ${domain} has address for ${ticker}: ${address}`),
    )
    .catch(console.error);
}
getWalletAddr('homecakes.crypto', 'ETH');
// Domain homecakes.crypto has address for ETH: 0xe7474D07fD2FA286e7e0aa23cd107F8379085037
getWalletAddr('vitalik.eth', 'ETH');
// Domain homecakes.crypto has address for ETH: 0xe7474D07fD2FA286e7e0aa23cd107F8379085037

Resolve multi-chain address format using multiChainAddr

This API is used to retrieve wallet address for multi-chain address records. (See multi-chain currency)

With aaron.x has crypto.AAVE.version.ERC20.address on-chain:

// Does not support ENS

function getMultiChainWalletAddr(domain, ticker, network) {
  resolution
    .multiChainAddr(domain, ticker, network)
    .then((address) =>
      console.log(
        `Domain ${domain} has address for ${ticker} on network ${network}: ${address}`,
      ),
    )
    .catch(console.error);
}
getMultiChainWalletAddr('aaron.x', 'AAVE', 'ETH');
// Domain aaron.x has address for AAVE on network ETH: 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af

Resolve wallet address using getAddress

This (beta) API can be used to resolve different formats

function getWalletAddress(domain, network, token) {
  resolution
    .getAddress(domain, network, token)
    .then((address) =>
      console.log(
        `Domain ${domain} has address for ${token} on ${network}: ${address}`,
      ),
    )
    .catch(console.error);
}

Resolve single address format (similar to **addr API)**

With homecakes.crypto has a crypto.ETH.address record set on-chain:

getWalletAddress('homecakes.crypto', 'ETH', 'ETH');
// Domain homecakes.crypto has address for ETH on ETH: 0xe7474D07fD2FA286e7e0aa23cd107F8379085037

Resolve multi-chain currency address format (See multi-chain currency)

With aaron.x has a crypto.AAVE.version.ERC20.address record set to 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af. The ERC20 indicates it's a token on ETH network:

getWalletAddress('aaron.x', 'ETH', 'AAVE');
// Domain aaron.x has address for AAVE on ETH: 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af

Derive wallet addresses within the same blockchain network and blockchain family.

The API can also be used by crypto exchanges to infer wallet addresses. In centralized exchanges, users have same wallet addresses on different networks with same wallet family. (See Blockchain Family, Network, Token Level Addresses section for the record format)

With blockchain-family-keys.x only has token.EVM.address record on-chain. The API resolves to same wallet address for tokens live on EVM compatible networks.

getWalletAddress('blockchain-family-keys.x', 'ETH', 'AAVE');
// Domain blockchain-family-keys.x has address for AAVE on ETH: 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af

getWalletAddress('blockchain-family-keys.x', 'ETH', 'ETH');
// Domain blockchain-family-keys.x has address for ETH on ETH: 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af

getWalletAddress('blockchain-family-keys.x', 'AVAX', 'USDT');
// Domain blockchain-family-keys.x has address for USDT on AVAX: 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af

With uns-devtest-nickshatilo-withdraw-test2.x only has token.EVM.ETH.address record on chain. The API resolves to the same wallet address for tokens specifically on Ethereum network.

getWalletAddress('uns-devtest-nickshatilo-withdraw-test2.x', 'ETH', 'AAVE');
// Domain blockchain-family-keys.x has address for AAVE on ETH: 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af

getWalletAddress('uns-devtest-nickshatilo-withdraw-test2.x', 'ETH', 'MATIC');
// Domain blockchain-family-keys.x has address for ETH on ETH: 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af

getWalletAddress('uns-devtest-nickshatilo-withdraw-test2.x', 'ETH', 'USDT');
// Domain blockchain-family-keys.x has address for USDT on ETH: 0xCD0DAdAb45bAF9a06ce1279D1342EcC3F44845af

getWalletAddress('uns-devtest-nickshatilo-withdraw-test2.x', 'MATIC', 'USDT');
// won't work

The API is compatible with other address formats. If a domain has multiple address formats set, it will follow the algorithm described as follow:

if a domain has following records set:

token.EVM.address
crypto.USDC.version.ERC20.address
token.EVM.ETH.USDC.address
crypto.USDC.address
token.EVM.ETH.address

getAddress(domain, 'ETH', 'USDC') will lookup records in the following order: // Not supported with ENS

1. token.EVM.ETH.USDC.address
2. crypto.USDC.address
3. crypto.USDC.version.ERC20.address
4. token.EVM.ETH.address
5. token.EVM.address

Error Handling

When resolution encounters an error it returns the error code instead of stopping the process. Keep an eye out for return values like RECORD_NOT_FOUND.

Development

Use these commands to set up a local development environment (macOS Terminal or Linux shell).

  1. Recommended NodeJs version

  2. Node v16

  3. Clone the repository

    git clone https://github.com/unstoppabledomains/resolution.git
    cd resolution
  4. Install dependencies

    yarn install

    or

    npm install

Internal config

To update:

  • Network config: $ yarn network-config:pull
  • Resolver keys: $ yarn resolver-keys:pull
  • Both configs: $ yarn config:pull

Unit tests:

Resolution library relies on environment variables to load TestNet RPC Urls. This way, our keys don't expose directly to the code. These environment variables are:

  • L1_TEST_NET_RPC_URL
  • L1_TEST_NET_RPC_WSS_URL
  • L2_TEST_NET_RPC_URL
  • L2_TEST_NET_RPC_WSS_URL

In order to validate the code change, copy .env.example file change the name to .env. Then, update the values of variables.

Free advertising for integrated apps

Once your app has a working Unstoppable Domains integration, register it here. Registered apps appear on the Unstoppable Domains homepage and Applications page — putting your app in front of tens of thousands of potential customers per day.

Also, every week we select a newly-integrated app to feature in the Unstoppable Update newsletter. This newsletter is delivered straight into the inbox of ~100,000 crypto fanatics — all of whom could be new customers to grow your business.

Get help

Join our discord community and ask questions.

Help us improve

We're always looking for ways to improve how developers use and integrate our products into their applications. We'd love to hear about your experience to help us improve by taking our survey.

changelog

9.3.1

  • Resolve .xyz TLD as UNS domains
  • Remove .kred and .luxe from ENS resolution

9.3.0

  • Support Base blockchain UNS domains resolution

9.2.2

  • Changed devDependencies to dependencies

9.2.1

  • Fix ens-config.json path error

9.2.0

  • Add ENS support

9.1.0

  • Add new getAddress API

9.0.0

  • Allow initialization with partner key
  • Remove default RPC urls

8.5.1

  • Update uns config dependency

8.5.0

  • Swapped Alchemy to Infura as default provider

8.4.0

  • Deprecate allRecords method

8.3.2

  • Fixed reverse function padding issue

8.3.1

  • Fixed tokenURI error handling

8.2.0

  • Fixed default library configuration
  • Added function for alchemy configuration Resolution#alchemy

8.0.0

  • Added Node.js v16 support
  • .zil domains are now also looked up via UNS
  • The locations method was implemented for ZNS

Breaking changes

  • Dropped Node.js v10 support
  • The serviceName method was removed
  • The following methods got a new mandatory argument to specify NamingService:

    • namehash
    • isValidHash

    Note: if you used them for .zil domains, you should now determine where a domain is located first, It's possible that a domain has been migrated from ZNS to UNS, which would imply the usage of a different namehashing algorithm to calculate its token id.

7.2.0

  • Implementation of reverse resolution methods

7.1.3

  • Implemented function getDomainFromTokenId in UdApi

7.1.2

  • Removed unused code which caused build issues on some environments

7.1.0

  • Throw ResolutionErrorCode.InvalidDomainAddress error if domain contains special characters
    • Domain name is being validated according to the following regular expression: ^[.a-z0-9-]+$

7.0.0

  • ENS support is completely removed
  • Removes bip44-constants, @ensdomains/address-encoder, and content-hash package dependencies
  • Methods that query ENS domains (.eth, .luxe, .xyz, .kred, .reverse) throw UnsupportedDomain

6.0.3

  • Remove relative imports to avoid issues in bundlers. Restrict relative imports by adding eslint rule.

6.0.2

  • Resolution#owner method doesn't throw an error in case of empty resolver

6.0.1

  • Set correct polygon-mainnet provider if use default settings

6.0.0

Breaking changes

  • CLI tool was removed. Please use new binary CLI tool instead: Github repo.
  • Constructor has changed. If you used uns configuration you have to specify parameters for L1 and L2 locations (Ethereum and Polygon mainnets).
  • ENS support is deprecated and will be removed in future.
  • Factory methods has changed. All of them requires provide L1 and L2 locations configuration for UNS. For example: uns: {locations: {L1: ..., L2...}}.
    • The list of affected methods:
      • Resolution#infura
      • Resolution#fromResolutionProvider
      • Resolution#fromEthereumEip1193Provider
      • Resolution#fromWeb3Version0Provider
      • Resolution#fromWeb3Version1Provider
      • Resolution#fromEthersProvider
  • Resolution#location method is replaced by Resolution#locations.

New methods and features

  • 🎉 🎉 🎉 Add Polygon Layer 2 support!
  • Add Resolution#locations method which will help to determine domains location (blockhain, networkId) and useful metadata like owner, resolver, registry addresses, provider url if possible.
    • Method returns:
      • Domain blockhain (ETH or MATIC)
      • Blockchain network id (numeric)
      • Owner address
      • Resolver address
      • Registry address
      • Provider URL if possible
        • Infura URL by default

5.0.2

  • Replaces node-fetch with cross-fetch package

5.0.1

  • Add elliptic package dependency in order to enable twitter verification support by default

5.0.0

Breaking changes

  • Constructor has changed. If you used cns configurations rename "cns" it to "uns" instead.
    • For example: new Resolution({sourceConfig: {uns: {...uns config}}})
  • Method Resolution#fromEip1193Provider was renamed to Resolution#fromEthereumEip1193Provider
  • Factory methods has changed. All of them requires {uns: {... uns config}} in parameters instead of cns.
    • The list of affected factory methods:
      • Resolution#autoNetwork
      • Resolution#infura
      • Resolution#fromEthereumEip1193Provider (former Resolution#fromEip1193Provider)
      • Resolution#fromWeb3Version0Provider
      • Resolution#fromWeb3Version1Provider
      • Resolution#fromEthersProvider
  • Resolution#isSupportedDomain method is now asynchronous

New methods and features

  • 🎉 🎉 🎉 Added support for new TLD's ( .888, .nft, .coin, .blockchain, .wallet, .x, .bitcoin, .dao )
  • Typo fix: Rename Eip1993Factories() -> Eip1193Factories(). Old name is still available under the alias Eip1993Factories
  • Introduced new method Resolution#registryAddress -> Retrieves address of registry contract used for domain
  • Introduced new method Resolution#unhash -> Retrieves the domain name from tokenId by parsing registry smart contract event logs
  • Introduced new method Resolution#reverse -> This method is only for ens at the moment. Reverse the ens address to a ens registered domain name
  • Introduced new method Resolution#tokenURI -> Retrieves the tokenURI from the registry smart contract
  • Introduced new method Resolution#tokenURIMetadata -> etrieves the data from the endpoint provided by tokenURI from the registry smart contract
  • Introduced new factory method Resolution#fromZilliqaProvider -> Creates a resolution instance with configured provider from Zilliqa provider
  • Introduced new factory method Resolution#fromResolutionProvider -> Creates a resolution from Resolution compatitable provider
  • Introduced new factory method Resolution#fromEthereumEip1193Provider -> Creates a resolution from EIP-1193 compatitable provider
  • Return ENS support
  • Add custom network support for ENS

4.0.1 - 4.0.2

  • No changes made. Version bump so that it would appear as latest version on NPM.

4.0.0

  • Remove ENS support

3.0.0

  • ENS support is disabled by default. To enable ENS support install additional packages:
    • "bip44-constants": "^8.0.5"
    • "@ensdomains/address-encoder": ">= 0.1.x <= 0.2.x"
    • "content-hash": "^2.5.2"
  • If trying to resolve ENS domain and some package is missing the library throws ConfigurationError

2.1.0

  • Introduce new factory method Resolution#autonetwork. This factory is asynchronious and allows to skip the network configuration for either ens or cns. This method is making a "net_version" call to the blockchain provider in order to configure itself.

2.0.0

  • Remove deprecated methods
    • Resolution#address
    • Resolution#ipfsRedirect
    • Resolution#addressOrThrow
    • ResolutionErrorCode.UnspecifiedCurrency
  • Simplify constructor
    • remove type Blockchain
    • remove type API
    • Introduced single config type SourceConfig

1.20.0

  • Introduced Resolution#multiChainAddr(domain: string, ticker: string, chain: string) - More general method to fetch multi chain records.
  • Deprecated Resolution#usdt method in favor of multiChainAddr
  • Deprecated TickerVersion

1.19.0

  • Update @ensdomains/address-encoder dependency to remove security audit issues
  • Remove webpack dependency to remove security audit issues

1.18.0

  • Use Infura Ethereum Provider by default

1.17.0

  • Add support for TLOS

1.16.2

  • Add support of USDT for CLI tool. Try resolution --usdt-versions OMNI,ERC20 -d udtestdev-usdt.crypto command

1.16.1

  • Fixed Fetch error display when used in browser env

1.16.0

  • Fixed bug with infura.com -> infura.io

1.12.0

  • Introduced Resolution#usdt(domain: string, version: TickerVersion) which resolves in various USDT records from different chains
  • Introduced TickerVersion enum which holds all values for version parametr ar Resolution#usdt

1.10.4-1.11.1

  • updated resolution cli, config option is depricated
  • introduced --ethereum-url option to provide a non default blockchain provider

1.10.3

  • provide valid json to the CLI output

1.10.2

  • hotfix regarding incompatable types with Ethers InfuraProvider

1.10.1

  • Fixed bug regarding incompatable types with Ethers InfuraProvider
  • Remove ability to read from registry directly. ProxyReader address is now required. #105.

1.10.0

  • No changes

1.9.0

  • Add Resolution#records method to query multiple records #96
  • Add formatting options for Resolution#namehash and Resolution#childhash

    91

  • Add Resolution#dns method to query dns records from blockchain #99
  • Add DnsUtils as a helper class to convert from CryptoRecord type to DnsRecord and vice-versa #99
  • Plug-in network config from dot-crypto library #101
  • Removed elliptic from dependacy list. (when needed user should install it separately)

1.8.3

  • Enhanced Log searched. Now getting all records from the last resetRecords event if available

1.8.2

  • Update Twitter validation algorithm

1.8.0 - 1.8.1

  • Added Resolution#twitter method that returns back the verified twitter handle

1.7.0

  • Added Resolution#addr method that behaves consistently with other record getter methods.

1.6.2

  • Deprecated Resolution#address Resolution#addressOrThrow ResolutionErrorCode.UnspecifiedCurrency

1.8.2

  • Added ability to get verified twitter account connected to CNS domain via Resolution#twitter method.

1.6.1

  • Used ProxyReader(0x7ea9ee21077f84339eda9c80048ec6db678642b1) instead of Registry contract by default

1.6.0

  • Added support of web3.js and ethers.js providers
  • Throw ConfigurationError instead of basic Error when Resolution library is configured incorrectly so that it can be targeted within catch block.
  • Use @ethersproject/abi instead of custom abi encoder
  • Change default ethereum provider from infura to linkpool #75

1.5.1

  • fixing the version

1.4.1

  • Resolution#chatPk -> get a gundb public key from domain's record
  • Fix the bug with Resolution#chatId for ens domains

1.4.0

  • Resolve custom records
  • Resolution#chatId -> get a gundb chat id from domain's record
  • Add kovan address of crypto registry
  • Add support of more networks for ENS

1.3.6

  • Add -o, --owner flag to CLI. Flag resolves in owner address.

1.3.5

  • Fixed CLI config file persistent location issue
  • All domains are trimmed and lowercased before proceed with the direct lookup

1.3.4

  • Fixed wrong ResolutionErrorCode for unregistered .crypto domain in method cns#address

1.3.3

  • CLI -n, --namehash flag
  • CLI -m, --meta flag, shortcut for -siren flags
  • Updated README

1.3.2

  • domains like "hello..crypto", "hello..eth", "hello..zil" should throw ResolutionErrorCode.UnsupportedDomain

1.3.1

  • fixed command line interface configuration with url

1.3.0

  • Add support for .kred domains on ENS

1.2.0

  • Added a command line interface

1.1.0

  • Using flexible dependacies instead of locked versions
  • Moved sizecheck to a separate dev dependacy
  • Added web3Provider Support [#57]
  • Added factories Resolution.infura, Resolution.provider, Resolution.jsonRPCprovider

1.0.24

  • Bug fix, namehash the domain before asking for a resolver on cns.
  • Bug fix, ignore the resolutionErrorCode.RecordNotFound when looking up the crypto address.

1.0.23

1.0.22

  • Added size check for the package with limit 500.00 KB

1.0.20

  • Added Resolution#resolver(domain:string): Promise<string>
  • Removed ethers keccak256 lodash from package.json

1.0.19

  • Included the AbiEncoder from ethers-js
  • removed folowing packages
    • "eth-ens-namehash",

1.0.18

  • Removed unused ethers.js

1.0.17

  • Fixed a bug with cns throws RecordNotFound instead of ResolutionErrorCode.UnregisteredDomain in Cns#address
  • Added a way to connect Infura API secret key from .env files (should be INFURA=<SECRET KEY>)

1.0.16

  • Resolution#childhash(parent: NodeHash, label: string) -> method to return a childhash

1.0.15

  • Resolution#ipfsHash(domain:string): Promise<string> -> method to return an ipfsHash from the domain's records
  • Deprecate Resolution#ipfsRedirect
  • Resolution#httpUrl(domain:string): Promise<string> -> method to use instead of depricated Resolution#ipfsRedirect, returns an http url from the domain's records
  • Resolution#email(domain:string): Promise<string> -> method to return an email from the domain's records

1.0.14

  • Bugfix #namehash for ZNS

1.0.13

  • Domain that starts and ends with '-' are not valid anymore in ENS.
  • Bugfix Resolution#resolve on ENS domain when resolver has no address record
  • Resolution#isValidHash method - checks wheather a domain name matches the given hash from the blockchain

1.0.9-1.0.10

  • Revert back changes made for browser / node detection.

1.0.8

  • Support Resolution#namehash of .crypto root node

1.0.7

  • Fixed compatibility with some versions of hash.js library

1.0.5

  • Instead of NoRecordFound returning UnregisteredDomain error for .crypto in situations when there is no resolver

1.0.4

  • Raise ResolutionError with NamingServiceDown code on error on ethereum RPC response
  • BREAKING CHANGE: use capital letter for service name inside Resolution#resolve => {meta: {type}}
  • NamingService#serviceName(domain: string): string

1.0.3

  • Fixed bug with not having a ttl record on the blockchain. Now returns 0 instead of throwing an error
  • Changed main registry address for CNS to 0xD1E5b0FF1287aA9f9A268759062E4Ab08b9Dacbe

1.0.2

  • Fixed bug with not finding cointypes when currency ticker is given as smallcase

1.0.1

  • .crypto support with Resolution.cns

0.3.6

  • Fix root tld support for ZNS

0.3.4

  • Deprecated UNCLAIMED_DOMAIN_RESPONSE (use UnclaimedDomainResponse instead)
  • Excluded private, internal (public) and not exported symbols from the documentation
  • Excluded internal (public) symbols from the declaration files
  • Added ResolutionErrorCode enum for more convenient error handling

0.3.3

  • NamingService#record -> gets an arbitrary record from the corresponding naming service
  • Resolution#ipfsHash -> gets IPFS hash for a specific supported domain
  • Resolution#email -> gets ipfs email field of whois object for a specific supported domain
  • Resolution#ipfsRedirect -> gets ipfs redirect url record for a specific supported domain

0.3.1 - 0.3.2

  • Resolution#owner method - returns an owner address of the domain
  • Fixed issue with user agent on browsers instances for Resolution
  • Added docs generation scripts
  • Unstoppable API is not initilized when blockchain param is true inside the Resolution configuration

0.3.0

  • Resolution#addressOrThrow - new method that throws ResolutionError if currency address is not found
  • Resolution#namehash - new method for namehashing the domain name. Name hash of a domain is an ID that is used to store the information about the domain on the blockchain. If you would browse the blockchain, you would never see domain names, just name hashes.
  • Now throwing ResolutionError when ENS or ZNS naming service is down
  • ENS multicoin support

0.2.43

  • Resolution#addressOrThrow - new method that throws ResolutionError if currency address is not found
  • Resolution#namehash - new method for namehashing the domain name. Name hash of a domain is an ID that is used to store the information about the domain on the blockchain. If you would browse the blockchain, you would never see domain names, just name hashes.
  • Now throwing ResolutionError when ENS or ZNS naming service is down
  • ENS multicoin support

0.2.42

  • Added documentation to Resolution, ENS and ZNS files
  • Connected typedoc to the project
  • Added user-agent to fetch calls for https://unstoppabledomains.com/
  • Specified scripts for automating generation of docs

0.2.41

  • Make Zns#getContractField #getContractMapValue and

    getResolverRecordsStructure pseudo-private methods by adding _ in front of

    the names
  • Added Zns#Resolution method which returns everything what is stored on zilliqa for specific domain

0.2.39 - 0.2.40

  • Zns network and url options support
  • Ens and Zns support custom contracts registryAddress
  • Adjust for breaking change at GetSmartContractSubState Zilliqa RPC call

0.2.38

  • Updated zilliqa library to 0.8.1

0.2.37

  • Support node 12
  • Transform owner old zil address format to a new zil format

0.2.36

  • Add return type for Ens#resolve
  • Add isSupportedDomainInNetwork in Resolution
  • Add isSupportedNetwork for ZNS

0.2.35

  • Make Ens#network and Ens#url public properties
  • Change default ENS source protocol from wss (websocket) to https
  • Make Ens web3, ensContract and registrarContract private properties
  • Ability to provide ENS network configuration as string like mainnet, testnet etc.
  • Make properties of Resolution class readonly

0.2.34 - 0.2.31

  • Added isSupportedNetwork method for ens
  • Make isSupportedNetwork configurable from outside by passing network agrument
  • isSupportedDomain is no longer checks for supported network inside the ens

0.2.30 and earlier

  • Changelog is not tracked