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

hub package

Overview

Package hub exposes safe, read-only views over boards2's persistent state. The Get* functions are crossing functions: callers must invoke them with `cross` (e.g. `hub.GetBoard(cross, id)`). The crossing into hub gives each call a live `cur` whose `Previous()` is the caller's realm — that's what boards2's protected entry points use for the namespace check.

Note for future maintainers: inside a Get* body, `cur.Previous()` is the *immediate* caller's realm, which may be an intermediary, not necessarily the end user. Do not graft user-identity gating onto these reads.

Function

GetThreads

func GetThreads(cur realm, boardID uint64, start, count int) []Thread

GetThreads returns a list with threads of a board. To reverse iterate use a negative count.

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