How it Works
In Namoshi, reverse resolution is handled by a special top-level domain:.addr.reverse.
When an address wants to set its primary name:
- It claims its own node under
[address].addr.reverse. - It sets a resolver for this node (usually the standard Public Resolver).
- It sets the
namerecord on that resolver to the desired Namoshi name.
Primary Names
A “Primary Name” (also known as a Reverse Record) is the name that an address identifies as its main identity. When applications see an address, they can query the Reverse Registrar to find the associated name.Setting a Primary Name
TheReverseRegistrar.sol contract provides a convenient function for users to set their primary name in a single transaction:
- Calculates the node for the caller’s address.
- Claims ownership of that node.
- Configures the default resolver.
- Sets the name record to the provided
name.
Reverse Claimers
For smart contracts that want to support reverse resolution, theReverseClaimer.sol utility can be used. By inheriting from or calling a Reverse Claimer, a contract can easily claim its own reverse node upon deployment.