approval.getDelegate
Checks whether a delegate may edit a name's records on its public resolver (isApprovedFor). Options, result, errors and examples for approval.getDelegate.
Checks whether a delegate may edit a name's records on its public resolver
(isApprovedFor).
When to use
Use to see who besides the owner can edit a profile on a PublicResolver.
Details
- The owner defaults to the one the resolver authorizes against: the ENS registry owner (or NameWrapper owner) for ENSv1 resolvers, the ENSv2 owner for PublicResolverV2.
- PermissionedResolvers have roles instead of delegates and answer
false.
Signature
function getDelegate(
client: Like,
options: getDelegate.Options,
): Promise<getDelegate.ReturnType>Call it as ens.approval.getDelegate(options) on a client, or Actions.approval.getDelegate(client, options).
approval.getDelegate.request(options) builds a deferred read for Actions.batch. See Look up many at once.
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
name (required) | string | ENS name. Normalized automatically. | |
delegate (required) | string | Account that may be a delegate. | |
owner | string | the owner the resolver authorizes against | Owner who granted the delegation. |
Also takes the read options.
Returns
Resolves to boolean. Whether delegate may edit the name's records.
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME, INVALID_ADDRESS | invalid input. |
NotFoundError | RESOLVER_NOT_FOUND | the name has no resolver. |
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 approved = await ens.approval.getDelegate({ name: "alice.eth", delegate })Example response
Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.
await ens.approval.getDelegate({ name: "nick.eth", delegate: "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" })falseSee also
approval.setDelegateto change it
Was this page helpful?