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

No way to determine primary ENS name #38

Open
o-az opened this issue Jan 14, 2022 · 6 comments
Open

No way to determine primary ENS name #38

o-az opened this issue Jan 14, 2022 · 6 comments

Comments

@o-az
Copy link

o-az commented Jan 14, 2022

The following query returns a list of domains under an address but there's no way to tell which one is the primary ENS name:

domains(
  where: {
      resolvedAddress: "0x983110309620d911731ac0932219af06091b6744"
  }
)  {
  name
}

On app.ens.domains it shows the address has a primary ENS name:
Primary ENS Name (reverse record): brantly.eth

@brossetti1
Copy link

might be relavent #26

@Dizotoff
Copy link

Dizotoff commented Dec 5, 2022

Have you solved it somehow @o-az ?

@Deep1144
Copy link

Deep1144 commented Mar 4, 2023

Has any one found any solution?

@o-az
Copy link
Author

o-az commented May 18, 2023

#I'm releasing an npm package and an API endpoint soon specifically for retrieving primary ENS name/domain

@karstenba
Copy link

Here's what seems like a good solution, in case anyone is still looking.

@o-az
Copy link
Author

o-az commented May 18, 2023

Here's what seems like a good solution, in case anyone is still looking.

That's what I'm doing.
If I have a name I call subgraph to get address and records
If I have address, I call the ReverseRecords smart contract directly, pass address to getNames and get primary ENS name back.

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

5 participants