domain_resolve is a Python library and REST API that resolves human-readable Web3 domain names into blockchain addresses across multiple domain name systems:
.ethdomains via ENS.bnb,.arb,.sol,.lens, and 20+ others via SPACE ID- All other custom domains via 3DNS
The system can be used as a Python SDK, a Flask-powered HTTP service, or embedded in applications to resolve wallet addresses from domain names.
- Multi-system resolution: ENS, SPACE ID, 3DNS
- REST API with GET/POST endpoints
- Python client to interact with resolution service
- Domain normalization and zero-address checks
pip install -e .Make sure you also have a .env file:
Resolution is attempted in this order:
.eth→ via ENS- Known SPACE ID TLDs (e.g.
.bnb,.arb,.sol) → via SpaceID API - Fallback to → 3DNS resolver
from domain_resolve import DomainResolveClient
domains = ["example.eth", "allen.bnb", "custom.3dns"]
client = DomainResolveClient()
for domain in domains:
if client.does_resolve(domain):
print(client.resolve_domain(domain))
print(client.get_resolved_data(domain))Start the Flask server:
python app.py{
"domain": "allen.bnb"
}Response:
{
"code": 0,
"data": {
"name": "allen.bnb",
"address": "0x...",
"chainID": 56,
"errMsg": ""
}
}GET /api/resolve/example.eth| Domain | Chain ID |
|---|---|
.bnb |
56 |
.arb |
42161 |
.sol |
900 |
.manta |
169 |
.mode |
34443 |
.zfk |
42766 |
.ll |
1890 |
.zeta |
7000 |
.merlin |
4200 |
.gno |
100 |
.taiko |
167000 |
.alien |
10241024 |
.mint |
185 |
.ail |
2649 |
.mph |
2818 |
.duck |
5545 |
.g |
1625 |
.ip |
1514 |
.inj |
901 |
.sei |
902 |
.lens |
903 |
.crypto |
904 |
domain_resolve/
├── utils.py # normalization helpers
├── services/
│ ├── ens.py # resolves ENS domains
│ └── three_dns.py # resolves 3DNS domains
├── __init__.py # exposes `get_resolved_address`
app.py # Flask server exposing resolve API
DOMAIN_RESOLVE_URL=
THREEDNS_TOKEN_ADDRESS=- spaceid_py for SpaceID API wrapper
- web3.py for ENS resolution
- 3DNS team for custom domain resolution backend