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.
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
renewat its root only (contracts-v2 #505). - Records: PermissionedResolver roles, or owner, operator and delegates on public resolvers.
Pass
recordsfor per-record answers, e.g. which text keys the account may write. nullmeans 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
| Option | Type | Default | Description |
|---|---|---|---|
name (required) | string | ENS name. Normalized automatically. | |
account | string | the client's account | Account to check. |
records | Selection | Records 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.
| Field | Type | Description |
|---|---|---|
account | Address | |
status | NameStatus | |
can | { readonly [operation in NameOperation | "setRecords"]: boolean | null } | |
records (optional) | Readonly<Record<string, unknown>> | Per-record answers, shaped like the records selection. |
fuses | readonly Fuse.Name[] | Burned NameWrapper fuses (wrapped ENSv1 names). |
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME, INVALID_ADDRESS | invalid input. |
ConfigError | WALLET_NOT_CONFIGURED | without account or a client account. |
NetworkError | RPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITED | the RPC request fails. |
It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).
See How errors work.
Examples
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
permission.checkfor one operation and what is missing
Was this page helpful?