MNS Specification
Guidelines
Section titled “Guidelines”Valid domains
Section titled “Valid domains”Every section of the domain must comply with the following regular expression.
/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/Case Sensitivity
Section titled “Case Sensitivity”All domains are enforced to be lowercase. Uppercase input is automatically converted by the frontend to lowercase:
- Input:
Domain.night→ Processed as:domain.night - Input:
MY-SUB.domain.night→ Processed as:my-sub.domain.night
If the user inputs an uppercase domain into the SDK, it will return an error as a response due to the domain not adhering to the expected regex.
Domain Restrictions
Section titled “Domain Restrictions”The current implementation enforces the following restrictions on subdomains:
- No practical limits on subdomain depth, the set of all possible subdomains a domain can have.
- No practical limits on domain width, the set of all possible generated domains.
- No practical limits on the length each domain or subdomain can have.
- Example:
a.b.c.d.e.f.g.h.i.j.nightis a valid domain according to the rules. - Example:
a.night,b.night,c.night, …,z.night,aa.night, … are all valid domains in the width of the domain set.
Reserved Domains
Section titled “Reserved Domains”The following domains are all reserved and cannot be registered:
foo.nightbar.nightturing.nightada.night
Valid domains
Section titled “Valid domains”domain.nightmy-domain.nightmydomain123.night123domain.nighta.nightabc.nightsub123.domain.night123sub.domain.nights.domain.nightsub1.domain.nights1d2.nights-d.nights-u-b.domain.night
Invalid domains
Section titled “Invalid domains”-domain.night(cannot start with a hyphen)domain-.night(cannot end with a hyphen)my_domain.night(cannot contain underscores or special characters)my..domain.night(cannot contain consecutive dots).night(cannot be empty)domain(must end with.night)do main.night(cannot contain spaces)do\tmain.night(cannot contain tabs or other whitespace characters)sub-.domain.night(cannot end with a hyphen)my..sub.domain.night(cannot contain consecutive dots)
Caveats
Section titled “Caveats”All domain parts are valid in the contracts but the frontend (and more importantly the SDK for wallet integration) will restrict the user to only create and resolve domains that follow the above specification.