Documentation for agents: an index at /llms.txt, every docs page in one file at /llms-full.txt, and Markdown for any docs page by adding .md to its URL.

Skip to Content
ensforgeSDK

indexer.getNamespace

Reads what the indexer serves for a namespace: its networks and which features are complete. Options, result, errors and examples for indexer.getNamespace.

ReadBatchablestable
Since v1.0.0View source

Reads what the indexer serves for a namespace: its networks and which features are complete.

When to use

Use to decide which features to show, e.g. hide verified records where they are unsupported.

Signature

function getNamespace(
  client: Like,
  options?: getNamespace.Options,
): Promise<getNamespace.ReturnType>

Call it as ens.indexer.getNamespace(options) on a client, or Actions.indexer.getNamespace(client, options).

indexer.getNamespace.request(options) builds a deferred read for Actions.batch. See Look up many at once.

Parameters

OptionTypeDefaultDescription
namespaceNamespace"ens"

Also takes the read options.

Returns

Resolves to Result<NamespaceInfo> | null. The namespace's coverage, or null when the indexer does not know it.

Errors

ErrorCodesWhen
NotFoundErrorINDEXER_NOT_FOUNDwith strict: true when the indexer does not know the namespace.
ConfigErrorINDEXER_NOT_CONFIGUREDthe client has no indexer.
IndexerErrorINDEXER_UNSUPPORTEDthe indexer does not serve the query or its namespace.
IndexerErrorINDEXER_UNAVAILABLE, INDEXER_RATE_LIMITED, INDEXER_BEHIND, INDEXER_REQUEST_REJECTED, INDEXER_RESPONSE_INVALIDthe indexer is unavailable, rate limiting, behind, rejects the request or answers unexpectedly.

It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).

See How errors work.

Examples

Reading ENS coverage
const ens_ = await ens.indexer.getNamespace()

Example response

Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.

await ens.indexer.getNamespace({ namespace: "ens" })
{
  "namespace": "ens",
  "capabilities": {
    "name_history": "full",
    "name_profile": "full",
    "subnames": "full",
    "verified_primary_name": "full",
    "verified_records": "full"
  },
  "networks": [
    {
      "network": "ethereum",
      "chainId": 1,
      "protocol": "ensV2",
      "sinceBlock": "26183742n"
    }
  ],
  "asOf": null,
  "snapshots": {},
  "asOfToken": null,
  "completeness": "full",
  "unsupportedReason": null,
  "unsupportedFields": [],
  "origin": null,
  "indexer": "bigname"
}

Was this page helpful?