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

dns.getProof

Fetches the DNSSEC proof of a DNS name's _ens TXT record. Parameters, return value, errors and examples for dns.getProof in @ensforge/sdk.

ReadBatchablestable
Since v1.0.0View source

Fetches the DNSSEC proof of a DNS name's _ens TXT record.

When to use

Use to fetch a proof once and pass it to dns.claim, or to inspect it.

Details

  • Fetched from the deployment's DNSSEC gateway (ENSIP-17) unless gatewayUrls is given.
  • Not verified; dns.getStatus verifies it on-chain.

Signature

function getProof(client: Like, options: getProof.Options): Promise<getProof.ReturnType>

Call it as ens.dns.getProof(options) on a client, or Actions.dns.getProof(client, options).

dns.getProof.request(options) builds a deferred read for Actions.batch. See Look up many at once.

Parameters

OptionTypeDefaultDescription
name (required)stringDNS name. Normalized automatically.
gatewayUrlsreadonly string[]DNSSEC gateways to use instead of the deployment's.

Also takes the read options.

Returns

Resolves to Proof. Signed RRSets, the record's TXT strings and its signature times.

FieldTypeDescription
namestringDNS name the proof is for, e.g. _ens.example.com.
rrsetsreadonly SignedRRSet[]Signed RRSets, root first.
inceptionnumberSignature inception of the proven record set, as a Unix timestamp; 0 when it does not exist.
expirationnumberSignature expiration of the proven record set, as a Unix timestamp; 0 when it does not exist.
txtreadonly string[]TXT strings of the proven record set; empty when the record does not exist.

Errors

ErrorCodesWhen
InvalidInputErrorINVALID_NAMEnames that are not DNS names.
GatewayErrorGATEWAY_REQUEST_FAILED, GATEWAY_RESPONSE_INVALIDthe DNSSEC gateway fails.
UnsupportedErrorUNSUPPORTED_ON_DEPLOYMENTwithout a DNSSEC gateway or gatewayUrls.
NetworkErrorRPC_REQUEST_FAILED, RPC_TIMEOUT, RATE_LIMITEDthe RPC request fails.

It can also fail with the errors every read can (Errors.CommonError: ConfigError, ContractRevertError, InternalError, NetworkError).

See How errors work.

Examples

Fetching a proof
const proof = await ens.dns.getProof({ name: "example.com" })

See also

Was this page helpful?