registration.isAvailable
Checks whether a .eth name can be registered now. Parameters, return value, errors and examples for registration.isAvailable in @ensforge/sdk.
Checks whether a .eth name can be registered now.
When to use
Use to show whether a name is free before quoting a price or starting a registration.
Details
- Every new
.ethname is registered on ENSv2, including names that expired on ENSv1, so one check covers both. - Names in their grace period are not available; anyone can renew them, and the name is available again once the grace period ends.
- Labels the price oracle rejects (for example shorter than 3 characters) are not available.
Signature
function isAvailable(
client: Like,
options: isAvailable.Options,
): Promise<isAvailable.ReturnType>Call it as ens.registration.isAvailable(options) on a client, or Actions.registration.isAvailable(client, options).
registration.isAvailable.request(options) builds a deferred read for Actions.batch. See Look up many at once.
In React, use useAvailability.
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
name (required) | string | .eth second-level name, e.g. alice.eth. Normalized automatically. |
Also takes the read options.
Returns
Resolves to boolean. Whether the name can be registered.
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME | names that are not .eth second-level names. |
UnsupportedError | UNSUPPORTED_ON_DEPLOYMENT | without ENSv2. |
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 free = await ens.registration.isAvailable({ name: "alice.eth" })Example response
Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.
await ens.registration.isAvailable({ name: "nick.eth" })falseSee also
registration.getPriceto quote it
Was this page helpful?