HOME / PROTOCOL / DOCS

Documentation

Everything you need to resolve, register, and build with RHNS names.

// 01

How names work

A registration is one record on Robinhood Chain with two display forms: the native name.rbh and the ENS-compatible name.rname.eth. Both always share one owner because they are the same record. Labels are 3-63 characters of lowercase letters, digits, and hyphens (no leading or trailing hyphen). Names are rented per year, renewable up to ten years at a time, and protected by a 90-day grace period after expiry.

// 02

Registering: commit, wait, reveal

Registration is two transactions so nobody can watch the mempool and front-run your name. First you submit a commitment (a hash that reveals nothing), wait a short security period enforced onchain, then submit the registration with payment. Prices are set in USD per year by name length and paid in ETH at the live feed rate; any overpayment is refunded by the contract in the same transaction.

// 1. get everything prepared for your wallet
GET /v1/register/params?label=jonah&owner=0xYou&years=1
// 2. send commitTx from the response, wait minCommitAgeSeconds
// 3. send registerTx (carries the ETH value), done
// 03

REST API

Reads are served from a PostgreSQL index of chain events, so they are fast and never depend on an RPC call. All endpoints are public and unauthenticated.

GET /v1/search?q=jonahavailability + price
GET /v1/names/jonahfull record + history
GET /v1/resolve/jonah.rbhname to address + records
GET /v1/reverse/0xAddressaddress to primary name
GET /v1/owners/0xAddress/namesnames an account owns
GET /v1/register/paramsready-to-sign transactions
GET /v1/renew/paramsrenewal transaction
GET /v1/statslive protocol totals
// example: resolve a name
$ curl https://api.rhns.domains/v1/resolve/jonah.rbh
{ "label": "jonah", "address": "0x7099…79C8",
"texts": { "com.twitter": "@jonah" }, "expiresAt": "2029-…" }
// 04

Records

Every name carries an address record (defaults to the owner until set), free-form text records, and a contenthash. These text keys follow ENS conventions so existing tooling understands them:

avatarimage URL
urlwebsite
com.twittersocial handle
emailcontact address

Records are versioned onchain: if a name expires past grace and someone else registers it, the previous owner's records are wiped automatically. Reverse records self-invalidate too; an address only ever displays a primary name it still owns.

// 05

ENS resolution

name.rname.eth resolves in any ENS-aware wallet through ENSIP-10 wildcard resolution and CCIP-read (ERC-3668), the architecture used by cb.id and uni.eth. The wallet queries Ethereum, the resolver defers to the RHNS gateway, the gateway answers from the registry and signs the response, and the resolver contract verifies that signature onchain. Supported queries: addr, addr with coinType 60, text, and contenthash.

// 06

Contracts

Two contracts on Robinhood Chain plus one resolver on Ethereum. Source is verified on deployment.

RHNSRegistry (L2)published at launch
RHNSRegistrar (L2)published at launch
OffchainResolver (L1)published at launch
// 07

Errors

Custom errors your transaction can revert with, exactly as the contracts define them:

NameUnavailableregistered and not past grace
InvalidLabelfails the 3-63 [a-z0-9-] rule
LabelReservedheld back from public registration
UnknownCommitmentregister without a prior commit
CommitmentTooNewsecurity wait not elapsed yet
InsufficientPaymentmsg.value below the quoted price
StalePriceETH/USD feed too old, retry shortly
NotOwnercaller does not control the name

Stuck? Contact support or check the FAQ.