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_appstore_v3 state

Back to all declarations

SetRegistrationFee

func(fee int64)

SetRegistrationFee sets the flat listing fee in ugnot (0..MaxRegistrationFee). Zero is allowed (a fee waiver). Owner only.

Open
OID
0a8db1…58c3:3
SetRegistrationFee details

Inspect func

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

Open
OID
0a8db1…58c3:5
SetTreasury details

Inspect func

AddCurator

func(addr .uverse.address)

AddCurator grants the curate role (approve pending listings). Owner only.

Open
OID
0a8db1…58c3:6
AddCurator details

Inspect func

RemoveCurator

func(addr .uverse.address)

RemoveCurator revokes the curate role. Owner only.

Open
OID
0a8db1…58c3:7
RemoveCurator details

Inspect func

Pause

func(state bool)

Pause is the kill switch: while paused, RegisterApp aborts (reads stay available). Owner only.

Open
OID
0a8db1…58c3:8
Pause details

Inspect func

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.

Open
OID
0a8db1…58c3:9
TransferOwnership details

Inspect func

CancelOwnershipTransfer

func()

CancelOwnershipTransfer withdraws a staged handoff. Owner only.

Open
OID
0a8db1…58c3:10
CancelOwnershipTransfer details

Inspect func

GetPendingOwner

func() .uverse.address
Open
OID
0a8db1…58c3:11
GetPendingOwner details

Inspect func

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.

Open
OID
0a8db1…58c3:12
AcceptOwnership details

Inspect func

DefaultRegistrationFee

int64

Value

1000000

MaxRegistrationFee

int64

Value

100000000

MaxNameLen

untyped bigint

Value

(80 <untyped> bigint)

MaxTaglineLen

untyped bigint

Value

(140 <untyped> bigint)

MaxDescrLen

untyped bigint

Value

(2000 <untyped> bigint)

MaxCategoryLen

untyped bigint

Value

(40 <untyped> bigint)

MaxURLLen

untyped bigint

Value

(400 <untyped> bigint)

MaxPkgPathLen

untyped bigint

Value

(200 <untyped> bigint)

MaxCIDLen

untyped bigint

Value

(100 <untyped> bigint)

MaxReasonLen

untyped bigint

Value

(500 <untyped> bigint)

MaxScreenshots

untyped bigint

Value

(6 <untyped> bigint)

MaxResubmits

untyped bigint

Value

(5 <untyped> bigint)

FlagHideThreshold

untyped bigint

Value

(5 <untyped> bigint)

StatusPending

untyped string

Listing lifecycle states.

Value

"pending"

StatusLive

untyped string

Listing lifecycle states.

Value

"live"

StatusRejected

untyped string

Listing lifecycle states.

Value

"rejected"

StatusDelisted

untyped string

Listing lifecycle states.

Value

"delisted"

Listing

type

Listing is one app. PkgPath (the realm/package path) is the unique key.

Value

memba_appstore_v3.Listing

owner

.uverse.address

Value

<gnolang.StringValue>

pendingOwner

.uverse.address

Value

<gnolang.StringValue>

treasury

.uverse.address

Value

<gnolang.StringValue>

registrationFee

int64

Value

1000000

paused

bool

Value

false

seedingSealed

bool

Value

true

curators

*avl.Tree

// address string -> bool

Open
OID
0a8db1…58c3:21
curators details

Inspect pointer

flaggedBy

*avl.Tree

// pkgPath + "\\x00" + addr -> bool (one flag per addr)

Open
OID
0a8db1…58c3:27
flaggedBy details

Inspect pointer

liveCount

int

Value

6

pendingCount

int

Value

0

rejectedCount

int

Value

0

delistedCount

int

Value

0

nextId

uint64

Value

7

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.

Open
OID
0a8db1…58c3:42
seedAuthority details

Inspect func

RegisterApp

func(pkgPath string, name string, tagline string, descr string, category string, iconCID string, screenshotsCSV string, appURL string) uint64

RegisterApp 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\`.

Open
OID
0a8db1…58c3:46
RegisterApp details

Inspect func

ApproveApp

func(pkgPath string)

ApproveApp flips a pending (or previously-live) listing live. Curator-only.

Open
OID
0a8db1…58c3:47
ApproveApp details

Inspect func

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.

Open
OID
0a8db1…58c3:48
RejectApp details

Inspect func

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.

Open
OID
0a8db1…58c3:49
EditListing details

Inspect func

DelistApp

func(pkgPath string)

DelistApp removes a listing from public view. The publisher or a curator may do it.

Open
OID
0a8db1…58c3:50
DelistApp details

Inspect func

RestoreApp

func(pkgPath string)

RestoreApp brings a delisted app back to \`pending\` (re-curation required). Curator-only.

Open
OID
0a8db1…58c3:51
RestoreApp details

Inspect func

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.

Open
OID
0a8db1…58c3:52
FlagApp details

Inspect func

MaxClearBatch

untyped bigint

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

Open
OID
0a8db1…58c3:53
ClearFlags details

Inspect func

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.

Open
OID
0a8db1…58c3:54
SeedListing details

Inspect func

FinalizeSeed

func()

FinalizeSeed permanently seals SeedListing (one-way latch). Owner-only.

Open
OID
0a8db1…58c3:55
FinalizeSeed details

Inspect func

GetRegistrationFee

func() int64

GetRegistrationFee returns the current flat listing fee in ugnot.

Open
OID
0a8db1…58c3:56
GetRegistrationFee details

Inspect func

GetTreasury

func() .uverse.address
Open
OID
0a8db1…58c3:57
GetTreasury details

Inspect func

AppCount

func() int

AppCount returns the total number of registered listings (any status).

Open
OID
0a8db1…58c3:59
AppCount details

Inspect func

IsCurator

func(a string) bool

IsCurator reports whether an address may approve/reject listings (the curator-dashboard gate).

Open
OID
0a8db1…58c3:60
IsCurator details

Inspect func

GetCuratorsJSON

func() string

GetCuratorsJSON returns a JSON array of curator addresses (small, bounded).

Open
OID
0a8db1…58c3:61
GetCuratorsJSON details

Inspect func

GetStatsJSON

func() string

GetStatsJSON returns per-status counts (served from O(1) counters) for the store header.

Open
OID
0a8db1…58c3:62
GetStatsJSON details

Inspect func

isCurator

func(a .uverse.address) bool
Open
OID
0a8db1…58c3:63
isCurator details

Inspect func

mustGet

func(pkgPath string) *memba_appstore_v3.Listing
Open
OID
0a8db1…58c3:64
mustGet details

Inspect func

validStatus

func(s string) bool
Open
OID
0a8db1…58c3:65
validStatus details

Inspect func

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.

Open
OID
0a8db1…58c3:66
validateListingFields details

Inspect func

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.

Open
OID
0a8db1…58c3:67
validateAppURL details

Inspect func

parseScreenshots

func(csv string) []string

parseScreenshots splits a comma-separated CID list, enforcing ≤MaxScreenshots and per-CID length. Blank entries are dropped. Empty input → nil.

Open
OID
0a8db1…58c3:68
parseScreenshots details

Inspect func

statusKey

func(status string, id uint64) string
Open
OID
0a8db1…58c3:69
statusKey details

Inspect func

pubKey

func(pub .uverse.address, id uint64) string
Open
OID
0a8db1…58c3:70
pubKey details

Inspect func

idInUse

func(id uint64) bool

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

Open
OID
0a8db1…58c3:71
idInUse details

Inspect func

zeroPad

func(id uint64) string

zeroPad renders id as a fixed-width 20-digit string so lexical avl order == numeric order.

Open
OID
0a8db1…58c3:72
zeroPad details

Inspect func

adjustCounter

func(status string, d int)
Open
OID
0a8db1…58c3:73
adjustCounter details

Inspect func

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

Open
OID
0a8db1…58c3:74
indexInsert details

Inspect func

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.

Open
OID
0a8db1…58c3:75
changeStatus details

Inspect func

validatePkgPath

func(p string) string

validatePkgPath normalizes + sanity-checks a realm/package path.

Open
OID
0a8db1…58c3:76
validatePkgPath details

Inspect func

hasPrefix

func(s string, pre string) bool
Open
OID
0a8db1…58c3:77
hasPrefix details

Inspect func

IsSeedingSealed

func() bool
Open
OID
0a8db1…58c3:82
IsSeedingSealed details

Inspect func

GovernanceListing

type

Scalars only: no persistent Listing pointer or screenshot slice escapes.

Value

memba_appstore_v3.GovernanceListing

GetGovernanceListing

func(pkgPath string, clearBatch bool) memba_appstore_v3.GovernanceListing
Open
OID
0a8db1…58c3:83
GetGovernanceListing details

Inspect func

HasGovernanceFlag

func(pkgPath string, who string) bool
Open
OID
0a8db1…58c3:84
HasGovernanceFlag details

Inspect func

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
Open
OID
0a8db1…58c3:85
clampLimit details

Inspect func

jsonEscape

func(s string) string

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

Open
OID
0a8db1…58c3:87
jsonEscape details

Inspect func

screenshotsJSON

func(cids []string) string

screenshotsJSON renders a CID slice as a JSON string array body (each element escaped).

Open
OID
0a8db1…58c3:88
screenshotsJSON details

Inspect func

listingJSON

func(l *memba_appstore_v3.Listing, full bool) string

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

Open
OID
0a8db1…58c3:89
listingJSON details

Inspect func

windowByPrefix

func(index *avl.Tree, prefix string, offset int, limit int, flagFilter bool) string

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

Open
OID
0a8db1…58c3:90
windowByPrefix details

Inspect func

ListLiveJSON

func(offset int, limit int) string

ListLiveJSON returns a bounded JSON array of the visible (live, un-flag-hidden) listings — the Verified tab. Bounded by scanning only the "live" index slice.

Open
OID
0a8db1…58c3:91
ListLiveJSON details

Inspect func

ListByStatusJSON

func(status string, offset int, limit int) string

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

Open
OID
0a8db1…58c3:92
ListByStatusJSON details

Inspect func

ListByPublisherJSON

func(publisher string, offset int, limit int) string

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

Open
OID
0a8db1…58c3:93
ListByPublisherJSON details

Inspect func

GetListingJSON

func(pkgPath string) string

GetListingJSON returns a single listing (any status) with its full detail (descr + screenshots), or the JSON literal \`null\` if the package path is not registered.

Open
OID
0a8db1…58c3:94
GetListingJSON details

Inspect func

RenderMaxRows

untyped bigint

RenderMaxRows 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) string

Render shows the live catalog (bounded) — a read-only trust surface for gnoweb. The frontend reads structured data via the getters, not this markdown.

Open
OID
0a8db1…58c3:95
Render details

Inspect func

esc

func(s string) string

esc neutralizes the markdown/table metachars that could break the table or inject layout from an attacker-supplied listing field.

Open
OID
0a8db1…58c3:98
esc details

Inspect func
SetRegistrationFee : func(fee int64) Inspect
SetTreasury : func(addr .uverse.address) Inspect
AddCurator : func(addr .uverse.address) Inspect
RemoveCurator : func(addr .uverse.address) Inspect
Pause : func(state bool) Inspect
TransferOwnership : func(newOwner .uverse.address) Inspect
CancelOwnershipTransfer : func() Inspect
GetPendingOwner : func() .uverse.address Inspect
AcceptOwnership : func() Inspect
boolStr : func(b bool) string Inspect
DefaultRegistrationFee : int64 =1000000
MaxRegistrationFee : int64 =100000000
MaxNameLen : untyped bigint =(80 <untyped> bigint)
MaxTaglineLen : untyped bigint =(140 <untyped> bigint)
MaxDescrLen : untyped bigint =(2000 <untyped> bigint)
MaxCategoryLen : untyped bigint =(40 <untyped> bigint)
MaxURLLen : untyped bigint =(400 <untyped> bigint)
MaxPkgPathLen : untyped bigint =(200 <untyped> bigint)
MaxCIDLen : untyped bigint =(100 <untyped> bigint)
MaxReasonLen : untyped bigint =(500 <untyped> bigint)
MaxScreenshots : untyped bigint =(6 <untyped> bigint)
MaxResubmits : untyped bigint =(5 <untyped> bigint)
FlagHideThreshold : untyped bigint =(5 <untyped> bigint)
StatusPending : untyped string ="pending"
StatusLive : untyped string ="live"
StatusRejected : untyped string ="rejected"
StatusDelisted : untyped string ="delisted"
Listing : type =memba_appstore_v3.Listing
owner : .uverse.address =<gnolang.StringValue>
pendingOwner : .uverse.address =<gnolang.StringValue>
treasury : .uverse.address =<gnolang.StringValue>
registrationFee : int64 =1000000
paused : bool =false
seedingSealed : bool =true
curators : *avl.Tree Inspect
listings : *avl.Tree Inspect
flaggedBy : *avl.Tree Inspect
statusIndex : *avl.Tree Inspect
publisherIndex : *avl.Tree Inspect
liveCount : int =6
pendingCount : int =0
rejectedCount : int =0
delistedCount : int =0
nextId : uint64 =7
init.44 : func() Inspect
seedAuthority : func(publisher .uverse.address) Inspect
caller : func() .uverse.address Inspect
assertOwner : func() Inspect
assertNotPaused : func() Inspect
RegisterApp : func(pkgPath string, name string, tagline string, descr string, category string, iconCID string, screenshotsCSV string, appURL string) uint64 Inspect
ApproveApp : func(pkgPath string) Inspect
RejectApp : func(pkgPath string, reason string) Inspect
EditListing : func(pkgPath string, name string, tagline string, descr string, category string, iconCID string, screenshotsCSV string, appURL string) Inspect
DelistApp : func(pkgPath string) Inspect
RestoreApp : func(pkgPath string) Inspect
FlagApp : func(pkgPath string) Inspect
MaxClearBatch : untyped bigint =(200 <untyped> bigint)
ClearFlags : func(pkgPath string) Inspect
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) Inspect
FinalizeSeed : func() Inspect
GetRegistrationFee : func() int64 Inspect
GetTreasury : func() .uverse.address Inspect
GetOwner : func() .uverse.address Inspect
AppCount : func() int Inspect
IsCurator : func(a string) bool Inspect
GetCuratorsJSON : func() string Inspect
GetStatsJSON : func() string Inspect
isCurator : func(a .uverse.address) bool Inspect
mustGet : func(pkgPath string) *memba_appstore_v3.Listing Inspect
validStatus : func(s string) bool Inspect
validateListingFields : func(name string, tagline string, descr string, category string, iconCID string, appURL string) Inspect
validateAppURL : func(u string) Inspect
parseScreenshots : func(csv string) []string Inspect
statusKey : func(status string, id uint64) string Inspect
pubKey : func(pub .uverse.address, id uint64) string Inspect
idInUse : func(id uint64) bool Inspect
zeroPad : func(id uint64) string Inspect
adjustCounter : func(status string, d int) Inspect
indexInsert : func(l *memba_appstore_v3.Listing) Inspect
changeStatus : func(l *memba_appstore_v3.Listing, newStatus string) Inspect
validatePkgPath : func(p string) string Inspect
hasPrefix : func(s string, pre string) bool Inspect
itoa : func(n int) string Inspect
itoa64 : func(n uint64) string Inspect
IsPaused : func() bool Inspect
IsSeedingSealed : func() bool Inspect
GovernanceListing : type =memba_appstore_v3.GovernanceListing
GetGovernanceListing : func(pkgPath string, clearBatch bool) memba_appstore_v3.GovernanceListing Inspect
HasGovernanceFlag : func(pkgPath string, who string) bool Inspect
DefaultPageSize : untyped bigint =(20 <untyped> bigint)
MaxPageLimit : untyped bigint =(100 <untyped> bigint)
clampLimit : func(limit int) int Inspect
jsonEscape : func(s string) string Inspect
screenshotsJSON : func(cids []string) string Inspect
listingJSON : func(l *memba_appstore_v3.Listing, full bool) string Inspect
windowByPrefix : func(index *avl.Tree, prefix string, offset int, limit int, flagFilter bool) string Inspect
ListLiveJSON : func(offset int, limit int) string Inspect
ListByStatusJSON : func(status string, offset int, limit int) string Inspect
ListByPublisherJSON : func(publisher string, offset int, limit int) string Inspect
GetListingJSON : func(pkgPath string) string Inspect
RenderMaxRows : untyped bigint =(100 <untyped> bigint)
Render : func(path string) string Inspect
moreNote : func(live int) string Inspect
esc : func(s string) string Inspect