ENS support is available in many popular languages. If you know of a library that is not listed here, please send us a PR.
- ethereum-ens, maintained by the ENS developers
- ethjs-ens
- ethers.js
- web3.js
If you are already using web3.js, and do not require functionality such as creating subdomains, transferring ownership, or updating resolvers, use web3.js's ENS support.
If you are already using ethjs, and only need to do forward and reverse resolution of ENS names, use ethjs's ENS support.
If you are already using ethers.js, and only need to do forward and reverse resolution of ENNS names, use ethers.js's ENS support.
Otherwise, use ethereum-ens.
All the ENS smart contracts are Truffle projects and published as npm modules (eg: ENS registry). If you want to access to functions none of the above libraries support you can install the smart contracts via npm.
- Resolver =
Resolver.sol
contains all function names including the deprecated functions (eg:content
) - Permanent Registrar
- Registry and old Registrar
The bytecode and abi are precompiled and can be imported from the modules.
import { abi , bytecode } from '@ensdomains/ens/build/contracts/ENS.json'
- web3.py - also see web3.py ENS docs
Once you've chosen a library, read Working with ENS to learn how to use your chosen ENS library in your application.