# Ordinals Primary Name Protocol (Solution A, Draft)

## 1. Background

The Bitcoin ecosystem currently lacks a primary name protocol, so the related blockchain explorers, third-party NFT markets, and DApp websites for Bitcoin have not been able to display users' wallet addresses as a more readable name, unlike Ethereum. If there were a primary name protocol in the Bitcoin ecosystem, it could allow some wallet addresses to be disseminated in a more user-friendly form within the Bitcoin community and further spread to non-Bitcoin communities, enhancing the influence of the Bitcoin community.

There are already multiple Ordinals name protocols, with typical examples being .btc Name and .sats Name. It is hoped that there can be a rule that accommodates the mainstream Ordinals name protocols, reducing the development and integration costs for all parties involved.

## 2. Core Rules

### 2.1. Ordinals Primary Name Definition

A wallet owns an Ordinals name, and the wallet inscribed a primary-name that record the same Ordinals name, then the Original name is the primary name of the wallet.

### 2.2. Inscriptions Format

Example 1.  Without the optional key "avatar":

```json5

{ 
  "p": "primary-name",
  "op": "update",
  "name": "abc.btc"
}
```

Example 2. With the optional key "avatar":

```json5

{ 
  "p": "primary-name",
  "op": "update",
  "name": "btcname.btc",
  "avatar": "41479dbcb749ec04872b77c5cb4a67dc7b13f746ba2e86ba70854d0cdaed0646i0"
}
```

<table><thead><tr><th width="103">Key</th><th width="133">Required?</th><th width="144">Expected</th><th>Description</th><th data-hidden>Required?</th><th data-hidden>Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td>primary-name</td><td>Helps indexers identify the Ordinals Primary Name Protocol</td><td>Yes</td><td>Protocol: Helps other systems identify and process primary-name events</td></tr><tr><td>op</td><td>Yes</td><td>update</td><td>Tells indexers the primary name should be updated</td><td>Yes</td><td>Operation: Type of event (set)</td></tr><tr><td>name</td><td>Yes</td><td>Ordinals Name</td><td>An Ordinals name, such as  "a.btc", "b.sats"</td><td>Yes</td><td>An Ordinals name, such as  "a.btc", "b.sats"</td></tr><tr><td>avatar</td><td>No</td><td>Inscription ID</td><td>Avatar or profile pic. Specify with inscription ID. There is no need to check the owner of the the Inscription ID, the Inscription ID can be used directly.</td><td></td><td></td></tr></tbody></table>

### 2.3. Record the Minter of a primary-name Inscription, not the Owner of a primary-name Inscription

The minter of a inscription will not be changed, but the owner of a inscription maybe changed. The inscription minter address is protected by cryptography and can not be forged, representing the actions of the minter themselves.&#x20;

Define the address that spend the input which contains the corresponding tapscript as the minter of the inscription. There is an example about the minter of a inscription in [Appendix](#appendix).

### 2.4. Last is the New&#x20;

The Primary Name of a wallet maybe changed, and there is only one primary name for a wallet , so the old primary-name inscription should be overwritten by the new primary-name inscription for the same wallet.

## 3. Some Cases&#x20;

Reminder： **All the primary-name inscriptions should be minted by the wallet itself,**  rather than using a proxy inscription service. When you use a proxy inscription service, it means you transfer BTC to the proxy wallet, the proxy wallet inscribe a inscription and transfer the inscription to you, in this case, the proxy wallet will be the minter of the primary-name inscription.

* **case** **1**: Wallet A owns "a.btc". Wallet A  inscribed `{"p":"primary_name","op":"update","name":"a.btc"}`. At this point, the primary name of wallet A is "a.btc".
* **case 2**: Wallet A owns "a.btc", "b.sats". Wallet A as minter first inscribed `{"p":"primary_name","op":"update","name":"a.btc"}`, and then inscribed `{"p":"primary_name","op":"update","name":"b.sats"}`.At this point, the primary name of wallet A is "b.sats".
* **case 3**: Wallet A does not own "a.btc". Wallet A inscribed `{"p":"primary_name","op":"update","name":"a.btc"}` .At this point, wallet A does not have a primary name.
* **case 4**: Wallet A once owned "a.btc". Wallet A first inscribed `{"p":"primary_name","op":"update","name":"a.btc"}`  ,and then wallet A transfered "a.btc" to wallet B. At this point, wallet A does not have a primary name.
* **case 5**: Wallet A does not own "a.btc". Wallet A inscribed `{"p":"primary_name","op":"update","name":"a.btc"}` , and then wallet B transfered "a.btc" to wallet A. At this point, the primary name of wallet A is "a.btc".
* **case 6**: Wallet A owns "a.btc" and "b.btc", and "a.btc" the primary name of  Wallet A. Wallet B inscribed `{"p":"primary_name","op":"update","name":"b.btc"}` , and then wallet B transfered the primary-name inscription to wallet A. At this point, the primary name of wallet A is still "a.btc".

## 4. Further Discussion&#x20;

The Ordinals Primary Name Protocol is currently in draft status. You are welcome to join the .btc name Discord #primary-nam channel to discuss and help refine this protocol.&#x20;

BtcName Discord : <https://discord.gg/eNERqJU85x>

## References

* Ordinals Theory Docs: <https://docs.ordinals.com/>
* .btc Name Docs : <https://docs.btcname.id>
* .sats Name Docs: <https://docs.satsnames.org/>

## Appendix&#x20;

Inscription Minter Example&#x20;

The two steps for creating Inscriptions:&#x20;

> The commit transaction commits to a tapscript containing the content of the inscription, and the reveal transaction spends from that tapscript, revealing the content on chain and inscribing it on the first sat of the input that contains the corresponding tapscript.

Take the inscription of 1.btc as example to explain the minter of a inscription. <https://ordiscan.com/inscription/35648>  \
[https://mempool.space/tx/9ba5066ee169289087167b963145901340e295a829fc9bda93ea4df45150a641 ](<https://mempool.space/tx/9ba5066ee169289087167b963145901340e295a829fc9bda93ea4df45150a641 >) <br>

<figure><img src="/files/rFAIUVVgKJGM3P0SxcI2" alt=""><figcaption></figcaption></figure>

The minter of 1.btc is "bc1p0zjkqv4vy3h0nrxlvy2cwzrvchp0k5flrk9tkz7lfjpctdsy0n4q02u8ax". The first owner of 1.btc is "bc1pfhtz56smmhduncrc6huu3a73ythx34fjgh67fckmymfrfy47aa3qcxhhlu".


---

# 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.btcname.id/docs/ordinals-primary-name-protocol/ordinals-primary-name-protocol-solution-a-draft.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.
