Blockchain ID on Namecoin

John Light edited this page Aug 6, 2015 · 1 revision

Username Specifications

Namecoin allows all ascii characters for its key-value entries, but the username specifications for this protocol only allow for lowercase letters, numbers, and underscores, so make sure you only use those characters in usernames. Names with all other characters will be ignored by crawlers.

Registering username/profile pairs as key-value entries

You'll need either a desktop Namecoin client (Namecoin-Qt) or a UNIX Namecoin daemon. Instructions for building namecoind from source are here. Once you have a running version of either Namecoin-Qt or namecoind you will need to buy some namecoins (from exchanges like Kraken or BTC-e) and send them to yourself. Now you're ready to register new names.

  1. issue a "name new" with the key (the username with "u/" prepended)
  2. issue a "name first update" with the chunked profile

"Name new" operations

The "name new" operation is the first operation required to register a key-value pair on Namecoin (and by extension, a username/profile pair in accordance with the ONS protocol). This is the operation that communicates intent to register and use a given name. Without "name first update," however, the name registration is not complete.

Current cost: 0.01 NMC

"Name first update" operations

After the "name new" operation is complete, the "name first update" operation completes the name registration.

Current cost: 0.00 NMC

Profile Chunking

Key-value entries in Namecoin are limited to a maximum of 519 bytes.

As a result, profiles exceeding 519 bytes must be split into several linked components in order to be embedded in the blockchain.

To chunk a JSON object, simply do the following:

  1. check if all the remaining data fits in one chunk
  2. if not, choose an unregistered Namecoin key (e.g. "i/username-1" - this will be the key of the "next" chunk) and create an empty JSON object (the current chunk), then add a pointer from this chunk to the next one (e.g. "next": "i/username-1")
  3. fill the JSON object with as many properties as possible
  4. go back to 1

Note: we recommend not using the "u/" namespace for linked chunks.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.