dns.getStatus
Reads whether a DNS name is imported into ENS, and what it needs to be. Parameters, return value, errors and examples for dns.getStatus in @ensforge/sdk.
Reads whether a DNS name is imported into ENS, and what it needs to be.
When to use
Use to tell the user which step comes next, before dns.claim.
Details
- Compares the ENSv1 registry owner with the address in the
_ensTXT record, and verifies the record's DNSSEC proof against the on-chain DNSSEC oracle. actionis the next step:none,claim,set-txt-recordorproof-invalid.- Gasless DNS names (
ENS1TXT records) resolve without importing; seedns.getOffchainResolver.
Signature
function getStatus(client: Like, options: getStatus.Options): Promise<getStatus.ReturnType>Call it as ens.dns.getStatus(options) on a client, or Actions.dns.getStatus(client, options).
dns.getStatus.request(options) builds a deferred read for Actions.batch. See Look up many at once.
Parameters
| Option | Type | Default | Description |
|---|---|---|---|
name (required) | string | DNS name. Normalized automatically. | |
gatewayUrls | readonly string[] | DNSSEC gateways to use instead of the deployment's. |
Also takes the read options.
Returns
Resolves to Status. Import state and the next step.
| Field | Type | Description |
|---|---|---|
name | string | Normalized name. |
imported | boolean | Whether the name is in the ENSv1 registry. |
owner | Address | null | ENSv1 registry owner, or null when not imported. |
dnsOwner | Address | null | Address in the _ens TXT record (a=0x…), or null when there is none. |
proofValid | boolean | Whether the DNSSEC proof of the TXT record verifies against the on-chain DNSSEC oracle. |
importedInception | number | null | Inception of the last imported proof, or null when none was imported. |
proofInception | number | Inception of the current DNSSEC proof. |
action | ImportAction |
Errors
| Error | Codes | When |
|---|---|---|
InvalidInputError | INVALID_NAME | names that are not DNS names. |
GatewayError | GATEWAY_REQUEST_FAILED, GATEWAY_RESPONSE_INVALID | the DNSSEC gateway fails. |
UnsupportedError | UNSUPPORTED_ON_DEPLOYMENT | without a DNSSEC gateway or gatewayUrls. |
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 status = await ens.dns.getStatus({ name: "example.com" })Example response
Recorded from Ethereum mainnet on 2026-11-18 at block 26443964. Values change as the chain does.
await ens.dns.getStatus({ name: "ens.domains" }){
"name": "ens.domains",
"imported": true,
"owner": "0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5",
"dnsOwner": "0xb8c2C29ee19D8307cb7255e1Cd9CbDE883A267d5",
"proofValid": false,
"importedInception": null,
"proofInception": 1794939171,
"action": "proof-invalid"
}See also
dns.claimto import it
Was this page helpful?