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.
Check availability on Ethereum
UseisL1SubnameAvailable for a parent name listed on Ethereum mainnet:
Check availability on L2 chains
UseisL2SubnameAvailable with the target chain ID. This example checks Base:
Handle lookup failures
Both methods throwRPC_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.
customRpcUrls for anything user facing. The default is a shared public endpoint and is rate limited.
