TON DNS & Domains
TON DNS is a service for translating human-readable domain names (such as
mysite.temp.ton) into TON Smart Contract Addresses, ADNL Addresses employed by services running on the TON Network (such as TON Sites) and so on.
TON DNS Standard describes the format of domain names, the process of resolving a domain, the interface of DNS smart contracts and the format of DNS records.
const address: Address = await tonweb.dns.getWalletAddress('test.ton');
const address: Address = await tonweb.dns.resolve('test.ton', TonWeb.dns.DNS_CATEGORY_WALLET);
tonlib-cli is supported by DNS queries.
Currently, only domains ending in
.ton are recognized as valid TON DNS domains.
Root DNS smart contract source code - https://github.com/ton-blockchain/dns-contract/blob/main/func/root-dns.fc.
This could change in the future. Adding a new first-level domain will require new root smart contract and general vote to change the network config #4.
*.ton domains are implemented in the form of an NFT. Since they implement the NFT standard, they are compatible with regular NFT services (e.g. NFT marketplaces) and wallets that can display NFT.
*.ton domains source code - https://github.com/ton-blockchain/dns-contract.
.ton domains resolver implements an NFT collection interface and .ton domain implements an NFT item interface.
The domain owner can make subdomains by setting the address of the smart contract responsible for resolving subdomains in the DNS record
It can be any smart contract that implements the DNS standard.