Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

namereg/v0 package

Function

Register

func Register(cur realm, username string)
Ask AI Claude ChatGPT

Register registers a new username for the caller.

Valid usernames match `nym-[a-z]{5,13}\d{3}`:

  • literal `nym-` prefix (4 chars)
  • 5-13 lowercase letters (the alpha stem)
  • exactly 3 trailing decimal digits

Total length 12-20 chars. The alpha stem additionally must NOT start with `gno`/`gi`/`gl` and must not match a reserved role name (with implicit `s`-suffix expansion). See ValidateNymFormat for the format/blacklist check.

Canonical-collision detection is enforced atomically by susers.RegisterUser via the unified canonical store in r/sys/users (decision: per Option B, every controller participates in the same canonical-form lookup keyed by full canonical name).

Only direct EOA (maketx call) invocations are supported.

Param

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/sys/namereg/v0" -func "Register" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/sys/namereg/v0" -func "Register" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx
  

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/sys/namereg/v0, for example a function call with arguments.