> For the complete documentation index, see [llms.txt](https://tna-btc.gitbook.io/tna-whitepaper-2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tna-btc.gitbook.io/tna-whitepaper-2/developer-guide/technical-details.md).

# Technical Details

TNA is built on the [Lightning Network](https://docs.lightning.engineering/the-lightning-network/overview) and follows the standards of the [Taproot Assets protocol](https://docs.lightning.engineering/lightning-network-tools/taproot-assets).&#x20;

It leverages Taproot's[ Asset ID](https://docs.lightning.engineering/the-lightning-network/taproot-assets/taproot-assets-protocol#asset-id), [Universes](https://docs.lightning.engineering/lightning-network-tools/taproot-assets/universes), and [Asset Transfer ](https://docs.lightning.engineering/the-lightning-network/taproot-assets/taproot-assets-protocol#docs-internal-guid-ae0229ef-7fff-480d-ba27-14c268d89d16)mechanisms. It also utilizes its key data structure, the [Sparse Merkle Tree (SMT)](https://docs.lightning.engineering/the-lightning-network/taproot-assets/taproot-assets-protocol#docs-internal-guid-5a068ff4-7fff-ecac-596d-f7631d0a2edd), and further expands it to better suit domain name use cases.

TNA supports reverse resolution, allowing lookups from wallet addresses and other external identifiers to their associated Tapnames.&#x20;

TNA enables users to create custom top-level domains (TLDs) with suffixes such as`.btc, .nostr`, etc.

#### Registry

The TNA registry maintains a list of domains, storing information such as `name`, `target`, and `owner`.

* `name`: The domain name, like `bob.btc`
* `target`: The address that the domain name maps to, which can be a wallet address or other external identifiers
* `owner`: The creator or current holder of the domain name

#### Resolver

The TNA resolver is responsible for resolving domain names, i.e., returning the actual address corresponding to a domain name.

Resolving a domain name typically involves two steps:

1. Determining the domain name's position in the Sparse-Merkle Tree, i.e., the leaf node.
2. Obtaining the resolution result from the node's structural information, i.e., the `target`.

#### Domain’s Asset ID

The `asset_id` is calculated as follows:

```scss
asset_id = sha256(genesis_outpoint || asset_tag || asset_meta)
```

Where `asset_tag` represents the top-level domain, such as `.btc`.

#### **Consensus Network**

The TNA Consensus Network is responsible for voting on proposals for top-level domain applications to approve or reject. It consists of a group of wallet addresses, with initial members recruited from the community and new members requiring a majority vote from existing Consensus Network members. The Consensus Network ensures that approved top-level domains are globally unique to avoid confusion, which can be achieved through query requests and negotiations with other domain networks.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tna-btc.gitbook.io/tna-whitepaper-2/developer-guide/technical-details.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
