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.getPermissions

Lists who can do what over a name, a registration, an account or an ENSv2 registry. Options, result, errors and examples for indexer.getPermissions.

ReadBatchablestable
Since v1.0.0View source

Lists who can do what over a name, a registration, an account or an ENSv2 registry.

When to use

Use to show a name's permission table, or every grant an account holds.

Details

  • Pass exactly one of name, registrationId, address or registry.
  • Powers use the indexer's vocabulary (set_resolver, admin_renew, …); includeLineage explains how each was obtained.
  • Surfaces the indexer cannot list (e.g. operator approvals) are reported through completeness and unsupportedReason.

Signature

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

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

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

Parameters

OptionTypeDefaultDescription
limitnumberRows per page, 1–200. @default 50
cursorstringThe previous page's cursor.
includeTotalbooleanCount every row (totalCount); slower.
namespaceNamespaceOnly grants in this namespace.
includeLineagebooleanInclude how each grant was obtained.
namestringPermissions over this name.
registrationIdstringPermissions over this registration (an indexer handle).
addressstringGrants this account holds.
registry{ readonly address: string; readonly chainId?: number | undefined }Root grants of this ENSv2 registry (on the client's chain unless chainId is set).

Also takes the read options.

Returns

Resolves to Page<PermissionRow>. One page of grants.

Errors

ErrorCodesWhen
InvalidInputErrorINVALID_NAME, INVALID_ADDRESS, INVALID_RECORD_VALUEinvalid input.
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

Listing a name's permissions
const page = await ens.indexer.getPermissions({ name: "nick.eth" })

Example response

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

await ens.indexer.getPermissions({ name: "ens.eth", limit: 3 })
{
  "asOf": {
    "chainId": 1,
    "blockNumber": "26443964n",
    "blockHash": "0xe75c58ea2f28bd7c6cc53c28a5ab4fc02023f3563661f0a7236a36b779e3ac86",
    "timestamp": "1795029143n"
  },
  "snapshots": {
    "1": {
      "chainId": 1,
      "blockNumber": "26443964n",
      "blockHash": "0xe75c58ea2f28bd7c6cc53c28a5ab4fc02023f3563661f0a7236a36b779e3ac86",
      "timestamp": "1795029143n"
    }
  },
  "asOfToken": null,
  "completeness": "partial",
  "unsupportedReason": "permissions_partially_listed",
  "unsupportedFields": [],
  "origin": null,
  "indexer": "bigname",
  "items": [
    {
      "address": "0x2d2e339c93dA91682Db720ee73e3c8F854f5F246",
      "name": "ens.eth",
      "registrationId": "4f225413-df3a-50b3-832a-1b91e29b6a9c",
      "powers": [
        "resolver_control"
      ],
      "scope": "resolver",
      "relation": null,
      "wrapperState": null,
      "lineage": null
    },
    {
      "address": "0x2d2e339c93dA91682Db720ee73e3c8F854f5F246",
      "name": "ens.eth",
      "registrationId": "4f225413-df3a-50b3-832a-1b91e29b6a9c",
      "powers": [
        "registration_control"
      ],
      "scope": "registration",
      "relation": null,
      "wrapperState": null,
      "lineage": null
    }
  ],
  "cursor": null,
  "hasMore": false,
  "totalCount": null
}

See also

Was this page helpful?