1package namereg23import (4 susers "gno.land/r/sys/users"5)67// reservedSet is the runtime O(1) lookup for the role-name blacklist.8// Built in init() from reservedNames in blacklist.gno: each source9// entry contributes BOTH `Canonicalize(n)` and `Canonicalize(n+"s")`10// as keys, implementing the "implicit `s` suffix" rule documented on11// reservedNames.12//13// Why canonicalize the blacklist itself: validation canonicalizes the14// candidate stem before checking, so the comparison set must also be15// in canonical form. Otherwise a candidate like "vital1k" would16// canonicalize to "vitaiik" but the blacklist would contain only17// "vitalik" — the comparison would miss the match. Keeping both sides18// in canonical form makes the lookup exact.19//20// The blacklist remains namereg/v0-local because it is policy specific21// to the Open Nym Tier. Other controllers may have entirely different22// reserved-name policies, or none at all.23var reservedSet map[string]struct{}2425func init() {26 reservedSet = make(map[string]struct{}, len(reservedNames)*2)27 for _, n := range reservedNames {28 reservedSet[Canonicalize(n)] = struct{}{}29 reservedSet[Canonicalize(n+"s")] = struct{}{}30 }31}3233// Canonicalize is a delegating shim to r/sys/users.Canonicalize.34//35// HISTORY: namereg/v0 used to host its own per-stem canonical store and36// its own Canonicalize (l→i only). Option B unified the canonical lookup37// into r/sys/users keyed by full canonical name with broader38// substitutions ({l,i,1}→i, {0,o}→o, {-,.,_} stripped). This shim39// preserves the call-site name for local consumers (blacklist init,40// IsReserved) and any external consumer that imported the function41// from namereg/v0 before Option B.42//43// New code should call susers.Canonicalize directly.44func Canonicalize(s string) string {45 return susers.Canonicalize(s)46}47Canonicalize(s string) string
IsPaused() bool
IsReserved(stem string) bool
NewSetPausedExecutor(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, newPausedValue bool) struct{title string; description string; executor gno.land/r/gov/dao.Executor; filter gno.land/r/gov/dao.Filter}
ProposeDeleteUser(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, addr string, reason string) struct{title string; description string; executor gno.land/r/gov/dao.Executor; filter gno.land/r/gov/dao.Filter}
ProposeNewName(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, addr string, newName string) struct{title string; description string; executor gno.land/r/gov/dao.Executor; filter gno.land/r/gov/dao.Filter}
ProposeNewRegisterPrice(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, newPrice int64) struct{title string; description string; executor gno.land/r/gov/dao.Executor; filter gno.land/r/gov/dao.Filter}
Register(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}, username string)
Render(path string) string
RenderLatestUsersWidget(num int) string
ValidateNymFormat(username string) interface {Error func() string}
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.