# 比特币名称系统

<div data-with-frame="true"><figure><img src="/files/e7217726b05556b3436fac98fb91f18ad614efae" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**构建者资源**

* BNSv2 官方网站，用于统计数据， [这里](https://www.bnsv2.com/).
* BNSv2 主网合约， [这里](https://explorer.hiro.so/txid/SP2QEZ06AGJ3RKJPBV14SY1V5BBFNAW33D96YPGZF.BNS-V2).
* BNSv2 SDK， [这里](https://github.com/Strata-Labs/bns-v2-sdk).
* BNSv2 合约仓库， [这里](https://github.com/Trust-Machines/BNS-V2).
  {% endhint %}

#### 概览

* BNS 是 Stacks 上的在线命名系统
* 像 `alice.id` 或 `muneeb.btc` 映射到链上数据
* 名称是符合 SIP-009 标准的 NFT：可转让、可交易、可组合
* 内置市场，用于挂牌、购买和出售名称
* 同时支持开放式（非托管）和受治理式（托管）命名空间
* 每个地址可拥有多个名称，并指定一个主名称
* 完全以 Clarity 智能合约实现
* 当前的 BNS 实现使用 BNS V2 合约，于 2024 年 9 月部署。它接替了 2021 年 Stacks 主网启动时的 V1 合约。

***

## 什么是 BNS？

这个 **比特币名称系统（BNS）** 是建立在 Stacks 之上、由比特币保障安全的去中心化命名系统。它支持人类可读的名称（例如， `alice.id`），这些名称可映射到链上身份、地址和任意记录。

比特币名称服务（BNS）是一种去中心化身份协议，最初于 2014 年作为 Namecoin 在比特币上启动，随后于 2015 年迁移到比特币，并最终在 2021 年其主网启动时迁移到 Stacks。

这意味着 BNS 比 ENS 早了好几年！

BNS 以广受欢迎的 .btc 命名空间为代表，但还有许多其他命名空间，包括 .id、.locker、.app 等。任何人都可以创建一个新的命名空间，并让用户在其中注册名称。目前共有 97 个命名空间，BNS 上已注册超过 360,000 个名称 \[截至 2026 年 3 月]！

| 顶级命名空间 \[截至 2026 年 3 月] | 在该命名空间下注册的名称 |
| ----------------------- | ------------ |
| .btc                    | 302,999      |
| .stx                    | 21,861       |
| .app                    | 12,445       |
| .id                     | 12,053       |
| .stacks                 | 3,961        |

BNS 名称的好处很简单：与其将加密货币发送到一长串 STX 或 BTC 地址，不如使用像 muneeb.btc 这样的人类可读名称。

BNS 名称与 Leather 和 Xverse 等 Stacks 钱包兼容，并支持用于支付的 Stacks L2 和 Bitcoin L1。

BNS 用名称取代复杂的区块链地址，这些名称：

* 可解析为 Stacks 主体
* 可存储结构化元数据
* 名称可以存储包含个人资料数据（简介、PFP、社交链接）、跨链钱包地址（BTC、ETH 等）、子域定义以及任意键值元数据的 zonefile。所有内容都通过 zonefile-resolver 合约链上存储。
* 可直接与智能合约集成
* 完全由链上拥有和管理

Stacks 目前运行 **BNSv2**，这是一个升级后的实现，旨在提升可组合性、清晰度和开发者易用性。它允许用户在不同命名空间内注册、管理和转让名称。它还引入了原生市场、带自定义治理的托管命名空间、每个地址支持多个名称所有权、主名称指定，以及与主合约解耦的链上 zonefile 存储。

***

{% embed url="<https://youtu.be/Ua4i-FxPsoE?si=sU0q2MceU51N0CYZ>" %}

***

## 其他资源

* [\[BNSv2 官方\]](https://www.bnsv2.com/) BNSv2 官方网站
* [\[BNS One\]](https://bns.one/) 注册、交易、发现 BNS 命名空间和名称
* \[[Trust Machines Github](https://github.com/Trust-Machines/BNS-V2)] BNSv2 合约仓库
* [\[Stacks 论坛\]](https://forum.stacks.org/t/megathread-bns-upgrade-discussion/14899) 此前升级讨论帖
* [\[BNSv1\]](https://explorer.hiro.so/address/SP000000000000000000002Q6VF78.bns?chain=mainnet) 之前的 BNSv1 实现引导合约
* [\[BNS 社区\]](https://x.com/bns_community) 关于 BNS 的 Twitter 社区页面
* [\[Gamma\]](https://gamma.io/stacks/collections/bns-v2/items) BNS 交易市场
* [\[BTC US\]](https://btc.us/) 注册 BNS 名称


---

# Agent Instructions: 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://docs.stacks.co/learn/zh/network-fundamentals/bitcoin-name-system.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.
