Reverse Resolve ENS Domain
Reverse resolving an ENS name involves retrieving the address associated with a given ENS name. This can be useful in cases where you need to verify the ownership of an ENS name or interact with a smart contract associated with the name. By using Chainbase API Reverse resolve ENS domain, you can easily reverse resolve an ENS name and retrieve the associated address on Ethereum or other chains.
It’s important to note that reverse resolving an ENS name only works for names that have been registered on the blockchain. If a name has not been registered, it will not have an associated address and therefore cannot be reverse resolved.
Overview - Tools you need to work with Chainbase
- A free account at Chainbase with an API key.
- An IDE. Our examples are shown in JavaScript, you can use VS Code as your IDE for example.
- A wallet address as your input.
Step 1: Set up a free account at Chainbase
To better leverage the ability that Chainbase provides, you can register here for a free account and access to different APIs and data cloud.
After logging into Chainbase, visit the dashboard to get an overview. Create a new project in the console and get an API key.
Step 2: Write script using Chainbase API
- Using
fetch
in JavaScript.
- Using
axios
in JavaScript. You need to installaxios
usingnpm install axios --save
in the terminal first.
Step 3: Print the reversed resolved ENS domain
Chainbase API Reverse resolve ENS domain takes the chain id and wallet address as parameters, and returns the reversed resolved ENS domain name.
To get data printed, run command node <filename>.js
in the terminal. In this case, the corresponding domain name of Xiaocong’s wallet on Ethereum is lxcong
, which means you can get the wallet address using lxcong.eth
.
API Reference
If you want to know more details on the endpoint and optional parameters, check out:
Support
If you meet any trouble following the tutorial, feel free to reach out to us in our Discord to get 24/7 community support.