OwnerAddress
untyped string── Constants ────────────────────────────────────────────────
Value
"g1x7k4628w93a7wzdhqc06atzx0v50rnshweuxu0"
MaxAttestXP
untyped bigint── Constants ────────────────────────────────────────────────
Value
(1000 <untyped> bigint)
pubKeySize
untyped bigint// ed25519 public key length (gno crypto/ed25519 exposes no const)
Value
(32 <untyped> bigint)
sigSize
untyped bigint// ed25519 signature length
Value
(64 <untyped> bigint)
fieldSep
untyped string── Constants ────────────────────────────────────────────────
Value
"|"
signerPubKey
[]uint8── State ────────────────────────────────────────────────────
Value
<zero>
completions
*avl.Tree// addr + ":" + questId -> int64 (block height recorded)
- OID
- 008ff0…6ea3:19
completions details
attestedXP
*avl.Tree// addr -> int (cumulative attested XP)
- OID
- 008ff0…6ea3:21
attestedXP details
usedNonce
*avl.Tree// nonce -> true (replay guard)
- OID
- 008ff0…6ea3:23
usedNonce details
init.9
func()- OID
- 008ff0…6ea3:7
init.9 details
canonicalMsg
func(addr string, questId string, xp int, nonce string) []uint8canonicalMsg is the EXACT byte string the backend signs offline and this realm verifies. It MUST stay byte-identical to the backend signer (ADR Track A / A.3). strconv.Itoa gives a canonical decimal with no leading zeros, so both sides agree for any xp.
- OID
- 008ff0…6ea3:9
canonicalMsg details
completionKey
func(addr string, questId string) string- OID
- 008ff0…6ea3:10
completionKey details
validXP
func(xp int) boolvalidXP bounds the attestable XP (see MaxAttestXP).
- OID
- 008ff0…6ea3:11
validXP details
fieldsClean
func(addr string, questId string, nonce string) boolfieldsClean rejects any voucher field containing the separator. This makes the canonical message PROVABLY unambiguous (no field-injection collision) without trusting the backend's nonce charset: with no field able to contain "|", a given canonical byte string maps to exactly one (addr, questId, xp, nonce).
- OID
- 008ff0…6ea3:12
fieldsClean details
verifyVoucher
func(pub []uint8, addr string, questId string, xp int, nonce string, sigHex string) boolverifyVoucher reports whether sigHex is a valid ed25519 signature by pub over the canonical voucher message. Pure (no state) so it is unit-tested directly with offline-generated test vectors.
- OID
- 008ff0…6ea3:13
verifyVoucher details
SetSigner
func(pubKeyHex string)SetSigner installs/rotates the backend's offline signer PUBLIC key (32-byte hex). Owner-multisig only. This is a crossing function, so PreviousRealm() correctly identifies the immediate caller (see gno interrealm semantics).
- OID
- 008ff0…6ea3:14
SetSigner details
RecordCompletion
func(addr string, questId string, xp int, nonce string, sigHex string)RecordCompletion verifies a backend-signed voucher and records the completion + its XP on-chain. Idempotent per (addr, questId); replay-proof per nonce. Panics (reverting the tx) on any invalid/again-used/out-of-range voucher.
- OID
- 008ff0…6ea3:15
RecordCompletion details
GetAttestedXP
func(addr string) intGetAttestedXP returns addr's cumulative on-chain attested XP (0 if none).
- OID
- 008ff0…6ea3:16
GetAttestedXP details
GetRecordedCompletions
func(addr string) stringGetRecordedCompletions returns addr's attested quest IDs as a comma-separated list (empty string if none), in ascending key order.
- OID
- 008ff0…6ea3:17
GetRecordedCompletions details
Render
func(path string) stringRender is the human/gnoweb view; the authoritative reads are the exported Get\* funcs (queried via vm/qeval).
- OID
- 008ff0…6ea3:18