import { TonHttpProvider } from "../../providers/httpProvider"; import Address from "../../utils/address"; import { dnsResolve, DNS_CATEGORY_WALLET } from "./utils"; interface DnsConfig { rootDnsAddress: string; } export class TonDns { /** * @param provider {TonHttpProvider} */ provider: TonHttpProvider; config: DnsConfig; constructor(provider: TonHttpProvider, config: DnsConfig) { this.provider = provider; this.config = config; } /** * @returns {Promise
} */ async getRootDnsAddress() { return new Address(this.config.rootDnsAddress); } /** * @param domain {string} e.g "sub.alice.ton" * @param category {string | undefined} category of requested DNS record, null for all categories * @param oneStep {boolean | undefined} non-recursive * @returns {Promise