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

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.

ReadBatchablestable
Since v1.0.0View source

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

OptionTypeDefaultDescription
name (required)stringENS name. Normalized automatically.
delegate (required)stringAccount that may be a delegate.
ownerstringthe owner the resolver authorizes againstOwner who granted the delegation.

Also takes the read options.

Returns

Resolves to boolean. Whether delegate may edit the name's records.

Errors

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

See How errors work.

Examples

Checking a delegate
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" })
false

See also

Was this page helpful?