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/akkadia/beta/definition

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
definition
Namespace
akkadia / beta
Files
7 (gnomod.toml)
Exported functions
7
Module
gno.land/r/akkadia/beta/definition
gno
0.9

Files (7)

  • gnomod.tomltoml
  • definition.gnogno
  • render.gnogno
  • validation.gnogno
  • definition_test.gnogno
  • external_test.gnogno
  • render_test.gno
gno
validation.gnogno
1package definition23import (4	"strconv"5	"strings"6	"unicode"7	"unicode/utf8"8)910func assertIdentifier(value, name string, limit int) {11	if strings.TrimSpace(value) == "" {12		panic(name + " is required")13	}14	if len(value) > limit {15		panic(name + " bytes exceeds " + strconv.Itoa(limit))16	}17	if !utf8.ValidString(value) {18		panic("invalid " + name)19	}20	for _, r := range value {21		if unicode.IsControl(r) {22			panic("invalid " + name)23		}24	}25}2627func assertFields(fields []Field) int {28	if len(fields) < 1 || len(fields) > 32 {29		panic("field count must be between 1 and 32")30	}31	size := 032	for i, field := range fields {33		assertIdentifier(field.Key, "field key", 128)34		if !utf8.ValidString(field.Value) {35			panic("invalid field value")36		}37		for j := 0; j < i; j++ {38			if fields[j].Key == field.Key {39				panic("duplicate field key")40			}41		}42		size += len(field.Key) + len(field.Value)43		if size > 16384 {44			panic("entry bytes exceeds 16384")45		}46	}47	return size48}4950func assertBatchCount(count int) {51	if count < 1 || count > 100 {52		panic("batch count must be between 1 and 100")53	}54}5556func assertPage(page, count int) {57	if page < 1 {58		panic("page must be positive")59	}60	if count < 1 || count > 50 {61		panic("count must be between 1 and 50")62	}63}64

Functions

  • DeleteAll(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})

  • Get(key string) []map[string]string

  • GetField(key string, fieldKey string) map[string]string

  • GetKeyCount() int

  • ListKeys(page int, count int) []string

  • Render(path string) string

  • SetDefinitions(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}, keys string, values 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.