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.
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,addressorregistry. - Powers use the indexer's vocabulary (
set_resolver,admin_renew, …);includeLineageexplains how each was obtained. - Surfaces the indexer cannot list (e.g. operator approvals) are reported through
completenessandunsupportedReason.
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
| Option | Type | Default | Description |
|---|---|---|---|
limit | number | Rows per page, 1–200. @default 50 | |
cursor | string | The previous page's cursor. | |
includeTotal | boolean | Count every row (totalCount); slower. | |
namespace | Namespace | Only grants in this namespace. | |
includeLineage | boolean | Include how each grant was obtained. | |
name | string | Permissions over this name. | |
registrationId | string | Permissions over this registration (an indexer handle). | |
address | string | Grants 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
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME, INVALID_ADDRESS, INVALID_RECORD_VALUE | invalid input. |
ConfigError | INDEXER_NOT_CONFIGURED | the client has no indexer. |
IndexerError | INDEXER_UNSUPPORTED | the indexer does not serve the query or its namespace. |
IndexerError | INDEXER_UNAVAILABLE, INDEXER_RATE_LIMITED, INDEXER_BEHIND, INDEXER_REQUEST_REJECTED, INDEXER_RESPONSE_INVALID | the 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
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
permission.getfor the on-chain check
Was this page helpful?