Skip to main content
isL1SubnameAvailable and isL2SubnameAvailable report raw registry ownership. Use the method that matches the parent name’s listing: isL1SubnameAvailable for Ethereum, or isL2SubnameAvailable for an L2 chain.
Both methods are deprecated in favor of checkName. checkName reports registry ownership and whether the minter is permitted to mint, and it takes the chain from the listing. A true from these methods can still be followed by a failed mint, because an allowlist, a reservation, or an expired listing is invisible to the registry. Use them only when you want ownership alone and have no minter address in hand.

Check availability on Ethereum

Use isL1SubnameAvailable for a parent name listed on Ethereum mainnet:

Check availability on L2 chains

Use isL2SubnameAvailable with the target chain ID. This example checks Base:

Handle lookup failures

Both methods throw RPC_ERROR when the registry cannot be reached. A failed lookup is not an answer about the name, and reporting it as “taken” tells a user a free name is gone.
Because these methods read from an RPC endpoint, supply your own through customRpcUrls for anything user facing. The default is a shared public endpoint and is rate limited.