Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

memba_quest_attestation_v1 state

Back to all declarations

owner

.uverse.address

Value

<gnolang.StringValue>

pendingOwner

.uverse.address

Value

<gnolang.StringValue>

TransferOwnership

func(newOwner .uverse.address)

TransferOwnership stages a handoff. Owner only; it takes effect only once newOwner calls AcceptOwnership. Calling it again before acceptance replaces the staged address, which is how a mistyped proposal is corrected.

Open
OID
00062d…b91a:5
TransferOwnership details

Inspect func

AcceptOwnership

func()

AcceptOwnership completes the handoff. Only the staged pendingOwner may call it — including against the outgoing owner, so the two steps cannot be collapsed into one by the party giving up the role.

Open
OID
00062d…b91a:7
AcceptOwnership details

Inspect func

CancelOwnershipTransfer

func()

CancelOwnershipTransfer clears a staged handoff. Owner only, so a proposal can be aborted without the proposed address cooperating.

Open
OID
00062d…b91a:8
CancelOwnershipTransfer details

Inspect func

GetOwner

func() string

GetOwner returns the address that currently holds ownership.

Open
OID
00062d…b91a:9
GetOwner details

Inspect func

GetPendingOwner

func() string

GetPendingOwner returns the staged successor ("" when none).

Open
OID
00062d…b91a:10
GetPendingOwner details

Inspect func

assertOwner

func()

assertOwner is the gate for this file's entrypoints. It rejects a stale/sibling \`cur\` first, then takes the caller from cur.Previous().

Open
OID
00062d…b91a:11
assertOwner details

Inspect func

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)

Open
OID
00062d…b91a:31
completions details

Inspect pointer

attestedXP

*avl.Tree

// addr -> int (cumulative attested XP)

Open
OID
00062d…b91a:33
attestedXP details

Inspect pointer

usedNonce

*avl.Tree

// nonce -> true (replay guard)

Open
OID
00062d…b91a:35
usedNonce details

Inspect pointer

canonicalMsg

func(addr string, questId string, xp int, nonce string) []uint8

canonicalMsg 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.

Open
OID
00062d…b91a:18
canonicalMsg details

Inspect func

completionKey

func(addr string, questId string) string
Open
OID
00062d…b91a:19
completionKey details

Inspect func

validXP

func(xp int) bool

validXP bounds the attestable XP (see MaxAttestXP).

Open
OID
00062d…b91a:20
validXP details

Inspect func

fieldsClean

func(addr string, questId string, nonce string) bool

fieldsClean 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).

Open
OID
00062d…b91a:21
fieldsClean details

Inspect func

verifyVoucher

func(pub []uint8, addr string, questId string, xp int, nonce string, sigHex string) bool

verifyVoucher 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.

Open
OID
00062d…b91a:22
verifyVoucher details

Inspect func

SetSigner

func(pubKeyHex string)

SetSigner installs/rotates the backend's offline signer PUBLIC key (32-byte hex). The current owner is authenticated using its live crossing frame.

Open
OID
00062d…b91a:23
SetSigner details

Inspect func

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.

Open
OID
00062d…b91a:24
RecordCompletion details

Inspect func

GetSigner

func() string

GetSigner returns a copied canonical public-key string, or empty before setup.

Open
OID
00062d…b91a:25
GetSigner details

Inspect func

GetAttestedXP

func(addr string) int

GetAttestedXP returns addr's cumulative on-chain attested XP (0 if none).

Open
OID
00062d…b91a:26
GetAttestedXP details

Inspect func

GetRecordedCompletions

func(addr string) string

GetRecordedCompletions returns addr's attested quest IDs as a comma-separated list (empty string if none), in ascending key order.

Open
OID
00062d…b91a:27
GetRecordedCompletions details

Inspect func

Render

func(path string) string

Render is the human/gnoweb view; the authoritative reads are the exported Get\* funcs (queried via vm/qeval).

Open
OID
00062d…b91a:28
Render details

Inspect func

publisherAtLoad

func() .uverse.address
Open
OID
00062d…b91a:29
publisherAtLoad details

Inspect func
owner : .uverse.address =<gnolang.StringValue>
pendingOwner : .uverse.address =<gnolang.StringValue>
TransferOwnership : func(newOwner .uverse.address) Inspect
AcceptOwnership : func() Inspect
CancelOwnershipTransfer : func() Inspect
GetOwner : func() string Inspect
GetPendingOwner : func() string Inspect
assertOwner : func() Inspect
MaxAttestXP : untyped bigint =(1000 <untyped> bigint)
pubKeySize : untyped bigint =(32 <untyped> bigint)
sigSize : untyped bigint =(64 <untyped> bigint)
fieldSep : untyped string ="|"
signerPubKey : []uint8 =<zero>
completions : *avl.Tree Inspect
attestedXP : *avl.Tree Inspect
usedNonce : *avl.Tree Inspect
init.16 : func() Inspect
canonicalMsg : func(addr string, questId string, xp int, nonce string) []uint8 Inspect
completionKey : func(addr string, questId string) string Inspect
validXP : func(xp int) bool Inspect
fieldsClean : func(addr string, questId string, nonce string) bool Inspect
verifyVoucher : func(pub []uint8, addr string, questId string, xp int, nonce string, sigHex string) bool Inspect
SetSigner : func(pubKeyHex string) Inspect
RecordCompletion : func(addr string, questId string, xp int, nonce string, sigHex string) Inspect
GetSigner : func() string Inspect
GetAttestedXP : func(addr string) int Inspect
GetRecordedCompletions : func(addr string) string Inspect
Render : func(path string) string Inspect
publisherAtLoad : func() .uverse.address Inspect