Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ export const integrateSidebarTopic = {
label: "Core Concepts",
link: "/docs/integrate/omnigraph/concepts",
},
{
label: "ENS Resolution",
link: "/docs/integrate/omnigraph/ens-resolution",
},
{
label: "Protocol Acceleration",
link: "/docs/integrate/omnigraph/protocol-acceleration",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ const { description } = getOmnigraphExampleById(id);
const data = resolveOmnigraphStaticExample(id);
---

{!hideDescription && <p>{description}</p>}
{
!hideDescription && (
<div class="sl-markdown-content">
<p set:html={description} />

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to render segments of Example's description

Comment thread
sevenzing marked this conversation as resolved.
Comment thread
vercel[bot] marked this conversation as resolved.
</div>
Comment thread
sevenzing marked this conversation as resolved.
)
}

<StaticExampleCard uid={data.uid}>
<div
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: ENS Resolution
description: Forward, reverse, and identity resolution in the Omnigraph — interpreted profiles, raw protocol records, and address-to-identity lookup in a single GraphQL query.
---

import { LinkCard } from "@astrojs/starlight/components";
import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";

Most apps need ENS resolution in three modes:

- **Forward** — given a name (`vitalik.eth`), resolve records like avatar, bio, links, and multichain addresses.
- **Reverse** — given an address, find its **primary name** on a chain.
- **Identity** — given an address, resolve the primary name and its records in one query.

Behind every mode sits the same protocol complexity: resolver contracts, coin-type encoding, inconsistent text-record keys, and avatar formats that may be URLs, IPFS paths, or NFT references. The Omnigraph handles that complexity for you and returns clean, structured results in one request.

## 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`

**Reverse resolution** answers a simple question: _what name does this address want to be known by?_ On a given chain, that is its **primary name** ([ENSIP-19](https://docs.ens.domains/ensip/19)). If the address has not set one, the result is `null` — safe to render like any other missing field.

Primary names are per-chain. Use friendly chain names like `ETHEREUM` or `BASE` rather than raw coin types. `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 />

If you need the display data that goes with that name — not just the name itself — see **Identity resolution** below.

## Identity resolution — full address resolve

**Identity resolution** is the pattern most wallets and explorers actually use: start from an address, get the primary name, and load its full display data — all in one request. It is reverse resolution followed immediately by forward resolution, with no extra round trip.

<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 ENS identity.
- **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 display data 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 covered in the forward resolution section above.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Account Events
description: Indexed events involving an address across ENS contracts.
sidebar:
order: 11

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it's redundant since we define order in sidebar config already

---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Account Migration Counts
description: Count an account's ENSv1 vs ENSv2 domains to gauge migration progress.
sidebar:
order: 18
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
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" />
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Account Resolver Permissions
description: Resolver contracts where an account holds resolver-scoped permissions.
sidebar:
order: 15
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Domain By Name
description: Omnigraph query for a single domain with v1/v2 fields.
sidebar:
order: 2
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Domain Events
description: Contract events linked to a domain’s on-chain records.
sidebar:
order: 8
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
title: Domain Profile
sidebar:
order: 3
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
title: Domain Raw Records
sidebar:
order: 4
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Domain Resolver
description: Assigned resolver, records, permissions, and resolver events for a name.
sidebar:
order: 16
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
title: Recently Registered Subdomains
sidebar:
order: 7
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Domain Subdomains
description: Paginate child names under a parent domain.
sidebar:
order: 6
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Account Domains
description: Omnigraph query listing domains for an address.
sidebar:
order: 9
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: ETH TLD By Version
description: Load the .eth TLD across ENSv1 and ENSv2, discriminated by __typename.
sidebar:
order: 19
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Find Domains
description: List domains by name filter with ordering and registration fields.
sidebar:
order: 5
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: ENS Omnigraph Example Queries
description: Ready-to-run Omnigraph examples with `GraphQL`, `enssdk`, and `enskit` snippets, plus links to ENSAdmin and `curl` samples.
sidebar:
order: 1
---

import { LinkCard, CardGrid } from "@astrojs/starlight/components";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Namegraph
description: Explore the root tree with nested subdomain connections.
sidebar:
order: 17
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Permissions By Contract
description: Role assignments on resources for a registrar or registry contract.
sidebar:
order: 13
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Permissions By User
description: Resources and roles granted to an address in the permissions graph.
sidebar:
order: 14
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
---
title: Registry Domains
description: Domains registered under a v2 ETH registry contract.
sidebar:
order: 12
---

import OmnigraphStaticExampleSet from "@components/organisms/OmnigraphStaticExampleSet.astro";
Expand Down
Loading
Loading