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

permission.get

Reads what an account may do with an ENS name: transfer it, change its resolver, edit records, create subnames and more, across ENSv1 ownership and ENSv2 roles.

ReadBatchablestable
Since v1.0.0View source

Reads what an account may do with an ENS name: transfer it, change its resolver, edit records, create subnames and more, across ENSv1 ownership and ENSv2 roles.

When to use

Use to enable or hide actions in a UI before the user tries them.

Details

  • ENSv1: the owner, operators and approved addresses, limited by NameWrapper fuses.
  • ENSv2: the account's roles on the name and at the root of its registry. The deployment's current UserRegistry checks renew at its root only (contracts-v2 #505).
  • Records: PermissionedResolver roles, or owner, operator and delegates on public resolvers. Pass records for per-record answers, e.g. which text keys the account may write.
  • null means the permission model is unknown (a custom resolver).
  • Costs three batched calls.

Signature

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

Call it as ens.permission.get(options) on a client, or Actions.permission.get(client, options).

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

In React, use usePermissions.

Parameters

OptionTypeDefaultDescription
name (required)stringENS name. Normalized automatically.
accountstringthe client's accountAccount to check.
recordsSelectionRecords to answer for one by one, in the record.get selection shape.

Also takes the read options.

Returns

Resolves to get.ReturnType. What the account may do; null when unknown.

FieldTypeDescription
accountAddress
statusNameStatus
can{ readonly [operation in NameOperation | "setRecords"]: boolean | null }
records (optional)Readonly<Record<string, unknown>>Per-record answers, shaped like the records selection.
fusesreadonly Fuse.Name[]Burned NameWrapper fuses (wrapped ENSv1 names).

Errors

ErrorCodesWhen
InvalidInputErrorINVALID_NAME, INVALID_ADDRESSinvalid input.
ConfigErrorWALLET_NOT_CONFIGUREDwithout account or a client account.
NetworkErrorRPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITEDthe RPC request fails.

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

See How errors work.

Examples

Gating a UI
const { can } = await ens.permission.get({ name: "alice.eth", account })
if (can.setRecords) showEditButton()

Example response

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

await ens.permission.get({ name: "nick.eth", account: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" })
{
  "account": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "status": "registered",
  "can": {
    "transfer": false,
    "setResolver": false,
    "setSubregistry": false,
    "createSubname": false,
    "removeSubname": false,
    "renew": true,
    "setTtl": false,
    "setManager": false,
    "reclaim": false,
    "setRecords": false
  },
  "fuses": []
}

See also

Was this page helpful?