Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace dns

Index

Functions

cloudflareLookup

  • cloudflareLookup(domain: string): Promise<string | null>
  • Lookup DNS TXT record using Cloudflare DNS-over-HTTPS

    Parameters

    • domain: string

      The domain to get the TXT record from.

    Returns Promise<string | null>

    Contents of the TXT record.

dnsOverHttps

  • dnsOverHttps(url: string): Promise<string | null>
  • Lookup a DNS TXT record.

    If there are multiple records, they will be joined together. Records are sorted by a decimal prefix before they are joined together. Prefixes have a format of 001;999;

    Parameters

    • url: string

      The DNS-over-HTTPS endpoint to hit.

    Returns Promise<string | null>

    Contents of the TXT record.

googleLookup

  • googleLookup(domain: string): Promise<string | null>
  • Lookup DNS TXT record using Google DNS-over-HTTPS

    Parameters

    • domain: string

      The domain to get the TXT record from.

    Returns Promise<string | null>

    Contents of the TXT record.

lookupDnsLink

  • lookupDnsLink(domain: string): Promise<string | null>
  • Lookup a DNSLink.

    Parameters

    • domain: string

      The domain to get the DNSLink from.

    Returns Promise<string | null>

    Contents of the DNSLink with the "ipfs/" prefix removed.

lookupTxtRecord

  • lookupTxtRecord(domain: string): Promise<string | null>
  • Lookup a DNS TXT record.

    Race lookups to Google & Cloudflare, return the first to finish

    Parameters

    • domain: string

      The domain to get the TXT record from.

    Returns Promise<string | null>

    Contents of the TXT record.

Generated using TypeDoc