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/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
avatar
Namespace
g17khqpukees4237dtn3astzapmp462vjhsz6st4 / settlers
Files
4 (README)(gnomod.toml)
Exported functions
8
Module
gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar
gno
0.9

Files (4)

  • README.mdmarkdown
  • gnomod.tomltoml
  • avatar.gnogno
  • render.gnogno
README.mdPreviewRaw
# Settler avatars

This realm's one job is to show off a Settler as a small picture, for anyone who asks.
If an account owns a Settler, this is the place that draws it.

This realm doesn't own or store anything itself; it just looks up a Settler and draws it, on the spot,
whenever it's asked to. Keeping it separate means any other realm or web app on Gno.land can show someone's
Settler next to their name, in a forum post, a leaderboard, or a profile, without having to know anything
about how the art is put together. They just ask this realm for the picture.

The [Settlers nft realm](/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/nft) is what actually hands out the gnomes and keeps
track of who owns what.

## Usage Example

This gives you a Settler image next to the address, ready to write into your own Markdown:

```go
import "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar"

func RenderUser(addr address) string {
	// Size: 32x32 px, Transparent background: true
	return avatar.Markdown(addr, 32, true) + " " + addr.String()
}
```

`Markdown` returns nothing if the address has no Settler, so there's no need to check first.
`SVG` and `URI` work the same way, and give you the raw picture instead, if that's what you need.

Functions

  • Admin() string

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

  • Markdown(addr string, size int, transparent bool) string

  • Render(path string) string

  • SetNotice(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}, alertType string, msg string)

  • SVG(addr string, size int, transparent bool) string

  • TransferAdmin(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}, newAdmin string)

  • URI(addr string, size int, transparent bool) 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.