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

avatar package

Functions

ClearNotice

func ClearNotice(cur realm)

ClearNotice removes the current notice.

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/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "ClearNotice" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "ClearNotice" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

Markdown

func Markdown(addr address, size int, transparent bool) string

Markdown returns the avatar of an address as a Markdown image, or an empty text if it has none:

Example
1![Settler #12](data:image/svg+xml;charset=utf-8,...)

The size and transparent are the same as in SVG.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar.Markdown(,,)"

Result

Render

func Render(path string) string

Render renders the realm.

By default renders what this realm is, how to use it, and some avatars.

Paths:

  • `svg/{address}`: The SVG of the Settler of an address.
  • `md/{address}`: The Markdown that Markdown returns for an address, rendered, with the same parameters.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar.Render()"

Result

SVG

func SVG(addr address, size int, transparent bool) string

SVG returns the SVG document of the Settler of an address, or an empty text if it has none.

The size is the width and height in pixels of the square image, from 32 to 2048 (multiples of 32 keep every art pixel as a whole number of screen pixels). A size of 0 or less leaves out the width and the height, so that the image scales to its container. If transparent is true, the image has no background.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar.SVG(,,)"

Result

SetNotice

func SetNotice(cur realm, alertType mdalert.Type, msg string)

SetNotice posts a realm-wide message, shown at the top of the page.

Params

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/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "SetNotice" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "SetNotice" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

TransferAdmin

func TransferAdmin(cur realm, newAdmin address)

TransferAdmin makes another account the admin. Only the admin can call it.

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/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "TransferAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar" -func "TransferAdmin" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
  

URI

func URI(addr address, size int, transparent bool) string

URI returns the image of the Settler of an address as a "data:image/svg+xml;charset=utf-8," URI, that can be used as the source of an image or as the address of a Markdown image, or an empty text if it has none. The size and transparent are the same as in SVG.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g17khqpukees4237dtn3astzapmp462vjhsz6st4/settlers/avatar.URI(,,)"

Result