-
Notifications
You must be signed in to change notification settings - Fork 17
docs: ENS Resolutions page #2273
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
Open
sevenzing
wants to merge
11
commits into
main
Choose a base branch
from
ll/docs-ens-resolutions
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6604d08
remove sidebar order
sevenzing 1aa7883
add ens-resolution page to /docs
sevenzing 1e24a14
make AI section to be integrated into profile section
sevenzing 3164af3
Introduce identity resolution
sevenzing c554d83
rename
sevenzing 0e844fb
update ens resolution page
sevenzing e8f6f0b
update example and nit fixes
sevenzing a562608
fix tests
sevenzing 4107003
Merge branch 'main' into ll/docs-ens-resolutions
shrugs b15e6d6
Merge remote-tracking branch 'origin/main' into ll/docs-ens-resolutions
shrugs baedc54
docs: drop "below" from omnigraph example descriptions
shrugs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
docs/ensnode.io/src/content/docs/docs/integrate/omnigraph/ens-resolution.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| --- | ||
| title: ENS Resolution | ||
| description: Forward, reverse, and complete resolution in the Omnigraph — interpreted profiles, raw protocol records, and address-to-profile lookup in a single GraphQL query. | ||
| --- | ||
|
|
||
| import { LinkCard } from "@astrojs/starlight/components"; | ||
| import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro"; | ||
|
|
||
| The ENS protocol defines two forms of resolution: | ||
|
|
||
| - **Forward resolution** — given a name (`vitalik.eth`), resolve its records: avatar, bio, links, multichain addresses, and more. | ||
| - **Reverse resolution** — given an address, resolve its **primary name** on a chain ([ENSIP-19](https://docs.ens.domains/ensip/19)). | ||
|
|
||
| One of the most common patterns when building on ENS is to combine both: given an address, first perform **reverse resolution** to get the primary name, then perform **forward resolution** on that name to fetch its avatar, social handles, and other display details. Because this pattern is so common, the Omnigraph provides support for it as **complete resolution** — reverse and forward in a single query with no extra round trip. | ||
|
shrugs marked this conversation as resolved.
|
||
|
|
||
| Moreover, the Omnigraph handles the underlying protocol complexity for you — resolver contracts, coin-type encoding, inconsistent text-record keys, and avatar formats that may be URLs, IPFS paths, or NFT references — and **returns clean, structured results** for all three patterns. | ||
|
|
||
| ## Forward resolution — interpreted `profile` | ||
|
|
||
| When you have a name and need display-ready data, query `domain.resolve.profile`. This is where the Omnigraph does the heavy lifting: instead of decoding coin types, normalizing text-record keys, and chasing avatar formats yourself, you get a consumer-shaped view of the most common display fields — ready to drop into a UI or hand straight to an AI agent. | ||
|
|
||
| <OmnigraphStaticExampleSet id="domain-profile" hideBackToExamples /> | ||
|
|
||
| What you get in `resolve.profile`: | ||
|
|
||
| - **Addresses** — keyed by chain (`ethereum`, `solana`, `base`, …) in chain-native encodings. | ||
| - **Social accounts** — `{ handle, httpUrl }` pairs, ready to link. | ||
| - **Avatar and header images** — `httpUrl` values you can use directly in `<img src="…" />`, including derivation from NFT references per [ENSIP-12](https://docs.ens.domains/ensip/12). | ||
| - **Missing or invalid records** — `null`, so you can render without extra guards. | ||
|
|
||
| The same predictable shape works well for AI agents — structured fields and `null` for anything missing or invalid, without decoding resolver data in the prompt. | ||
|
|
||
| <LinkCard | ||
| title="AI/LLM Tooling 🤖" | ||
| href="/docs/integrate/ai-llm" | ||
| /> | ||
|
|
||
| ## Forward resolution — raw `records` | ||
|
|
||
| `resolve.records` returns protocol-accurate resolver data: numeric coin types, arbitrary text keys, and unparsed bytes. This is the shape you would work with if you decoded resolver storage yourself — or if you need records that `profile` does not model. | ||
|
|
||
| <OmnigraphStaticExampleSet id="domain-records" hideBackToExamples /> | ||
|
|
||
| ## Reverse resolution — `primaryName` | ||
|
|
||
| Given an address, reverse resolution answers: _what name does this address want to be known by?_ If the address has not set a primary name, the result is `null` — safe to render like any other missing field. | ||
|
|
||
| Primary names are stored linked to coin-types, but Omnigraph allows using friendly chain names like `ETHEREUM` or `BASE`. `beautified` is ready for UI rendering; `interpreted` is the stable form for lookups and links. See [Beautified Name](/docs/reference/terminology#beautified-name). | ||
|
|
||
| <OmnigraphStaticExampleSet id="account-primary-names" hideBackToExamples /> | ||
|
|
||
| ## Complete resolution | ||
|
|
||
| Complete resolution is the pattern most wallets and explorers actually implement: given an address, resolve its primary name and then immediately forward-resolve the records on that name. | ||
|
|
||
| <OmnigraphStaticExampleSet id="account-primary-name-records" hideBackToExamples /> | ||
|
|
||
| Breaking down the example above: | ||
|
|
||
| - **Start from an address** — pass any wallet address; the query looks up that account's primary name. | ||
| - **Pick a chain** — primary names are per-chain (e.g. Ethereum mainnet). Use friendly chain names like `ETHEREUM` or `BASE` instead of raw coin types. | ||
| - **Display the name** — `beautified` is ready for UI rendering; `interpreted` is the stable form for lookups and links. | ||
| - **Load the records in the same request** — avatar, bio, and social links are forward-resolved from the primary name. The response shape is the same `resolve.profile` structure from the forward resolution section above. | ||
2 changes: 0 additions & 2 deletions
2
...nsnode.io/src/content/docs/docs/integrate/omnigraph/examples/account-events.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...o/src/content/docs/docs/integrate/omnigraph/examples/account-migrated-names.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
...nigraph/examples/account-primary-name.mdx → ...examples/account-primary-name-records.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,7 @@ | ||
| --- | ||
| title: Account Primary Name | ||
| sidebar: | ||
| order: 10 | ||
| --- | ||
|
|
||
| import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro"; | ||
|
|
||
| <OmnigraphStaticExampleSet id="account-primary-name" /> | ||
| <OmnigraphStaticExampleSet id="account-primary-name-records" /> |
2 changes: 0 additions & 2 deletions
2
...content/docs/docs/integrate/omnigraph/examples/account-resolver-permissions.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...nsnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-by-name.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-events.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...nsnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-profile.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...nsnode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-records.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...snode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-resolver.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...ocs/docs/integrate/omnigraph/examples/domain-subdomains-recently-registered.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...ode.io/src/content/docs/docs/integrate/omnigraph/examples/domain-subdomains.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...de.io/src/content/docs/docs/integrate/omnigraph/examples/domains-by-address.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...nsnode.io/src/content/docs/docs/integrate/omnigraph/examples/eth-by-version.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
.../ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/find-domains.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
docs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/index.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
docs/ensnode.io/src/content/docs/docs/integrate/omnigraph/examples/namegraph.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
.../src/content/docs/docs/integrate/omnigraph/examples/permissions-by-contract.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...e.io/src/content/docs/docs/integrate/omnigraph/examples/permissions-by-user.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
...node.io/src/content/docs/docs/integrate/omnigraph/examples/registry-domains.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.