Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

grc20reg state

Back to all declarations

registry

*v0.Tree

// rlmPath.symbol -> \*Token

Open
OID
0a28ce…86fb:4
registry details

Inspect pointer

Register

func(token *grc20.Token, slug string) string

Register records token under its rlmPath.symbol key and returns that key. Token.ID() carries a trailing sequence id (rlmPath.symbol.\<id>) that keeps token identities/events unique, but the registry deliberately keys by rlmPath.symbol so lookups don't need to know the id, and so a realm cannot register two tokens under the same symbol (overwrite/alias guard).

Open
OID
0a28ce…86fb:6
Register details

Inspect func

MustGet

func(key string) *grc20.Token
Open
OID
0a28ce…86fb:9
MustGet details

Inspect func

registerEvent

untyped string

Value

"register"

maxSlugLen

untyped bigint

Value

(128 <untyped> bigint)

GetRegistry

func() *rotree.ReadOnlyTree
Open
OID
0a28ce…86fb:11
GetRegistry details

Inspect func

validateSlug

func(slug string)

validateSlug panics if the slug is too long or contains non-alphanumeric characters. Only letters, digits, dashes, and underscores are allowed.

Open
OID
0a28ce…86fb:12
validateSlug details

Inspect func

isAlphanumeric

func(c int32) bool
Open
OID
0a28ce…86fb:13
isAlphanumeric details

Inspect func
registry : *v0.Tree Inspect
Register : func(token *grc20.Token, slug string) string Inspect
Get : func(key string) *grc20.Token Inspect
MustGet : func(key string) *grc20.Token Inspect
Render : func(path string) string Inspect
registerEvent : untyped string ="register"
maxSlugLen : untyped bigint =(128 <untyped> bigint)
GetRegistry : func() *rotree.ReadOnlyTree Inspect
validateSlug : func(slug string) Inspect
isAlphanumeric : func(c int32) bool Inspect