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

/memba_quest_attestation_v1 package

Overview

Package memba_quest_attestation_v1 is the on-chain quest/XP attestation realm for Memba (audit Q-05, Track A — "Model B" offline-signed voucher).

WHY: Memba quest XP lives in a centralized backend DB; the chain holds no verifiable record. This realm makes a quest completion + its XP an independently verifiable on-chain fact, WITHOUT giving the backend a hot key that can write arbitrary state.

HOW (Model B — offline voucher):

  • The backend holds an OFFLINE ed25519 signing key; it NEVER broadcasts.
  • For a server-verified completion it issues a voucher (address, questId, xp, nonce) + ed25519 signature over the canonical message addr "|" questId "|" itoa(xp) "|" nonce (UTF-8 bytes)
  • The USER broadcasts RecordCompletion(...) with the voucher (they pay gas).
  • This realm verifies the signature against the configured signer pubkey, rejects reused nonces (replay), bounds xp, and records the completion + cumulative attested XP.

TRUST MODEL: the signature is the authority, NOT the caller — anyone may broadcast a valid voucher (it can only record the backend-attested fact). The only privileged action is rotating the signer pubkey (owner multisig).

The canonical message format is a CONTRACT with the backend signer — it MUST stay byte-identical on both sides. See canonicalMsg.

Function

GetRecordedCompletions

func GetRecordedCompletions(addr string) string

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

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/samcrew/memba_quest_attestation_v1.GetRecordedCompletions()"

Result