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

home state

Back to all declarations

toriiMask

untyped string

toriiMask is the Samouraï Coop mark, redrawn as vectors: a torii gate cut out of a full circle, in a 480x480 box. Everything painted through the mask takes the shape of the mark.

Value

"<mask id=\"torii\"><circle cx=\"238\" cy=\"240\" r=\"240\" fill=\"#fff\"/><g fill=\"#000\"><path d=\"M-10 90 Q238 164 490 90 L490 140 Q238 190 -10 140 Z\"/><path d=\"M102 140 L165 140 L162 206 L96 206 Z\"/><path d=\"M302 140 L364 140 L370 206 L304 206 Z\"/><rect x=\"-10\" y=\""...

heroText

type

Value

home.heroText

heroSVG

func(h home.heroText) string

heroSVG draws the page banner: the mark set in a cyan sun on the right, the text stack on the left.

Open
OID
0c332a…10c8:3
heroSVG details

Inspect func

activitySlot

untyped string

Value

"activity"

reviewActivitySlot

untyped string

Value

"reviewactivity"

chartWidth

untyped bigint

Value

(720 <untyped> bigint)

chartX

untyped bigint

Value

(24 <untyped> bigint)

maxBar

untyped bigint

Value

(90 <untyped> bigint)

scaledFill

untyped string

Value

"#fbbf24"

othersFill

untyped string

Value

"#94a3b8"

month

type

Value

home.month

activity

type

Value

home.activity

parseActivity

func(spec string) home.activity

parseActivity reads a chart section; a malformed line is skipped.

Open
OID
0c332a…10c8:12
parseActivity details

Inspect func

parseMonth

func(line string, width int, first bool) (home.month, bool)
Open
OID
0c332a…10c8:14
parseMonth details

Inspect func

formatDay

func(s string) string

formatDay turns 2026-09-24 into "24 Sep 2026", or "" when it is not a date.

Open
OID
0c332a…10c8:15
formatDay details

Inspect func

renderChart

func(slot string) string

renderChart draws a chart section as a markdown image, or "" when it holds no month.

Open
OID
0c332a…10c8:16
renderChart details

Inspect func

rect

func(b *strings.Builder, x int, y int, w int, h int, r int, fill string)
Open
OID
0c332a…10c8:17
rect details

Inspect func

text

func(b *strings.Builder, x int, y int, class string, fill string, s string)

text writes s as SVG text; callers pass repository names and numbers, so it escapes the three characters that could break the markup.

Open
OID
0c332a…10c8:18
text details

Inspect func

areasSlot

untyped string

Value

"areas"

slice

type

Value

home.slice

parseAreas

func(spec string) (noun string, subtitle string, updated string, slices []home.slice)
Open
OID
0c332a…10c8:21
parseAreas details

Inspect func

renderAreas

func() string

renderAreas draws the "areas" section as a ring, or "" when it holds no slice.

Open
OID
0c332a…10c8:22
renderAreas details

Inspect func

hero

home.heroText

hero holds the banner text a "herotext" section leaves out.

Open
OID
0c332a…10c8:24
hero details

Inspect ref

defaultSlots

[]struct{...} (len=11)

defaultSlots seeds the page at deploy time. Later edits go through Set.

Open
OID
0c332a…10c8:26
defaultSlots details (len=11)

+11 more Inspect slice

wallCols

untyped bigint

Value

(24 <untyped> bigint)

wallMaxRows

untyped bigint

Value

(10 <untyped> bigint)

wallCell

untyped bigint

Value

(28 <untyped> bigint)

heartRed

untyped string

Value

"#e63946"

heartPath

untyped string

Value

"M12 21C12 21 3 15.5 3 9.5 3 6.5 5.4 4 8.3 4 10 4 11.2 5 12 6.2 12.8 5 14 4 15.7 4 18.6 4 21 6.5 21 9.5 21 15.5 12 21 12 21Z"

renderHeartsWall

func() string

renderHeartsWall returns the wall as a markdown image; with no heart yet it is one row of empty slots.

Open
OID
0c332a…10c8:38
renderHeartsWall details

Inspect func

admin

.uverse.address

admin is the only address allowed to edit sections.

Value

<gnolang.StringValue>

home

untyped string

Value

"/r/g1rayfgklwl0aspz488wvrcrvt7t2quy6q06lgk2/home"

orderSlot

untyped string

Value

"order"

maxNameLen

untyped bigint

Value

(32 <untyped> bigint)

maxPathLen

untyped bigint

Value

(256 <untyped> bigint)

slots

*v0.Tree

// section name -> markdown body

Open
OID
0c332a…10c8:41
slots details

Inspect pointer

hearts

*v0.Tree

// address -> block height of the heart

Open
OID
0c332a…10c8:44
hearts details

Inspect pointer

Set

func(name string, body string)

Set writes one section of the page. Only the admin can call it. name is the section to write and body is its markdown. The text sections are "header", the bio at the top, then "gno", "projects", "peerdev" and "unrelated"; any other name creates a new section. name "order" decides which sections show and in which order. Its body lists every section name, comma separated, with no spaces. A name left out of the list is hidden, so copy the current list, from Get("order"), and edit it. name "herotext" is the banner's text: "key value" pairs split by ";", with the keys kicker, the small line on top, title, subtitle, tagline, footline, the small line at the bottom, and alt, the banner's description for screen readers. A key left out keeps its current default. "hero", "banner", "reviews", "areachart", "game" and "hearts" are drawn by the page itself: they cannot be set, only placed through "order". Examples, as the two fields of the form: name: header body: I'm a developer engineer at [Samouraï Coop](https://www.samourai.world/). name: herotext body: title David G.; subtitle Developer engineer at Samouraï Coop; footline Open for contribution name: talks body: ## Talks name: order body: hero,header,activityhead,banner,reviews,gno,areachart,projects,peerdev,unrelated,talks,game,hearts

Open
OID
0c332a…10c8:48
Set details

Inspect func

SetActivity

func(activity string, reviews string, areas string)

SetActivity refreshes the three charts in one transaction. Only the admin can call it. Its three arguments are the bodies of the "activity", "reviewactivity" and "areas" sections, as scripts/activity.py prints them; an empty argument leaves that chart as it is.

Open
OID
0c332a…10c8:49
SetActivity details

Inspect func

Delete

func(name string)

Delete removes one section. Only the admin can call it. name is the section to remove, "talks" for example. Its name can stay in "order": a name with no section shows nothing.

Open
OID
0c332a…10c8:50
Delete details

Inspect func

Get

func(name string) string

Get returns a section's markdown, or "" when it does not exist. Get("order") returns the current section list, the one to edit before setting "order".

Open
OID
0c332a…10c8:51
Get details

Inspect func

Heart

func()

Heart records one heart from the caller. Each address can send exactly one.

Open
OID
0c332a…10c8:52
Heart details

Inspect func

Hearts

func() int

Hearts returns how many distinct addresses sent a heart.

Open
OID
0c332a…10c8:53
Hearts details

Inspect func

HasHeart

func(addr .uverse.address) bool

HasHeart reports whether addr already sent a heart.

Open
OID
0c332a…10c8:54
HasHeart details

Inspect func

Render

func(path string) string

Render serves: "" the profile page "wordle/..." the Gnordle game "hearts[/<n>]" the addresses that sent a heart, heartsPerPage per page

Open
OID
0c332a…10c8:56
Render details

Inspect func

renderHeartsTeaser

func() string
Open
OID
0c332a…10c8:58
renderHeartsTeaser details

Inspect func

drawnSections

map[string]bool

drawnSections are rendered from code and state, so Set refuses their names.

Open
OID
0c332a…10c8:60
drawnSections details

Inspect map

heroSlot

untyped string

heroSlot holds the banner's text, one "key value" pair per field, split by ";": kicker, title, subtitle, tagline, footline and alt, the image's description. A field the section leaves out keeps its value from hero.

Value

"herotext"

currentHero

func() home.heroText
Open
OID
0c332a…10c8:61
currentHero details

Inspect func

mdText

func(s string) string

mdText keeps s from closing a markdown link or image label.

Open
OID
0c332a…10c8:62
mdText details

Inspect func

xmlText

func(s string) string

xmlText escapes s for SVG text and attributes.

Open
OID
0c332a…10c8:63
xmlText details

Inspect func

heartsPerPage

untyped bigint

heartsPerPage keeps one page of the list far under the query gas limit, which a list of every heart would pass at about 15,000 of them.

Value

(100 <untyped> bigint)

renderHearts

func(page string) string
Open
OID
0c332a…10c8:64
renderHearts details

Inspect func

wordLen

untyped bigint

Value

(5 <untyped> bigint)

maxGuesses

untyped bigint

Value

(6 <untyped> bigint)

launchDay

untyped bigint

// 2026-09-23, in days since 1970-01-01 UTC: puzzle #1

Value

(20719 <untyped> bigint)

stride

untyped bigint

// coprime with len(words), so every word comes up once per cycle

Value

(17 <untyped> bigint)

words

[]string (len=59)

words are the answers, gno and blockchain flavoured.

Open
OID
0c332a…10c8:66
words details (len=59)

+59 more Inspect slice

today

func() int

today returns the number of the current puzzle, from the last block's time.

Open
OID
0c332a…10c8:67
today details

Inspect func

answer

func(n int) string

answer returns the word of puzzle n.

Open
OID
0c332a…10c8:69
answer details

Inspect func

score

func(guess string, ans string) string

score colours a guess against the answer, handling repeated letters the way the original game does: a letter is marked present only as many times as it is still unmatched in the answer.

Open
OID
0c332a…10c8:70
score details

Inspect func

validGuess

func(g string) bool
Open
OID
0c332a…10c8:71
validGuess details

Inspect func

renderWordle

func(path string) string
Open
OID
0c332a…10c8:72
renderWordle details

Inspect func

solved

func(guesses []string, ans string) bool
Open
OID
0c332a…10c8:73
solved details

Inspect func

missing

func(guesses []string, ans string) string

missing lists the guessed letters that are not in the answer, in guess order.

Open
OID
0c332a…10c8:74
missing details

Inspect func

wordleError

func(msg string) string
Open
OID
0c332a…10c8:75
wordleError details

Inspect func

renderGameTeaser

func() string
Open
OID
0c332a…10c8:76
renderGameTeaser details

Inspect func
toriiMask : untyped string ="<mask id=\"torii\"><circle cx=\"238\" cy=\"240\" r=\"240\" fill=\"#fff\"/><g fill=\"#000\"><path d=\"M-10 90 Q238 164 490 90 L490 140 Q238 190 -10 140 Z\"/><path d=\"M102 140 L165 140 L162 206 L96 206 Z\"/><path d=\"M302 140 L364 140 L370 206 L304 206 Z\"/><rect x=\"-10\" y=\""...
heroText : type =home.heroText
heroSVG : func(h home.heroText) string Inspect
heroImage : func() string Inspect
activitySlot : untyped string ="activity"
reviewActivitySlot : untyped string ="reviewactivity"
chartWidth : untyped bigint =(720 <untyped> bigint)
chartX : untyped bigint =(24 <untyped> bigint)
maxBar : untyped bigint =(90 <untyped> bigint)
scaledFill : untyped string ="#fbbf24"
othersFill : untyped string ="#94a3b8"
monthNames : []string (len=12) Inspect
repoFills : map[string]string Inspect
spareFills : []string (len=4) Inspect
month : type =home.month
activity : type =home.activity
parseActivity : func(spec string) home.activity Inspect
parseMonth : func(line string, width int, first bool) (home.month, bool) Inspect
formatDay : func(s string) string Inspect
renderChart : func(slot string) string Inspect
rect : func(b *strings.Builder, x int, y int, w int, h int, r int, fill string) Inspect
text : func(b *strings.Builder, x int, y int, class string, fill string, s string) Inspect
areasSlot : untyped string ="areas"
areaFills : []string (len=6) Inspect
slice : type =home.slice
parseAreas : func(spec string) (noun string, subtitle string, updated string, slices []home.slice) Inspect
renderAreas : func() string Inspect
hero : home.heroText Inspect
defaultSlots : []struct{...} (len=11) Inspect
wallCols : untyped bigint =(24 <untyped> bigint)
wallMaxRows : untyped bigint =(10 <untyped> bigint)
wallCell : untyped bigint =(28 <untyped> bigint)
heartRed : untyped string ="#e63946"
heartPath : untyped string ="M12 21C12 21 3 15.5 3 9.5 3 6.5 5.4 4 8.3 4 10 4 11.2 5 12 6.2 12.8 5 14 4 15.7 4 18.6 4 21 6.5 21 9.5 21 15.5 12 21 12 21Z"
renderHeartsWall : func() string Inspect
admin : .uverse.address =<gnolang.StringValue>
home : untyped string ="/r/g1rayfgklwl0aspz488wvrcrvt7t2quy6q06lgk2/home"
orderSlot : untyped string ="order"
maxNameLen : untyped bigint =(32 <untyped> bigint)
maxPathLen : untyped bigint =(256 <untyped> bigint)
slots : *v0.Tree Inspect
hearts : *v0.Tree Inspect
init.42 : func() Inspect
Set : func(name string, body string) Inspect
SetActivity : func(activity string, reviews string, areas string) Inspect
Delete : func(name string) Inspect
Get : func(name string) string Inspect
Heart : func() Inspect
Hearts : func() int Inspect
HasHeart : func(addr .uverse.address) bool Inspect
assertAdmin : func() Inspect
Render : func(path string) string Inspect
renderPage : func() string Inspect
renderHeartsTeaser : func() string Inspect
drawnSections : map[string]bool Inspect
heroSlot : untyped string ="herotext"
currentHero : func() home.heroText Inspect
mdText : func(s string) string Inspect
xmlText : func(s string) string Inspect
heartsPerPage : untyped bigint =(100 <untyped> bigint)
renderHearts : func(page string) string Inspect
wordLen : untyped bigint =(5 <untyped> bigint)
maxGuesses : untyped bigint =(6 <untyped> bigint)
launchDay : untyped bigint =(20719 <untyped> bigint)
stride : untyped bigint =(17 <untyped> bigint)
words : []string (len=59) Inspect
today : func() int Inspect
answer : func(n int) string Inspect
score : func(guess string, ans string) string Inspect
validGuess : func(g string) bool Inspect
renderWordle : func(path string) string Inspect
solved : func(guesses []string, ans string) bool Inspect
missing : func(guesses []string, ans string) string Inspect
wordleError : func(msg string) string Inspect
renderGameTeaser : func() string Inspect