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

v1 source realm

Package curation records who curates the Launchpad marketplace and what they decided about a collection: applications...

Overview

Package curation records who curates the Launchpad marketplace and what they decided about a collection: applications, feature slots, temporary holds, verification and appeals. It holds no coins and no tokens, never changes a collection's terms and never blocks a transfer, sale, refund or claim: a client reads these records and decides what to show.

Constants 1

Functions 37

func AcceptAdmin

crossing Action
1func AcceptAdmin(cur realm)
source

AcceptAdmin completes the handoff. No caller has the empty address, so nobody accepts while nothing is proposed. The admin holds no seat: a manager who accepts gives its seat up.

func AccessJSON

Action
1func AccessJSON(collection, who string) string
source

AccessJSON tells a private inbox what an account is to a collection right now: whether it holds the creator role ("founder"), an active manager, and whether Conflicted bars it from acting as one. It is public data to be read on every request, not a token.

The answer also says where and when it was evaluated: the chain ID, the block height and the block time. The answer is not signed: checking them exposes an honest node on the wrong chain or behind it, and proves nothing against a node that lies. Its eight fields are a contract with that reader.

func Appeal

crossing Action
1func Appeal(cur realm, collection, subject, statementHash, statementCID string)
source

Appeal files the founder's objection on one subject. A collection has at most one open appeal per subject; a resolved one can be followed by another.

func AppealsJSON

Action
1func AppealsJSON(page, size int64) string
source

AppealsJSON pages through the open appeals in filing order.

func ApplicationJSON

Action
1func ApplicationJSON(collection string) string
source

ApplicationJSON returns null for a collection nobody applied for.

func ApplicationsJSON

Action
1func ApplicationsJSON(page, size int64) string
source

ApplicationsJSON pages through the applications in order of first filing.

func Apply

crossing Action
1func Apply(cur realm, collection, statementHash, statementCID string)
source

Apply files the founder's application for a collection. The founder may file again at any time before a recommendation, to correct a pointer or after a manager asked for changes or declined. Each filing is a new revision awaiting review. Filing records the filer's conflict on the collection for good. A realm that holds the creator role never applies: the founder calls in person.

func AppointManager

crossing Action
1func AppointManager(cur realm, who address, lead bool, until int64)
source

AppointManager seats a manager until a time at most 90 days ahead, or replaces the term of one already seated. Expired seats are dropped first, so the tree never holds more than maxSeats entries.

func CollectionJSON

Action
1func CollectionJSON(collection string) string
source

CollectionJSON is a collection's editorial record: what a client may show now, then the records behind it and the latest appeal on each subject. A part with no record is null.

func ConfirmHide

crossing Action
1func ConfirmHide(cur realm, collection string)
source

ConfirmHide lets a second manager keep a running hold for 24 hours from now, once. After that, or once the admin has set the term, only the admin changes it.

func Conflicted

Action
1func Conflicted(collection string, who address) bool
source

Conflicted reports whether an account may not act as a manager on a collection: it created the collection, holds or is proposed for its creator role now, or has a recorded conflict. It aborts on an unknown collection.

func ExtendHide

crossing Action
1func ExtendHide(cur realm, collection string, until int64, reasonHash, reasonCID string)
source

ExtendHide sets the term of a recorded hold, running or over, to a time at most 30 days ahead, and replaces its public reason.

func FeaturesJSON

Action
1func FeaturesJSON(page, size int64) string
source

FeaturesJSON pages through every collection that has a feature slot on record, in ID text order, saying whether it is featured right now.

func HasConflict

Action
1func HasConflict(collection string, who address) bool
source

HasConflict reports a recorded conflict only: a filing, a recusal or an admin's mark. Conflicted is the full rule.

func HideTemporarily

crossing Action
1func HideTemporarily(cur realm, collection, reasonHash, reasonCID string)
source

HideTemporarily hides a collection for 24 hours on one manager's word. The record outlives the hold: no manager can start another until the admin clears it.

func IsFeatured

Action
1func IsFeatured(collection string) bool
source

IsFeatured holds only while the slot runs, both of its managers keep their standing and the collection is not hidden.

func IsHidden

Action
1func IsHidden(collection string) bool
source

IsHidden holds while the hold runs and the manager whose word set its term keeps its standing: the starter, or the confirmer once it confirmed. A term the admin set rests on the admin alone.

func MarkConflict

crossing Action
1func MarkConflict(cur realm, collection string, who address)
source

MarkConflict records a conflict the admin knows of, on a manager or on an account that may become one, and voids that account's latest decision on the collection as Recuse does. Marking a recorded conflict again records and emits nothing.

func ProposeAdmin

crossing Action
1func ProposeAdmin(cur realm, next address)
source

ProposeAdmin starts a handoff to any account or realm. Nothing changes until that exact address accepts.

func ProposeFeature

crossing Action
1func ProposeFeature(cur realm, collection, reasonHash, reasonCID string, until int64)
source

ProposeFeature opens a slot of at most 14 days. It features nothing until a second manager approves. It replaces a slot that is not running: one still unapproved, or one whose proposer or approver lost its standing.

func Recuse

crossing Action
1func Recuse(cur realm, collection string)
source

Recuse records the calling manager's own conflict on a collection and voids its decision there, if it made the latest one. A recorded conflict is permanent: nobody, the admin included, can clear it, and recusing again records and emits nothing.

func Resign

crossing Action
1func Resign(cur realm)
source

Resign gives up the calling manager's own seat at once.

func ResolveAppeal

crossing Action
1func ResolveAppeal(cur realm, collection, subject string, upheld bool, reasonHash, reasonCID string)
source

ResolveAppeal records the admin's answer and its public reason. It changes nothing else: the admin acts on an upheld appeal with the ordinary calls.

func Review

crossing Action
1func Review(cur realm, collection string, revision int64, status, reasonHash, reasonCID string)
source

Review records one manager's decision on the revision it read, which must still be the latest. Any unconflicted manager may decide again, whatever the latest decision. A recommendation is advice to the admin and gives the collection nothing by itself.

func SetVerified

crossing Action
1func SetVerified(cur realm, collection string, value bool, reasonHash, reasonCID string)
source

SetVerified is the admin's statement that a collection is what it claims to be. It says nothing about price or future value.

func GetApplication

Action
1func GetApplication(collection string) Application
source

GetApplication returns a copy of a collection's application, the zero value (revision 0) when nobody applied, as ApplicationJSON answers null.

Types 1

type Application

struct
 1type Application struct {
 2	Founder       address // who filed the latest revision
 3	StatementHash string
 4	StatementCID  string
 5	Revision      int64 // 0: nobody applied
 6	Status        string
 7	Reviewer      address
 8	ReasonHash    string
 9	ReasonCID     string
10	UpdatedAt     int64
11}
source

An Application is a founder's request for review and the latest decision on it. Earlier revisions and decisions stay in the event log.

Imports 11

Source Files 4