Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: resolve name from address #5

Open
elisealix22 opened this issue Jan 15, 2023 · 3 comments
Open

Feature Request: resolve name from address #5

elisealix22 opened this issue Jan 15, 2023 · 3 comments

Comments

@elisealix22
Copy link

Is it possible to resolve an ENS name from an ETH address? If not, that would be an amazing feature so I could use ENSKit to fetch both an ENS name and avatar from an address (happy to fetch serially).

@stdc105 let me know if I missed something!

@livid
Copy link
Member

livid commented Jan 15, 2023

Hi Elise,

Currently, ENSKit can turn ENS names into addresses. To make it possible to do the reverse, from addresses to ENS names, we're working on adding that feature. We'll let you know as soon as it's ready.

In the meantime, you can check out this API, it can handle both types of queries:

https://api.ensideas.com/ens/resolve/vitalik.eth
https://api.ensideas.com/ens/resolve/0xd8da6bf26964af9d7eed9e03e53415d37aa96045

When we first started ENSKit, our main focus was on the content hash field for dWebsites, as there wasn't a public API for that yet.

Thanks!

@elisealix22
Copy link
Author

Thank you so much for the explanation @livid ! I'll take a look at the API 👀

@livid
Copy link
Member

livid commented Feb 5, 2023

Hi @elisealix22

We have added support for reverse resolver. You can use it like this:

let enskit = ENSKit()
if let name = try await enskit.name(addr: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045") {
    // 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 would resolve to vitalik.eth
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants