Core Features

.rail20 Usernames

Human-readable names for your shielded address. Send to alice.rail20 instead of a 32-byte ZK address.

Overview

A .rail20 username resolves to a shielded address on-chain. Registration on UsernameRegistry — fully decentralized.

Registration

  1. Choose name (3-32 chars, lowercase alphanumeric + dash)
  2. Must start with letter, end with letter/digit
  3. Annual fee: 0.005 ETH/year (burned)
javascript
const registry = new ethers.Contract(REGISTRY_ADDRESS, REGISTRY_ABI, signer);
const fee = ethers.parseEther("0.005");
await registry.register("alice", myShieldedAddress, { value: fee });

const [found, addr] = await registry.resolve("alice");

Naming Rules

RuleValidInvalid
3-32 charactersaliceab
Lowercase onlyaliceAlice
Alphanumeric + dashalice-2alice_2
Start with letteralice2alice

Resolution

javascript
const [found, shieldedAddress] = await registry.resolve("bob");
if (found) {
  await sendPrivate(shieldedAddress, amount);
}

Renewal & Expiry

javascript
await registry.renew("alice", { value: ethers.parseEther("0.005") });
const expiry = await registry.getExpiry("alice");
Registration fees are burned (dead address), not collected by the protocol. This prevents name squatting.