PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/sys/namereg/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
sys / namereg
Files
17 (gnomod.toml)
Exported functions
11
Module
gno.land/r/sys/namereg/v0
gno
0.9

Files (17)

  • gnomod.tomltoml
  • admin.gnogno
  • api.gnogno
  • blacklist.gnogno
  • canonical.gnogno
  • errors.gnogno
  • init.gnogno
  • preregister.gnogno
  • render.gnogno
  • users.gnogno
  • blacklist_test.gnogno
  • canonical_test.gnogno
  • users_test.gnogno
  • z_0_prop1_filetest.gnogno
  • z_1_prop2_filetest.gnogno
  • z_2_prop3_filetest.gnogno
  • z_3_prop4_filetest.gnogno
  • canonical.gnogno
    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}47

    Functions

    • Canonicalize(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.

    Rendered

    RenderedRawgnoweb ↗

    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.