BNRP Tutorial

How BNRP works

Bitcoin Name Resolution Protocol: an open naming layer built on Ordinals. No smart contracts, no off-chain state. Just inscriptions and the wallets that hold them.

01

What is BNRP

BNRP stands for Bitcoin Name Resolution Protocol. It is an open protocol for human-readable names on Bitcoin, built entirely on top of Bitcoin Ordinals. There are no smart contracts, no DNS, and no off-chain registry. Every record lives on Bitcoin L1.

A name like trump.btc is an Ordinals inscription. Ownership is determined purely by who holds the inscription UTXO — the same way you own a satoshi. Transfer the UTXO, transfer the name. Nothing else needs to happen.

The protocol is specified as a JSON schema written into inscription content. Any indexer that speaks Ordinals and understands BNRP's operation types can resolve names without trusting any third party.

Supported TLDs

BNRP currently recognizes the following top-level domains:

.btc .sats .x .ord .gm .xbt .sat .unisat
!

No central authority. BNRP does not have a registry contract or a governing DNS zone. Validity is determined by inscription provenance and the nonce ordering rules described in this document.

02

Names

A BNRP name is an Ordinals inscription whose content is a JSON object with "p":"bnrp" and a label matching one of the supported TLDs. The inscription UTXO is the authoritative proof of ownership — no registration confirmation, no separate ownership record.

Names can be bought and sold on the BTCNative marketplace. Selling a name is just transferring the inscription to a new wallet. No contract call, no registry update. The new UTXO holder is the new owner, and any indexer reading BNRP state will reflect that immediately.

When a root name changes hands, all subnames under it become invalid automatically. The new owner starts with a clean slate and can re-authorize subnames individually. This prevents squatting on subname real estate across a sale boundary.

Example: name inscription
{
  "p":    "bnrp",
  "op":   "name_register",
  "name": "trump.btc",
  "records": {
    "btc":     "bc1pexampletaprootaddress...",
    "x":      "realDonaldTrump",
    "url":    "https://trump.com"
  },
  "nonce": 1,
  "v":     1
}
03

Subnames

A subname (e.g. donald.trump.btc) is a separate Ordinals inscription. It is created by the name owner inscribing a subname_register operation. The "to" field in that inscription is the initial owner address. The subname can then be managed independently — its owner controls their own records.

The subname owner can update their records with subname_update, and transfer the subname to another wallet with subname_transfer. The name owner retains the right to revoke any subname at any time with subname_revoke.

For avatar records, the subname can either point to its own Ordinals inscription ID (prefixed ord:...) or use the value "inherit" to resolve to the parent name's avatar automatically.

Subname lifecycle operations

subname_register
Name owner creates a subname and assigns it to an address.
subname_update
Subname owner updates their own records (btc address, handles, URL, etc).
subname_transfer
Subname owner transfers the subname to a new wallet.
subname_revoke
Name owner revokes a subname, invalidating it immediately.
subname_register inscription
{
  "p":    "bnrp",
  "op":   "subname_register",
  "name": "trump.btc",
  "sub":  "donald.trump.btc",
  "to":   "bc1pdonaldwalletaddress...",
  "records": {
    "btc":    "bc1pdonaldwalletaddress...",
    "x":     "donaldtrump",
    "avatar": "inherit"
  },
  "nonce": 1,
  "v":     1
}
subname_update inscription
{
  "p":    "bnrp",
  "op":   "subname_update",
  "sub":  "donald.trump.btc",
  "records": {
    "btc":       "bc1pnewaddress...",
    "lightning": "donald@getalby.com",
    "url":       "https://donald.trump.btc"
  },
  "nonce": 2,
  "v":     1
}
!

Sale invalidates all subnames. When the root name inscription moves to a new wallet, every subname under it becomes unverified. The new owner decides which subnames, if any, to re-authorize. Prior subname holders cannot force reinstatement.

04

Records

Records are stored inside the inscription JSON under a "records" object. Standard keys are defined by the protocol; any additional key is also accepted — BNRP does not restrict custom fields.

Resolvers read the highest-nonce valid inscription for a given name or subname and return whatever records it contains. There is no separate record-update mechanism — updating a record means inscribing a new operation with a higher nonce.

Standard record keys

btc
Bitcoin taproot address. The canonical payment destination for this name.
lightning
Lightning address (user@domain.com format).
x
Twitter/X handle, without the @ symbol.
url
Primary website URL.
avatar
Ordinals inscription ID prefixed with ord:, or the string "inherit" to use the parent name's avatar.
nostr
Nostr public key (npub or hex).
email
Contact email address.
github
GitHub username.
Full records example
{
  "p":    "bnrp",
  "op":   "subname_update",
  "sub":  "donald.trump.btc",
  "records": {
    "btc":       "bc1p...",
    "lightning": "donald@getalby.com",
    "x":         "donaldtrump",
    "url":       "https://trump.com",
    "avatar":    "ord:a1b2c3d4...i0",
    "nostr":     "npub1...",
    "github":    "donaldtrump",
    "custom_key": "any value accepted"
  },
  "nonce": 5,
  "v":     1
}
05

Authority

Authority in BNRP is derived entirely from inscription provenance — the wallet that signs the inscription transaction must match the expected owner for that operation. An indexer marks any inscription coming from the wrong wallet as unauthorized and ignores it.

There are two authority levels: name owner and subname owner. They have non-overlapping control, with the name owner holding final say over which subnames exist.

Role Permitted operations
Name owner Register subnames, revoke subnames, set namespace policy, update root name records
Subname owner Update their own records (subname_update), transfer their subname (subname_transfer)
Anyone else No write access. Any inscription from an unauthorized source is ignored.

Nonce system

Every BNRP inscription carries a "nonce" integer. The indexer tracks the highest valid nonce seen for a given name or subname. Only that inscription is canonical — any earlier inscription with a lower nonce is marked superseded and no longer resolves.

This prevents replay attacks. If an old inscription is re-broadcast, its nonce will be lower than the current canonical state, so it is rejected. Nonces must be strictly increasing.

Nonce increment example
{ "p": "bnrp", "op": "subname_update",
  "sub": "donald.trump.btc",
  "records": { "btc": "bc1pupdatedaddress..." },
  "nonce": 3,  // was 2 — must be higher
  "v":     1
}

Validity states

active

Resolving normally. Highest-nonce valid inscription from the correct wallet.

revoked

Name owner explicitly revoked this subname. Stops resolving immediately.

unverified

Root name was sold. Subname existed before the sale and has not been re-authorized by the new owner.

superseded

A later inscription with a higher nonce exists. This one is no longer canonical.

unauthorized

Inscription came from the wrong wallet. Ignored by all conforming indexers.

06

Namespace Policy

Name owners can publish a namespace policy inscription that controls who is permitted to register subnames under their name. The policy is inscribed as a separate BNRP operation and takes effect for all subsequent subname_register requests.

If no policy is set, the name owner retains full gatekeeping by default — only they can authorize new subnames.

Policy modes

open
Anyone can register a subname under this name without prior approval.
closed
Only the name owner can create subnames. This is the default behavior.
allowlist
Only wallets explicitly listed in the policy may register subnames.
denylist
All wallets may register subnames except those explicitly listed.
Namespace policy inscription
{
  "p":      "bnrp",
  "op":     "namespace_set",
  "name":   "trump.btc",
  "policy": "allowlist",
  "list": [
    "bc1palicewallet...",
    "bc1pbobwallet..."
  ],
  "nonce":  2,
  "v":      1
}
07

BTCNative Tools

BTCNative (btcnative.name) is the first marketplace and tool suite built on BNRP. It provides three focused tools, each corresponding to a different BNRP workflow.

Marketplace

Buy and sell BNRP names. Listings are backed by the underlying Ordinals inscription, so purchasing a name transfers the inscription UTXO directly to the buyer's wallet. No wrapping, no custodial step.

Subname Manager

Create, update, transfer, and revoke subnames under names you own. The manager handles nonce tracking and builds the correct inscription JSON for each operation, so you do not need to compose it by hand.

Namespace Tool

Generate the BNRP inscription JSON for any operation — name registration, namespace policy, subname operations — ready to paste into your preferred inscription service. Useful for power users who want to manage inscriptions outside the Subname Manager.

!

API: All three tools are backed by the BNRP API at api.bnrp.name/v1/. You can integrate the same resolution and lookup endpoints into your own application. See the API Reference section below.

08

API Reference

The BNRP API provides read access to resolved names, records, and subname indexes. The base URL for all endpoints is:

Base URL
https://api.bnrp.name/v1/

Endpoints

GET
/resolve?name=trump.btc
Resolve a name to its current records. Returns the active inscription state including all record fields.
GET
/reverse?address=bc1p...
Reverse lookup: given a Bitcoin taproot address, return all BNRP names whose btc record points to it.
GET
/names/trump.btc/subnames
List all active subnames registered under a given root name, with their current validity state and records.
GET
/resolve?name=donald.trump.btc
Resolve a subname directly. Returns the subname's own records, applying "inherit" rules for fields that defer to the parent.
Example: resolve response
{
  "name":    "trump.btc",
  "status":  "active",
  "owner":   "bc1pexampletaprootaddress...",
  "nonce":   3,
  "records": {
    "btc":     "bc1pexampletaprootaddress...",
    "x":      "realDonaldTrump",
    "url":    "https://trump.com"
  },
  "inscription_id": "a1b2c3d4...i0"
}