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

SDK

Browse every action of @ensforge/sdk by domain, with the client, batching, utilities and indexers it exports, each with its signature and examples.

90 actions · 16 domains
Since v1.0.0View source

Every action of @ensforge/sdk, by domain. Each page lists its signature, options, result, errors and examples.

approval

ActionDescription
getDelegate (batchable)Checks whether a delegate may edit a name's records on its public resolver (isApprovedFor).
getOperator (batchable)Checks whether an operator may manage everything an owner holds on an ENS contract (isApprovedForAll).
getToken (batchable)Reads the address approved to transfer one ENSv1 name token (getApproved).
setDelegateApproves or revokes a delegate who may edit a name's records on its public resolver.
setOperatorApproves or revokes an operator for everything the signer holds on an ENS contract (setApprovalForAll).
setTokenApproves one address to transfer one ENSv1 name token, or clears the approval.

dns

ActionDescription
claimImports a DNS name into ENS with a DNSSEC proof of its _ens TXT record.
getOffchainResolver (batchable)Reads the gasless DNS resolver a DNS name sets in an ENS1 TXT record.
getProof (batchable)Fetches the DNSSEC proof of a DNS name's _ens TXT record.
getRecords (batchable)Reads DNS records and the zonehash a name stores on its resolver.
getStatus (batchable)Reads whether a DNS name is imported into ENS, and what it needs to be.
setRecordsSets DNS records or the zonehash of a name on its public resolver.

event

ActionDescription
decode (batchable)Normalizes the ENS events in logs or transaction receipts.
get (batchable)Reads the ENS events of one name over a block range, across ENSv1 and ENSv2.
watchWatches one name's ENS events as new blocks arrive.

indexer

ActionDescription
getEvents (batchable)Searches indexed ENS events by name, address, resolver, contract or block range.
getHistory (batchable)Reads the full history of a name, or of every name an address is related to.
getName (batchable)Reads one name from the indexer: owner, manager, expiry, resolver, records and protocol.
getNamesByExpiry (batchable)Lists names by when they expire or leave their grace period.
getNamesForAddress (batchable)Lists the names an address owns, manages, holds roles on, resolves to, or used to own.
getNamespace (batchable)Reads what the indexer serves for a namespace: its networks and which features are complete.
getPermissions (batchable)Lists who can do what over a name, a registration, an account or an ENSv2 registry.
getPrimaryName (batchable)Reads an address's primary name from the indexer, verified on-chain when the indexer can.
getRecords (batchable)Reads a name's records and its record inventory from the indexer.
getRegistry (batchable)Reads an ENSv2 registry: the name it serves, its parent registry, when it was created and its counts.
getRegistryLabels (batchable)Lists the labels of an ENSv2 registry, optionally only those an address holds or does not hold.
getResolver (batchable)Reads a resolver and one page of the names bound to it.
getResolverLinks (batchable)Lists the names linked to record sets on an ENSv2 resolver.
getResolverRoles (batchable)Lists the role grants on an ENSv2 resolver.
getResolvers (batchable)Lists the ENSv2 resolvers on which an address holds roles.
getStatus (batchable)Reads the indexer's health and how far each chain is indexed.
getSubnames (batchable)Lists the direct subnames of a name.
lookup (batchable)Reads up to 1,000 names and addresses in one request.
search (batchable)Searches names by text.

migration

ActionDescription
get (batchable)Reads whether an ENSv1 name can migrate to ENSv2, how, and what it becomes.
migrateMigrates one or more ENSv1 names to ENSv2, carrying their resolver records and subnames.

name

ActionDescription
get (batchable)Reads the full state of a name across ENSv1 and ENSv2: where it lives, who owns it, its resolver, expiry and whether it can be registered or renewed.
getLabel (batchable)Recovers a label from its labelhash through the ENSv2 LabelStore.
reclaimResets the ENSv1 registry owner (manager) of an unwrapped .eth name, as its registrant.
setManagerSets the ENSv1 manager (registry owner) of a name.
setTtlSets the ENSv1 registry TTL of a name.
transferSends a name to another account and resolves once the transaction is submitted.

permission

ActionDescription
check (batchable)Checks whether an account may perform one operation on an ENS name, and lists exactly what it lacks when it may not.
get (batchable)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.
setRecordAccessLets another account edit a name's records, or takes that access back.

plan

ActionDescription
get (batchable)Reads a saved plan and its progress.
list (batchable)Lists the saved plans of this client's chain and of its chains, newest first.
reconcile (batchable)Records a transaction sent outside ensforge as a plan step's submission.
resumeContinues a saved plan after a failure or a reload.
sendSends any plan: one prepared by a write's .prepare, or several combined with Plan.merge.

primaryName

ActionDescription
get (batchable)Reads the primary name of an address (ENSIP-19 reverse resolution), verified against the name's address record.
setSets or clears the primary name (reverse record) of an address.
signClaimSigns a claim to a primary name on one or more L2s, with one signature and no transaction.

record

ActionDescription
get (batchable)Reads any mix of a name's records in one request: texts, addresses, content hash, ABI, public key, name record, interface implementers and data records.
getAddress (batchable)Reads one address record of an ENS name, for Ethereum by default or any coin (ENSIP-9, ENSIP-11).
getAvatar (batchable)Reads the avatar of an ENS name and resolves it to a URL a browser can load (ENSIP-12).
getContentHash (batchable)Reads the content hash of an ENS name (ENSIP-7), decoded into its protocol, value and URI.
getText (batchable)Reads one text record of an ENS name, such as url, avatar or com.twitter.
setWrites records of an ENS name and resolves once the transaction is submitted.

registration

ActionDescription
commitCommits to registering .eth names, the first half of a registration.
getCommitmentStatus (batchable)Reads where a registration commitment is in its window.
getParameters (batchable)Reads the .eth registration settings: contracts, commitment window, minimum duration, grace period and accepted payment tokens.
getPrice (batchable)Quotes the price of registering a .eth name, in an ERC-20 payment token.
getRenewalPrice (batchable)Quotes renewing one or more .eth names, in an ERC-20 payment token.
isAvailable (batchable)Checks whether a .eth name can be registered now.
registerRegisters one or more .eth names: approve, commit, wait, register, then records and primary name.
renewRenews one or more .eth names, ENSv1 or ENSv2, paying in an ERC-20 token.

registry

ActionDescription
attachSets or removes the subregistry of an ENSv2 name.
deployDeploys an ENSv2 UserRegistry, optionally attaching it as a name's subregistry.
get (batchable)Reads an ENSv2 registry: its kind, implementation, parent, canonical name, URI, whether it is emancipated, and whether it can be upgraded.
setUriSets the metadata URI of an ENSv2 registry.
upgradeUpgrades an ENSv2 registry to the deployment's latest implementation.

resolver

ActionDescription
createDeploys an ENSv2 PermissionedResolver, optionally with records, and points a name at it.
get (batchable)Reads the resolver of an ENS name: its address, what kind of resolver it is, who may write to it and which record profiles it supports.
getLink (batchable)Reads which record set an ENS name uses on its PermissionedResolver.
linkLinks an ENS name to the records of another name on the same PermissionedResolver.
resolve (batchable)Calls the resolver of an ENS name with raw calldata through the Universal Resolver (ENSIP-10).
setPoints an ENS name at a resolver.
upgradeUpgrades the PermissionedResolver of an ENS name to a newer implementation.

role

ActionDescription
get (batchable)Reads the ENSv2 roles an account holds on a name, or at the root of a registry or resolver.
grantGrants ENSv2 roles to an account on a name, or at the root of a registry or resolver.
revokeRevokes ENSv2 roles from an account on a name, or at the root of a registry or resolver.

subname

ActionDescription
createCreates a subname, routed by its parent: an ENSv2 subregistry, the ENSv1 registry or the NameWrapper.
removeRemoves a subname.
updateChanges a subname from its parent: owner, resolver or expiry, in one plan.

wrapper

ActionDescription
getFuses (batchable)Reads the NameWrapper owner, fuses and expiry of an ENSv1 name.
setChildFusesBurns fuses on, or extends, a wrapped ENSv1 subname as its parent's owner.
setFusesBurns owner-controlled fuses on a wrapped ENSv1 name.
unwrapUnwraps an ENSv1 name from the NameWrapper.
wrapWraps an ENSv1 name in the NameWrapper.

Was this page helpful?