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
- Choose name (3-32 chars, lowercase alphanumeric + dash)
- Must start with letter, end with letter/digit
- 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
| Rule | Valid | Invalid |
|---|---|---|
| 3-32 characters | alice | ab |
| Lowercase only | alice | Alice |
| Alphanumeric + dash | alice-2 | alice_2 |
| Start with letter | alice | 2alice |
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.
Was this page helpful?