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 state

Back to all declarations

MetadataStatic

untyped string

// base URI fixed at creation

Value

"static"

MetadataReveal

untyped string

// placeholder until one committed reveal

Value

"reveal"

MetadataMutable

untyped string

// creator may change the base URI until frozen

Value

"mutable"

metadata

type

metadata decides what TokenURI answers. Once frozen, the base URI can never change again; only then can traits be committed.

Value

v1.metadata

contentAddressed

func(s string) bool

contentAddressed accepts an IPFS path that resolves to the same files for good: a server behind any other scheme could change them at will, and an empty CID, a "." or ".." segment, an escape, a query or a fragment could make a gateway resolve it elsewhere, a mutable IPNS name included.

Open
OID
09fb21…b7d9:3
contentAddressed details

Inspect func

validBaseURI

func(s string) bool

A base URI is a directory: token n resolves to \<base>\<n>.json.

Open
OID
09fb21…b7d9:5
validBaseURI details

Inspect func

RevealCommitment

func(creator .uverse.address, salt string, baseURI string) string

RevealCommitment is what a creator commits to at creation and opens at Reveal: sha256("launchpad-reveal-v1|\<creator>|\<salt>|\<base URI>"), with a salt of 64 hex digits the creator keeps secret until then. The salt keeps a guessed URI from being confirmed before the reveal. The creator's address keeps another account from reusing the commitment: a collection's ID does not exist yet when its creator commits, so the account stands in for it.

Open
OID
09fb21…b7d9:7
RevealCommitment details

Inspect func

newMetadata

func(mode string, baseURI string, placeholderURI string, commitment string, provenance string, creator .uverse.address) v1.metadata
Open
OID
09fb21…b7d9:8
newMetadata details

Inspect func

emitMetadata

func(id string, m v1.metadata)
Open
OID
09fb21…b7d9:9
emitMetadata details

Inspect func

Reveal

func(id string, baseURI string, salt string)

Reveal publishes the base URI committed at creation, with the salt that opens the commitment, and fixes it for good. The commitment stays bound to the account that created the collection, whoever holds the creator role now.

Open
OID
09fb21…b7d9:10
Reveal details

Inspect func

mutable

func(id string) *v1.metadata
Open
OID
09fb21…b7d9:11
mutable details

Inspect func

SetBaseURI

func(id string, baseURI string)

SetBaseURI points a mutable collection at new metadata. Every change is announced with its revision number.

Open
OID
09fb21…b7d9:12
SetBaseURI details

Inspect func

FreezeMetadata

func(id string)

FreezeMetadata gives up the right to change a mutable collection's base URI.

Open
OID
09fb21…b7d9:13
FreezeMetadata details

Inspect func

CommitTraits

func(id string, root string)

CommitTraits records, once, the Merkle root of the collection's traits. It waits for frozen metadata so the root cannot outlive the files it describes. A leaf is sha256(0x00 || "launchpad-trait-v1|\<collection>|\<number>|\<type>=\<value>") in a p/samcrew/launchpad/merkle/v1 tree, where neither the type nor the value contains "=" or "|": a leaf has then one reading only, and a leaf that breaks the rule matches no trait offer. The ledger cannot check the root against the files; whoever relies on it must recompute it from them.

Open
OID
09fb21…b7d9:14
CommitTraits details

Inspect func

TraitsRoot

func(id string) string

TraitsRoot is empty until the creator commits one.

Open
OID
09fb21…b7d9:15
TraitsRoot details

Inspect func

dropsPath

untyped string

Value

"gno.land/r/samcrew/launchpad/drops/v1"

marketPath

untyped string

Value

"gno.land/r/samcrew/launchpad/market/v1"

ModeOpen

untyped string

Value

"open"

ModeRoyaltyProtected

untyped string

Value

"royalty_protected"

ModeSoulbound

untyped string

Value

"soulbound"

StatusActive

untyped string

Value

"active"

StatusBurned

untyped string

Value

"burned"

StatusRevoked

untyped string

Value

"revoked"

Info

type

Info is a collection's public record. The creator may edit the profile fields until FreezeProfile, hand the creator role over and seal the supply; everything else is immutable.

Value

v1.Info

collection

type

Value

v1.collection

lastID

v0.ID

Value

<zero>

collections

v0.Tree

// collection key -> \*collection

Open
OID
09fb21…b7d9:18
collections details

Inspect ref

holdings

v0.Tree

// owner -> \*avl.Tree of "\<collection key>/\<number key>" -> custody ID

Open
OID
09fb21…b7d9:20
holdings details

Inspect ref

lastCustody

v0.ID

// the last custody ID given

Value

<zero>

isIssuer

func(who .uverse.address) bool

isIssuer reports whether a realm may create collections and mint into its own: the drops realm always, and every realm on config's add-only list.

Open
OID
09fb21…b7d9:22
isIssuer details

Inspect func

gate

func(issuer .uverse.address, lane string)

gate stops a new collection or a new mint while its lane is paused, so the pauser is a brake on every issuer config may add, whatever that issuer checks. The drops realm is not asked twice: it applies the same gate itself, with the currency it charges, before it calls here.

Open
OID
09fb21…b7d9:24
gate details

Inspect func

callingRealm

func() .uverse.address
Open
OID
09fb21…b7d9:25
callingRealm details

Inspect func

checkProfile

func(description string, image string, banner string, website string)
Open
OID
09fb21…b7d9:28
checkProfile details

Inspect func

mustCollection

func(id string) *v1.collection
Open
OID
09fb21…b7d9:29
mustCollection details

Inspect func

tokenID

func(number int64) v0.TokenID
Open
OID
09fb21…b7d9:30
tokenID details

Inspect func

holdingKey

func(c *v1.collection, number int64) string
Open
OID
09fb21…b7d9:31
holdingKey details

Inspect func

hold

func(owner .uverse.address, c *v1.collection, number int64)

hold and release keep the holdings index equal to ownership: one tree per owner, so a page of an account's tokens costs the same wherever it starts.

Open
OID
09fb21…b7d9:32
hold details

Inspect func

renew

func(owner .uverse.address, c *v1.collection, number int64)

renew gives a held token a new custody ID, as a move does: a change of its single-token approval starts a new custody too.

Open
OID
09fb21…b7d9:33
renew details

Inspect func

release

func(owner .uverse.address, c *v1.collection, number int64)
Open
OID
09fb21…b7d9:34
release details

Inspect func

Create

func(creator .uverse.address, name string, symbol string, description string, image string, banner string, website string, mode string, revocable bool, maxSupply int64, metadataMode string, baseURI string, placeholderURI string, commitment string, provenance string, royalties string) string

Create registers a collection for a creator the calling issuer realm has authenticated and charged. The issuer is recorded on the collection and no other realm can mint into it. royalties is "address:bps;address:bps" with addresses in strictly ascending order, or empty; the metadata arguments are those of newMetadata.

Open
OID
09fb21…b7d9:35
Create details

Inspect func

MintTo

func(id string, recipient .uverse.address) int64

MintTo issues the next token number. Only the collection's issuer calls it, after its own accounting of stages and payment. The ledger mints to whoever the issuer names: it is the issuer's duty to mint a soulbound token only to the wallet that asked for it.

Open
OID
09fb21…b7d9:36
MintTo details

Inspect func

operator

func(c *v1.collection, who .uverse.address) bool

operator reports whether who may be approved for, or move, a token of c. Soulbound tokens never move. A royalty-protected token moves only through a realm on the collection's market list. The ledger cannot make a realm pay: the creator who lists one vouches that it pays the collection's royalties.

Open
OID
09fb21…b7d9:37
operator details

Inspect func

TransferFrom

func(id string, from .uverse.address, to .uverse.address, number int64)

TransferFrom moves a token when the collection's mode lets the caller move one, and the caller owns it or is approved for it.

Open
OID
09fb21…b7d9:39
TransferFrom details

Inspect func

Approve

func(id string, to .uverse.address, number int64)

Approve lets one account move one token; an empty address clears it. A soulbound token takes no approval at all, a royalty-protected one only a listed market.

Open
OID
09fb21…b7d9:40
Approve details

Inspect func

SetApprovalForAll

func(id string, to .uverse.address, approved bool)

SetApprovalForAll lets, or stops letting, one account move every token the caller holds in the collection.

Open
OID
09fb21…b7d9:41
SetApprovalForAll details

Inspect func

ownerOf

func(c *v1.collection, number int64) .uverse.address
Open
OID
09fb21…b7d9:42
ownerOf details

Inspect func

retire

func(c *v1.collection, owner .uverse.address, number int64, status string)
Open
OID
09fb21…b7d9:43
retire details

Inspect func

Burn

func(id string, number int64)

Burn is the holder's alone, in every mode. No creator, operator or admin can destroy a token somebody else holds, except through Revoke.

Open
OID
09fb21…b7d9:44
Burn details

Inspect func

Revoke

func(id string, number int64, reason string)

Revoke retires a credential. It exists only for soulbound collections created as revocable, a term every holder could read before claiming. A holder who burns first leaves a burned token, not a revoked one.

Open
OID
09fb21…b7d9:45
Revoke details

Inspect func

creatorOf

func(id string) *v1.collection

creatorOf returns the collection when the caller is its creator.

Open
OID
09fb21…b7d9:46
creatorOf details

Inspect func

ProposeCreator

func(id string, next .uverse.address)

ProposeCreator starts handing the creator role to another account. Nothing changes until that account accepts; an empty address withdraws the offer.

Open
OID
09fb21…b7d9:47
ProposeCreator details

Inspect func

AcceptCreator

func(id string)

AcceptCreator makes the caller the creator it was proposed as.

Open
OID
09fb21…b7d9:48
AcceptCreator details

Inspect func

SetIssuer

func(id string, pkgPath string)

SetIssuer moves the collection's minting to another issuer realm, for instance a later version of the one that created it. Only the creator can choose it, and only among realms allowed to issue.

Open
OID
09fb21…b7d9:49
SetIssuer details

Inspect func

SealSupply

func(id string)

SealSupply ends minting for good, whatever the cap was.

Open
OID
09fb21…b7d9:50
SealSupply details

Inspect func

profileOwner

func(id string) *v1.collection
Open
OID
09fb21…b7d9:51
profileOwner details

Inspect func

SetProfile

func(id string, description string, image string, banner string, website string)
Open
OID
09fb21…b7d9:52
SetProfile details

Inspect func

FreezeProfile

func(id string)
Open
OID
09fb21…b7d9:53
FreezeProfile details

Inspect func

BalanceOf

func(id string, owner .uverse.address) int64
Open
OID
09fb21…b7d9:56
BalanceOf details

Inspect func

OwnerOf

func(id string, number int64) .uverse.address
Open
OID
09fb21…b7d9:57
OwnerOf details

Inspect func

TotalSupply

func(id string) int64
Open
OID
09fb21…b7d9:58
TotalSupply details

Inspect func

GetApproved

func(id string, number int64) .uverse.address
Open
OID
09fb21…b7d9:59
GetApproved details

Inspect func

IsApprovedForAll

func(id string, owner .uverse.address, operator .uverse.address) bool
Open
OID
09fb21…b7d9:60
IsApprovedForAll details

Inspect func

statusOf

func(c *v1.collection, number int64) string
Open
OID
09fb21…b7d9:61
statusOf details

Inspect func

Epoch

func(id string, number int64) int64

Epoch returns the ID of a token's current custody: a new one at every move and every change of its single-token approval (the same approval again changes nothing), never one given before; 0 for a retired token. A market binds an order to it, so the order dies with the custody it was made under.

Open
OID
09fb21…b7d9:62
Epoch details

Inspect func

StatusOf

func(id string, number int64) string
Open
OID
09fb21…b7d9:63
StatusOf details

Inspect func

TokenURI

func(id string, number int64) string

TokenURI answers for every minted number, retired or not: the metadata of a burned token is still part of the collection's public record.

Open
OID
09fb21…b7d9:64
TokenURI details

Inspect func

maxRoyaltyReceivers

untyped bigint

Hard limits, fixed for the life of this realm.

Value

(10 <untyped> bigint)

maxRoyaltyBPS

untyped bigint

// 10% of a sale, across all receivers

Value

(1000 <untyped> bigint)

maxMarkets

untyped bigint

Hard limits, fixed for the life of this realm.

Value

(5 <untyped> bigint)

royalty

type

royalty is one receiver's share of every sale, in basis points.

Value

v1.royalty

RoyaltyPayout

type

Value

v1.RoyaltyPayout

parseBPS

func(s string) int64

parseBPS reads a positive decimal with no sign, space or leading zero.

Open
OID
09fb21…b7d9:66
parseBPS details

Inspect func

parseRoyalties

func(encoded string, mode string) ([]v1.royalty, int64)

parseRoyalties reads "address:bps;address:bps". Strictly ascending addresses give every split exactly one encoding and rule out duplicates.

Open
OID
09fb21…b7d9:68
parseRoyalties details

Inspect func

validName

func(s string) bool

validName is the chain's rule for one segment of a package path: a letter first, then letters and digits, joined by single "\_" or "-".

Open
OID
09fb21…b7d9:69
validName details

Inspect func

validMarketPath

func(path string) bool

A market may be any realm the chain can host, a third party's included, so its path follows the chain's own rule for a realm path: "gno.land/r/", then names separated by "/", none ending in "\_test", in at most 200 bytes. A slot is permanent: none is given to a path no realm can have. The rule for issuers is config's and is narrower (plain segments in our own namespace): an issuer is one of ours, a market need not be.

Open
OID
09fb21…b7d9:70
validMarketPath details

Inspect func

RoyaltyBPS

func(id string) int64
Open
OID
09fb21…b7d9:71
RoyaltyBPS details

Inspect func

RoyaltyQuote

func(id string, price int64) []v1.RoyaltyPayout

RoyaltyQuote floors each receiver's share of price. The seller keeps the rounding remainder.

Open
OID
09fb21…b7d9:72
RoyaltyQuote details

Inspect func

AllowMarket

func(id string, pkgPath string)

AllowMarket adds a realm through which a royalty-protected collection's tokens may be sold. The list starts with the Launchpad market and only grows: a holder's way out can be widened, never taken away. The ledger cannot make a realm pay: the creator vouches that the market it lists pays this collection's royalties, and every holder can read the list.

Open
OID
09fb21…b7d9:73
AllowMarket details

Inspect func

maxPage

untyped bigint

Lists are paged: a zero-based page of 1 to maxPage entries.

Value

(50 <untyped> bigint)

num

func(n int64) string

int64 values are decimal strings so a JSON client cannot round them.

Open
OID
09fb21…b7d9:74
num details

Inspect func

listJSON

func(tree *v0.Tree, page int64, size int64, render func(...)) string

listJSON renders one page of a tree in key order. The tree seeks the first entry by subtree sizes, so a deep page costs what the first one does.

Open
OID
09fb21…b7d9:76
listJSON details

Inspect func

CollectionJSON

func(id string) string
Open
OID
09fb21…b7d9:77
CollectionJSON details

Inspect func

royaltiesJSON

func(royalties []v1.royalty) string
Open
OID
09fb21…b7d9:78
royaltiesJSON details

Inspect func

addressesJSON

func(list [].uverse.address) string
Open
OID
09fb21…b7d9:79
addressesJSON details

Inspect func

CapabilitiesJSON

func(id string) string

CapabilitiesJSON tells a wallet or a market what a holder of this collection can do, without it knowing the modes. "markets" is empty when any operator may be approved. Royalties are paid by markets at sale. "royaltyEnforcement" is "none" without royalties; "market\_sales" for an open collection, where the ledger enforces nothing: a market that honours royalties pays them at a sale, and a direct transfer or any other realm pays none; "listed\_markets" when the ledger lets a token move only through the realms in "markets". Whether a listed realm pays is the word of the creator who listed it. "creatorRevoke" is the creator's right to revoke a token of a revocable soulbound collection.

Open
OID
09fb21…b7d9:80
CapabilitiesJSON details

Inspect func

ListCollectionsJSON

func(page int64, size int64) string

ListCollectionsJSON pages through a summary of every collection, in creation order. CollectionJSON has the full record.

Open
OID
09fb21…b7d9:81
ListCollectionsJSON details

Inspect func

tokenJSON

func(c *v1.collection, number int64) string
Open
OID
09fb21…b7d9:82
tokenJSON details

Inspect func

TokenJSON

func(id string, number int64) string

TokenJSON describes one minted number. A retired token has no owner.

Open
OID
09fb21…b7d9:83
TokenJSON details

Inspect func

ApprovalJSON

func(id string, number int64, operator string) string

ApprovalJSON answers, in one read, whether operator may move an active token: by a single-token approval or by the owner's collection-wide one.

Open
OID
09fb21…b7d9:84
ApprovalJSON details

Inspect func

TokensJSON

func(id string, page int64, size int64) string

TokensJSON pages through a collection's minted numbers in order, retired ones included.

Open
OID
09fb21…b7d9:85
TokensJSON details

Inspect func

HoldingsJSON

func(owner string, page int64, size int64) string

HoldingsJSON pages through the tokens an account holds, across every collection, in collection then number order.

Open
OID
09fb21…b7d9:86
HoldingsJSON details

Inspect func
MetadataStatic : untyped string ="static"
MetadataReveal : untyped string ="reveal"
MetadataMutable : untyped string ="mutable"
metadata : type =v1.metadata
contentAddressed : func(s string) bool Inspect
validBaseURI : func(s string) bool Inspect
validHash : func(s string) bool Inspect
RevealCommitment : func(creator .uverse.address, salt string, baseURI string) string Inspect
newMetadata : func(mode string, baseURI string, placeholderURI string, commitment string, provenance string, creator .uverse.address) v1.metadata Inspect
emitMetadata : func(id string, m v1.metadata) Inspect
Reveal : func(id string, baseURI string, salt string) Inspect
mutable : func(id string) *v1.metadata Inspect
SetBaseURI : func(id string, baseURI string) Inspect
FreezeMetadata : func(id string) Inspect
CommitTraits : func(id string, root string) Inspect
TraitsRoot : func(id string) string Inspect
dropsPath : untyped string ="gno.land/r/samcrew/launchpad/drops/v1"
marketPath : untyped string ="gno.land/r/samcrew/launchpad/market/v1"
ModeOpen : untyped string ="open"
ModeRoyaltyProtected : untyped string ="royalty_protected"
ModeSoulbound : untyped string ="soulbound"
StatusActive : untyped string ="active"
StatusBurned : untyped string ="burned"
StatusRevoked : untyped string ="revoked"
Info : type =v1.Info
collection : type =v1.collection
lastID : v0.ID =<zero>
collections : v0.Tree Inspect
holdings : v0.Tree Inspect
lastCustody : v0.ID =<zero>
isIssuer : func(who .uverse.address) bool Inspect
gate : func(issuer .uverse.address, lane string) Inspect
callingRealm : func() .uverse.address Inspect
actor : func() .uverse.address Inspect
check : func(err .uverse.error) Inspect
checkProfile : func(description string, image string, banner string, website string) Inspect
mustCollection : func(id string) *v1.collection Inspect
tokenID : func(number int64) v0.TokenID Inspect
holdingKey : func(c *v1.collection, number int64) string Inspect
hold : func(owner .uverse.address, c *v1.collection, number int64) Inspect
renew : func(owner .uverse.address, c *v1.collection, number int64) Inspect
release : func(owner .uverse.address, c *v1.collection, number int64) Inspect
Create : func(creator .uverse.address, name string, symbol string, description string, image string, banner string, website string, mode string, revocable bool, maxSupply int64, metadataMode string, baseURI string, placeholderURI string, commitment string, provenance string, royalties string) string Inspect
MintTo : func(id string, recipient .uverse.address) int64 Inspect
operator : func(c *v1.collection, who .uverse.address) bool Inspect
denied : func(c *v1.collection) Inspect
TransferFrom : func(id string, from .uverse.address, to .uverse.address, number int64) Inspect
Approve : func(id string, to .uverse.address, number int64) Inspect
SetApprovalForAll : func(id string, to .uverse.address, approved bool) Inspect
ownerOf : func(c *v1.collection, number int64) .uverse.address Inspect
retire : func(c *v1.collection, owner .uverse.address, number int64, status string) Inspect
Burn : func(id string, number int64) Inspect
Revoke : func(id string, number int64, reason string) Inspect
creatorOf : func(id string) *v1.collection Inspect
ProposeCreator : func(id string, next .uverse.address) Inspect
AcceptCreator : func(id string) Inspect
SetIssuer : func(id string, pkgPath string) Inspect
SealSupply : func(id string) Inspect
profileOwner : func(id string) *v1.collection Inspect
SetProfile : func(id string, description string, image string, banner string, website string) Inspect
FreezeProfile : func(id string) Inspect
GetInfo : func(id string) v1.Info Inspect
Count : func() int64 Inspect
BalanceOf : func(id string, owner .uverse.address) int64 Inspect
OwnerOf : func(id string, number int64) .uverse.address Inspect
TotalSupply : func(id string) int64 Inspect
GetApproved : func(id string, number int64) .uverse.address Inspect
IsApprovedForAll : func(id string, owner .uverse.address, operator .uverse.address) bool Inspect
statusOf : func(c *v1.collection, number int64) string Inspect
Epoch : func(id string, number int64) int64 Inspect
StatusOf : func(id string, number int64) string Inspect
TokenURI : func(id string, number int64) string Inspect
Render : func(path string) string Inspect
maxRoyaltyReceivers : untyped bigint =(10 <untyped> bigint)
maxRoyaltyBPS : untyped bigint =(1000 <untyped> bigint)
maxMarkets : untyped bigint =(5 <untyped> bigint)
royalty : type =v1.royalty
RoyaltyPayout : type =v1.RoyaltyPayout
parseBPS : func(s string) int64 Inspect
parseRoyalties : func(encoded string, mode string) ([]v1.royalty, int64) Inspect
validName : func(s string) bool Inspect
validMarketPath : func(path string) bool Inspect
RoyaltyBPS : func(id string) int64 Inspect
RoyaltyQuote : func(id string, price int64) []v1.RoyaltyPayout Inspect
AllowMarket : func(id string, pkgPath string) Inspect
maxPage : untyped bigint =(50 <untyped> bigint)
num : func(n int64) string Inspect
listJSON : func(tree *v0.Tree, page int64, size int64, render func(...)) string Inspect
CollectionJSON : func(id string) string Inspect
royaltiesJSON : func(royalties []v1.royalty) string Inspect
addressesJSON : func(list [].uverse.address) string Inspect
CapabilitiesJSON : func(id string) string Inspect
ListCollectionsJSON : func(page int64, size int64) string Inspect
tokenJSON : func(c *v1.collection, number int64) string Inspect
TokenJSON : func(id string, number int64) string Inspect
ApprovalJSON : func(id string, number int64, operator string) string Inspect
TokensJSON : func(id string, page int64, size int64) string Inspect
HoldingsJSON : func(owner string, page int64, size int64) string Inspect