SetRegistrationFee
func(fee int64)SetRegistrationFee sets the flat listing fee in ugnot (0..MaxRegistrationFee). Zero is allowed (a fee waiver). Owner only.
- OID
- 0a8db1…58c3:3
SetRegistrationFee details
SetTreasury
func(addr .uverse.address)SetTreasury repoints the fee recipient. Must be non-empty (an empty treasury would fail-close RegisterApp). Owner only. Keep this in sync with memba\_market\_config.GetTreasury().
- OID
- 0a8db1…58c3:5
SetTreasury details
AddCurator
func(addr .uverse.address)AddCurator grants the curate role (approve pending listings). Owner only.
- OID
- 0a8db1…58c3:6
AddCurator details
RemoveCurator
func(addr .uverse.address)RemoveCurator revokes the curate role. Owner only.
- OID
- 0a8db1…58c3:7
RemoveCurator details
Pause
func(state bool)Pause is the kill switch: while paused, RegisterApp aborts (reads stay available). Owner only.
- OID
- 0a8db1…58c3:8
Pause details
TransferOwnership
func(newOwner .uverse.address)TransferOwnership stages a new owner; it takes effect only after AcceptOwnership is called BY that address (2-step, so a typo can't brick admin). A later call replaces the staged address; CancelOwnershipTransfer withdraws it.
- OID
- 0a8db1…58c3:9
TransferOwnership details
CancelOwnershipTransfer
func()CancelOwnershipTransfer withdraws a staged handoff. Owner only.
- OID
- 0a8db1…58c3:10
CancelOwnershipTransfer details
GetPendingOwner
func() .uverse.address- OID
- 0a8db1…58c3:11
GetPendingOwner details
AcceptOwnership
func()AcceptOwnership completes the handoff. Only the staged pendingOwner may call it. The former owner's curator grant is revoked atomically; the successor can curate immediately and may explicitly re-appoint the former owner later.
- OID
- 0a8db1…58c3:12
AcceptOwnership details
boolStr
func(b bool) string- OID
- 0a8db1…58c3:13
boolStr details
DefaultRegistrationFee
int64Value
1000000
MaxRegistrationFee
int64Value
100000000
MaxNameLen
untyped bigintValue
(80 <untyped> bigint)
MaxTaglineLen
untyped bigintValue
(140 <untyped> bigint)
MaxDescrLen
untyped bigintValue
(2000 <untyped> bigint)
MaxCategoryLen
untyped bigintValue
(40 <untyped> bigint)
MaxURLLen
untyped bigintValue
(400 <untyped> bigint)
MaxPkgPathLen
untyped bigintValue
(200 <untyped> bigint)
MaxCIDLen
untyped bigintValue
(100 <untyped> bigint)
MaxReasonLen
untyped bigintValue
(500 <untyped> bigint)
MaxScreenshots
untyped bigintValue
(6 <untyped> bigint)
MaxResubmits
untyped bigintValue
(5 <untyped> bigint)
FlagHideThreshold
untyped bigintValue
(5 <untyped> bigint)
StatusPending
untyped stringListing lifecycle states.
Value
"pending"
StatusLive
untyped stringListing lifecycle states.
Value
"live"
StatusRejected
untyped stringListing lifecycle states.
Value
"rejected"
StatusDelisted
untyped stringListing lifecycle states.
Value
"delisted"
Listing
typeListing is one app. PkgPath (the realm/package path) is the unique key.
Value
memba_appstore_v3.Listing
owner
.uverse.addressValue
<gnolang.StringValue>
pendingOwner
.uverse.addressValue
<gnolang.StringValue>
treasury
.uverse.addressValue
<gnolang.StringValue>
registrationFee
int64Value
1000000
paused
boolValue
false
seedingSealed
boolValue
true
curators
*avl.Tree// address string -> bool
- OID
- 0a8db1…58c3:21
curators details
listings
*avl.Tree// pkgPath -> \*Listing
- OID
- 0a8db1…58c3:24
listings details
flaggedBy
*avl.Tree// pkgPath + "\\x00" + addr -> bool (one flag per addr)
- OID
- 0a8db1…58c3:27
flaggedBy details
statusIndex
*avl.Tree- OID
- 0a8db1…58c3:30
statusIndex details
publisherIndex
*avl.Tree- OID
- 0a8db1…58c3:33
publisherIndex details
liveCount
intValue
6
pendingCount
intValue
0
rejectedCount
intValue
0
delistedCount
intValue
0
nextId
uint64Value
7
init.44
func()- OID
- 0a8db1…58c3:40
init.44 details
seedAuthority
func(publisher .uverse.address)seedAuthority makes the publisher the owner, the fee recipient and the first curator. It runs once at package load; there is no other way to obtain owner.
- OID
- 0a8db1…58c3:42
seedAuthority details
caller
func() .uverse.address- OID
- 0a8db1…58c3:43
caller details
assertOwner
func()- OID
- 0a8db1…58c3:44
assertOwner details
assertNotPaused
func()- OID
- 0a8db1…58c3:45
assertNotPaused details
RegisterApp
func(pkgPath string, name string, tagline string, descr string, category string, iconCID string, screenshotsCSV string, appURL string) uint64RegisterApp lists a new app. The caller pays EXACTLY registrationFee ugnot with the call; the whole fee is forwarded to the treasury (no custody). The listing starts \`pending\`.
- OID
- 0a8db1…58c3:46
RegisterApp details
ApproveApp
func(pkgPath string)ApproveApp flips a pending (or previously-live) listing live. Curator-only.
- OID
- 0a8db1…58c3:47
ApproveApp details
RejectApp
func(pkgPath string, reason string)RejectApp declines a pending submission, recording a reason and granting a one-time free resubmit credit. Curator-only; only a pending app can be rejected.
- OID
- 0a8db1…58c3:48
RejectApp details
EditListing
func(pkgPath string, name string, tagline string, descr string, category string, iconCID string, screenshotsCSV string, appURL string)EditListing lets the publisher update a listing that is NOT live/delisted — i.e. a pending or rejected one — and resets it to \`pending\` for (re-)review. Editing a live listing is structurally forbidden so a Verified badge can never be bait-and-switched. Bounded by MaxResubmits so a reject→edit loop can't grief the queue.
- OID
- 0a8db1…58c3:49
EditListing details
DelistApp
func(pkgPath string)DelistApp removes a listing from public view. The publisher or a curator may do it.
- OID
- 0a8db1…58c3:50
DelistApp details
RestoreApp
func(pkgPath string)RestoreApp brings a delisted app back to \`pending\` (re-curation required). Curator-only.
- OID
- 0a8db1…58c3:51
RestoreApp details
FlagApp
func(pkgPath string)FlagApp lets any user flag a publicly-listed (live OR pending) listing once. At FlagHideThreshold distinct flags the listing drops from the public lists (isVisible), giving the public Unverified/pending tab a community safety valve; a curator can then Delist/Reject.
- OID
- 0a8db1…58c3:52
FlagApp details
MaxClearBatch
untyped bigintMaxClearBatch bounds how many per-address flag marks one ClearFlags call removes, so a mega-brigade (thousands of sybil flags) cannot gas-lock the reset — the curator just calls ClearFlags repeatedly until the count reaches zero.
Value
(200 <untyped> bigint)
ClearFlags
func(pkgPath string)ClearFlags resets a listing's community-flag state after curator review. Curator-only. Without it a flag-hidden listing stays hidden FOREVER: FlagCount never decrements and survives every status transition, so FlagHideThreshold (5) sybil addresses could permanently disappear any live app. Clearing also deletes the per-address dedupe marks — the community can re-flag if the concern is real, and every clear is an emitted event, so a curator whitewashing a bad listing is publicly visible on-chain.
- OID
- 0a8db1…58c3:53
ClearFlags details
SeedListing
func(id uint64, pkgPath string, name string, tagline string, descr string, category string, iconCID string, screenshotsCSV string, appURL string, publisherStr string, status string, flagCount int, createdAt int64)SeedListing imports a listing verbatim (Id, CreatedAt, FlagCount, Status, Publisher) during a v2→v3 migration. Owner-only, NON-payable (never reads OriginSend / moves funds), dedupe-guarded. After the migration the owner calls FinalizeSeed, permanently sealing this entrypoint — without that latch it would be a standing backdoor to forge fee-free listings with arbitrary publisher.
- OID
- 0a8db1…58c3:54
SeedListing details
FinalizeSeed
func()FinalizeSeed permanently seals SeedListing (one-way latch). Owner-only.
- OID
- 0a8db1…58c3:55
FinalizeSeed details
GetRegistrationFee
func() int64GetRegistrationFee returns the current flat listing fee in ugnot.
- OID
- 0a8db1…58c3:56
GetRegistrationFee details
GetTreasury
func() .uverse.address- OID
- 0a8db1…58c3:57
GetTreasury details
GetOwner
func() .uverse.address- OID
- 0a8db1…58c3:58
GetOwner details
AppCount
func() intAppCount returns the total number of registered listings (any status).
- OID
- 0a8db1…58c3:59
AppCount details
IsCurator
func(a string) boolIsCurator reports whether an address may approve/reject listings (the curator-dashboard gate).
- OID
- 0a8db1…58c3:60
IsCurator details
GetCuratorsJSON
func() stringGetCuratorsJSON returns a JSON array of curator addresses (small, bounded).
- OID
- 0a8db1…58c3:61
GetCuratorsJSON details
GetStatsJSON
func() stringGetStatsJSON returns per-status counts (served from O(1) counters) for the store header.
- OID
- 0a8db1…58c3:62
GetStatsJSON details
isCurator
func(a .uverse.address) bool- OID
- 0a8db1…58c3:63
isCurator details
mustGet
func(pkgPath string) *memba_appstore_v3.Listing- OID
- 0a8db1…58c3:64
mustGet details
validStatus
func(s string) bool- OID
- 0a8db1…58c3:65
validStatus details
validateListingFields
func(name string, tagline string, descr string, category string, iconCID string, appURL string)validateListingFields checks the length + appURL-scheme invariants shared by RegisterApp and EditListing. The appURL scheme allowlist (http/https/leading-slash/empty) is the on-chain defense behind the frontend AppLink — it blocks javascript:/data:/other-scheme phishing URLs.
- OID
- 0a8db1…58c3:66
validateListingFields details
validateAppURL
func(u string)validateAppURL enforces the scheme allowlist: empty, http://, https://, or a leading-slash in-app path. Anything else (javascript:, data:, ftp:, mailto:, …) aborts. A leading-slash path must NOT be protocol-relative (\`//host\` or \`/\\host\`) — browsers navigate those off-site, which would defeat the allowlist.
- OID
- 0a8db1…58c3:67
validateAppURL details
parseScreenshots
func(csv string) []stringparseScreenshots splits a comma-separated CID list, enforcing ≤MaxScreenshots and per-CID length. Blank entries are dropped. Empty input → nil.
- OID
- 0a8db1…58c3:68
parseScreenshots details
statusKey
func(status string, id uint64) string- OID
- 0a8db1…58c3:69
statusKey details
pubKey
func(pub .uverse.address, id uint64) string- OID
- 0a8db1…58c3:70
pubKey details
idInUse
func(id uint64) boolidInUse reports whether \`id\` is already present in the status index under ANY status (every listing — registered or seeded — is in exactly one statusIndex entry). Used to reject a duplicate SeedListing id before it silently collides on the composite key.
- OID
- 0a8db1…58c3:71
idInUse details
zeroPad
func(id uint64) stringzeroPad renders id as a fixed-width 20-digit string so lexical avl order == numeric order.
- OID
- 0a8db1…58c3:72
zeroPad details
adjustCounter
func(status string, d int)- OID
- 0a8db1…58c3:73
adjustCounter details
indexInsert
func(l *memba_appstore_v3.Listing)indexInsert adds a brand-new listing to the status + publisher indexes and bumps its status counter. (publisherIndex never changes afterward — Publisher + Id are immutable.)
- OID
- 0a8db1…58c3:74
indexInsert details
changeStatus
func(l *memba_appstore_v3.Listing, newStatus string)changeStatus moves a listing between statuses, keeping statusIndex + counters exact, and persists the listing. Every status transition MUST go through here.
- OID
- 0a8db1…58c3:75
changeStatus details
validatePkgPath
func(p string) stringvalidatePkgPath normalizes + sanity-checks a realm/package path.
- OID
- 0a8db1…58c3:76
validatePkgPath details
hasPrefix
func(s string, pre string) bool- OID
- 0a8db1…58c3:77
hasPrefix details
itoa
func(n int) string- OID
- 0a8db1…58c3:78
itoa details
itoa64
func(n uint64) string- OID
- 0a8db1…58c3:79
itoa64 details
IsPaused
func() bool- OID
- 0a8db1…58c3:80
IsPaused details
IsSeedingSealed
func() bool- OID
- 0a8db1…58c3:82
IsSeedingSealed details
GovernanceListing
typeScalars only: no persistent Listing pointer or screenshot slice escapes.
Value
memba_appstore_v3.GovernanceListing
GetGovernanceListing
func(pkgPath string, clearBatch bool) memba_appstore_v3.GovernanceListing- OID
- 0a8db1…58c3:83
GetGovernanceListing details
HasGovernanceFlag
func(pkgPath string, who string) bool- OID
- 0a8db1…58c3:84
HasGovernanceFlag details
DefaultPageSize
untyped bigint// default JSON window
Value
(20 <untyped> bigint)
MaxPageLimit
untyped bigint// hard cap on any JSON read window (read-DoS guard)
Value
(100 <untyped> bigint)
clampLimit
func(limit int) int- OID
- 0a8db1…58c3:85
clampLimit details
jsonEscape
func(s string) stringjsonEscape escapes a string for embedding in a JSON string literal — every listing text field is attacker-supplied, so this is the only thing between a malicious name/tagline/reason/CID and a broken/injected JSON payload on the read path.
- OID
- 0a8db1…58c3:87
jsonEscape details
screenshotsJSON
func(cids []string) stringscreenshotsJSON renders a CID slice as a JSON string array body (each element escaped).
- OID
- 0a8db1…58c3:88
screenshotsJSON details
listingJSON
func(l *memba_appstore_v3.Listing, full bool) stringlistingJSON renders one listing. \`full\` adds the (large) description + the screenshot gallery — omitted from list windows so a bounded page stays small. rejectReason is short and always included (the My-Submissions view needs it in list windows).
- OID
- 0a8db1…58c3:89
listingJSON details
windowByPrefix
func(index *avl.Tree, prefix string, offset int, limit int, flagFilter bool) stringwindowByPrefix iterates a composite-key index (statusIndex or publisherIndex) over the prefix range \[prefix+"\\x00", prefix+"\\x01") — a true O(offset+limit) window ordered by zero-padded id. When flagFilter is set, flag-hidden listings are excluded (the public live/pending lists).
- OID
- 0a8db1…58c3:90
windowByPrefix details
ListLiveJSON
func(offset int, limit int) stringListLiveJSON returns a bounded JSON array of the visible (live, un-flag-hidden) listings — the Verified tab. Bounded by scanning only the "live" index slice.
- OID
- 0a8db1…58c3:91
ListLiveJSON details
ListByStatusJSON
func(status string, offset int, limit int) stringListByStatusJSON returns a bounded window of listings in \`status\`. Public tabs (live, pending) exclude flag-hidden listings; rejected/delisted are returned raw (used by curator/owner views). An unknown status returns an empty array — the client passes a fixed enum, never free text.
- OID
- 0a8db1…58c3:92
ListByStatusJSON details
ListByPublisherJSON
func(publisher string, offset int, limit int) stringListByPublisherJSON returns a bounded window of a publisher's listings across ALL statuses (the My-Submissions view) — no flag filter, since a publisher sees their own flagged/rejected.
- OID
- 0a8db1…58c3:93
ListByPublisherJSON details
GetListingJSON
func(pkgPath string) stringGetListingJSON returns a single listing (any status) with its full detail (descr + screenshots), or the JSON literal \`null\` if the package path is not registered.
- OID
- 0a8db1…58c3:94
GetListingJSON details
RenderMaxRows
untyped bigintRenderMaxRows bounds the Render() output so a large catalog can never make the realm render-DoS (mirrors the feed's live-only bounded render).
Value
(100 <untyped> bigint)
Render
func(path string) stringRender shows the live catalog (bounded) — a read-only trust surface for gnoweb. The frontend reads structured data via the getters, not this markdown.
- OID
- 0a8db1…58c3:95
Render details
moreNote
func(live int) string- OID
- 0a8db1…58c3:97
moreNote details
esc
func(s string) stringesc neutralizes the markdown/table metachars that could break the table or inject layout from an attacker-supplied listing field.
- OID
- 0a8db1…58c3:98