TON DNS Integration

We design and develop full-cycle blockchain solutions: from smart contract architecture to launching DeFi protocols, NFT marketplaces and crypto exchanges. Security audits, tokenomics, integration with existing infrastructure.
Showing 1 of 1 servicesAll 1306 services
TON DNS Integration
Simple
from 1 business day to 3 business days
FAQ
Blockchain Development Services
Blockchain Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1214
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_logo-advance_0.png
    B2B Advance company logo design
    561
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    823

TON DNS Integration

TON DNS is the native naming system of the TON blockchain. .ton domains are used for resolving wallet addresses, smart contracts, and websites in TON Sites (decentralized hosting based on TON Storage). Integration is critical for any dApp targeting a Telegram and TON ecosystem audience.

Resolution via TonClient

import { TonClient, Address } from "@ton/ton";

const client = new TonClient({
  endpoint: "https://toncenter.com/api/v2/jsonRPC",
  apiKey: TON_API_KEY,
});

// Resolving .ton domain
async function resolveTONDomain(domain: string): Promise<string | null> {
  // Remove .ton suffix if present
  const name = domain.endsWith(".ton") ? domain.slice(0, -4) : domain;
  
  try {
    const result = await client.runMethod(
      Address.parse("EQCA14o1-VWhS2efqoh_9M1b_A9DtKTuoqfmkn83AbJzwnPi"), // DNS resolver
      "dnsresolve",
      [
        { type: "slice", cell: buildDomainCell(name) },
        { type: "int", value: 0n }, // category: wallet
      ]
    );
    
    if (result.stack.remaining > 0) {
      const address = result.stack.readAddress();
      return address.toString();
    }
  } catch {
    return null;
  }
  
  return null;
}

TON Connect Integration

For dApps with TON Connect: display .ton name in UI instead of raw address.

import { useTonAddress } from "@tonconnect/ui-react";

function WalletDisplay() {
  const address = useTonAddress();
  const [domain, setDomain] = useState<string | null>(null);
  
  useEffect(() => {
    if (address) {
      resolveReverseTON(address).then(setDomain);
    }
  }, [address]);
  
  return <span>{domain ?? formatAddress(address)}</span>;
}

TON DNS Features

Unlike ENS, TON DNS has a hierarchy through smart contracts: root DNS contract → zonal contracts (.ton zone) → individual domains. Each domain is a separate smart contract.

Domains are sold through auctions on getgems.io and dns.ton.org. NFT domains are traded on TON NFT marketplaces.

TON DNS integration in a TON dApp or Telegram Mini App — 1-2 business days.