MaxArtworks
untyped bigint// = core MaxSupplyCap
Value
(10000 <untyped> bigint)
MaxSlots
untyped bigint// Bind requires slots == maxSupply
Value
(10000 <untyped> bigint)
MaxEditions
untyped bigintLimits (design §4 as amended by §0a / D4, and by the UP-M1 review fix: every read of the largest store these limits allow must stay far below the 3B query gas cap; worst cases are locked by zz\_worst\_gas\_test.gno in r/reader).
Value
(10000 <untyped> bigint)
MaxTraitTypes
untyped bigint// core-path manifest slots "Trait 1".."Trait 8" (was 16)
Value
(8 <untyped> bigint)
MaxTiers
untyped bigintLimits (design §4 as amended by §0a / D4, and by the UP-M1 review fix: every read of the largest store these limits allow must stay far below the 3B query gas cap; worst cases are locked by zz\_worst\_gas\_test.gno in r/reader).
Value
(8 <untyped> bigint)
MaxDictValues
untyped bigint// distinct values per trait type (was 255)
Value
(100 <untyped> bigint)
MaxStoreValues
untyped bigint// distinct values over all trait types of a store (new; u8 id + 1 in a record)
Value
(255 <untyped> bigint)
MaxNameLen
untyped bigint// trait type and tier names
Value
(20 <untyped> bigint)
MaxValueLen
untyped bigint// trait values (was 40)
Value
(32 <untyped> bigint)
MaxTitleLen
untyped bigint// artwork titles (= engine.MaxTraitLen)
Value
(64 <untyped> bigint)
MaxLabelLen
untyped bigintLimits (design §4 as amended by §0a / D4, and by the UP-M1 review fix: every read of the largest store these limits allow must stay far below the 3B query gas cap; worst cases are locked by zz\_worst\_gas\_test.gno in r/reader).
Value
(64 <untyped> bigint)
MaxStoreOnchainBytes
untyped bigint// ~430 GNOT of deposit at 100 ugnot/B
Value
(4194304 <untyped> bigint)
MaxChunk
untyped bigint// per AppendBytes call; a tx carries ~540 KB raw (WP0)
Value
(262144 <untyped> bigint)
SegmentBytes
untyped bigint// byte-log value size (~6% key overhead, measured)
Value
(32768 <untyped> bigint)
MaxBatch
untyped bigint// records per AddArtworks
Value
(100 <untyped> bigint)
MaxPage
untyped bigint// Artworks page (was 50)
Value
(20 <untyped> bigint)
zero32
untyped stringValue
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
reservedTraitTypes
[]stringreserved trait type names: the adapter adds these itself (case-insensitive).
- OID
- 0dfd99…8ba4:4
reservedTraitTypes details
store
typeValue
v1.store
dictEntry
typedictEntry is one distinct trait value of a store: its trait type, the value and its JSON (escaped once, when first used).
Value
v1.dictEntry
shaIndex
typeshaIndex is the sorted list of every artwork's raw sha256 (32 B each), one object per store: duplicate detection without one avl key (~2 KB) per artwork.
Value
v1.shaIndex
stores
v0.Tree// safe.PadInt(id, 10) -> \*store
- OID
- 0dfd99…8ba4:6
stores details
storeCount
int64Value
3
storeKey
func(id int64) string- OID
- 0dfd99…8ba4:8
storeKey details
bucketKey
func(b int64) string- OID
- 0dfd99…8ba4:10
bucketKey details
mustStore
func(storeID string) *v1.store- OID
- 0dfd99…8ba4:11
mustStore details
assertWallet
func()assertWallet: every write comes straight from a wallet's MsgCall and carries no coins.
- OID
- 0dfd99…8ba4:12
assertWallet details
ownedDraft
func(storeID string) *v1.store- OID
- 0dfd99…8ba4:13
ownedDraft details
NewStore
func(label string, traitTypes string, tiers string) stringNewStore creates an empty Draft store owned by the calling wallet. traitTypes and tiers are '|'-separated name lists ("" = none): at most 16 trait types and 8 tiers (tiers ordered low -> high), names 1..20 bytes, no ':' and no leading/trailing space, unique ignoring case; "Tier", "Edition", "Storage", "Status" and "Artwork" are reserved trait types. Returns the store id. Event StoreCreated{store, owner}.
- OID
- 0dfd99…8ba4:14
NewStore details
jsonAll
func(xs []string) []string- OID
- 0dfd99…8ba4:15
jsonAll details
jsonStr
func(x string) stringjsonStr is safe.JSONString (same bytes: '"' '\\\\' \\n \\r \\t, '\<' '>' '&', U+2028/9 and other controls escaped) without its per-character hex formatting, which made '\<'-heavy text cost ~10x more (UP-M1).
- OID
- 0dfd99…8ba4:16
jsonStr details
parseNames
func(field string, list string, max int, traits bool) []string- OID
- 0dfd99…8ba4:17
parseNames details
AddArtworks
func(storeID string, batch string) stringAddArtworks declares up to MaxBatch artworks, one per '\\n'-separated line: kind|mime|size|sha256|cid|editions|tier|title|v1|…|vN with exactly one value per trait type of the store (N = len(traitTypes)): - kind "chain" | "ipfs"; mime "svg" | "png" | "webp" | "jpeg"; - size: decimal bytes, chain svg \<= 16,384, chain raster \<= 262,144, ipfs raw \<= 1 MiB, ipfs dag-pb \<= 50 MiB; the store's on-chain total stays \<= 4 MiB; - sha256: 64 lower-case hex of the file bytes, unique in the store (use editions for copies); - cid: "" for chain; for ipfs a CIDv1 (media.ParseCIDv1): raw codec ⇒ its digest must equal sha256 (verified binding), dag-pb ⇒ digest stored; - editions 1..10,000 (the store's slots stay \<= 10,000); - tier "" or one of the store's tiers; title \<= 64 bytes; - values "" (none) or \<= 32 bytes, no leading/trailing space; at most 100 distinct values per trait type and 255 over all types of a store. Returns "first-last" (0-based indexes). Event ArtworkAdded per line.
- OID
- 0dfd99…8ba4:18
AddArtworks details
split
func(s string, sep uint8) []stringsplit is strings.Split for a one-byte separator in a single pass (half the VM gas of strings.Split, which dominates a 100-line batch).
- OID
- 0dfd99…8ba4:19
split details
parseMime
func(at string, s string) m int- OID
- 0dfd99…8ba4:20
parseMime details
parseCount
func(field string, s string, max int64) int64parseCount parses a canonical positive decimal (no sign, no leading zero) \<= max.
- OID
- 0dfd99…8ba4:21
parseCount details
u32
func(v int64) string- OID
- 0dfd99…8ba4:22
u32 details
AppendBytes
func(storeID string, idx int64, offset int64, chunk []uint8)AppendBytes stores the next chunk of an on-chain artwork. Bytes arrive in artwork order: idx must be the lowest incomplete on-chain artwork and offset its Have (resume = read Have). chunk is a \[]byte argument (the keeper decodes the MsgCall's base64 natively, WP0), 1..MaxChunk bytes. When the artwork is complete its sha256 must equal the declared one and media.CheckImage must pass, else the call panics and nothing is stored. Event ArtworkComplete{store, idx}.
- OID
- 0dfd99…8ba4:23
AppendBytes details
Truncate
func(storeID string, keep int64)Truncate drops artworks keep..n-1 of a Draft store and cuts the byte log back, freeing their storage (the chain refunds the signer, i.e. the owner who paid it). Trait values first used by dropped artworks stay in the dictionary (with zero counts; they still count towards MaxStoreValues). Event StoreTruncated{store, keep}.
- OID
- 0dfd99…8ba4:24
Truncate details
Seal
func(storeID string)Seal freezes a store for good. It needs at least one artwork and every on-chain artwork complete. Event StoreSealed{store, artworks, slots, onchainN, ipfsN, onchainBytes}.
- OID
- 0dfd99…8ba4:25
Seal details
StoreCount
func() int64- OID
- 0dfd99…8ba4:26
StoreCount details
Info
func(storeID string) v1.StoreInfoInfo is the typed store header for other realms (a copy).
- OID
- 0dfd99…8ba4:28
Info details
Store
func(storeID string) stringStore is the store header as JSON: {id, owner, label, state, createdHeight, sealedHeight, artworks, slots, onchainN, ipfsN, onchainBytes, received, complete, nextUpload, badge, traitTypes, tiers}. received = on-chain bytes stored so far; nextUpload = index of the artwork AppendBytes expects next (-1 when every on-chain artwork is complete); badge = media.Badge.
- OID
- 0dfd99…8ba4:29
Store details
ArtworkAt
func(storeID string, idx int64) v1.ArtworkArtworkAt is the typed artwork record (a copy).
- OID
- 0dfd99…8ba4:30
ArtworkAt details
ArtworkMeta
func(storeID string, idx int64) v1.ArtworkArtworkMeta is ArtworkAt without SHA256, Digest and CID (left ""): the cheap form for trait reads (a CID costs ~1.4M gas to encode in the VM).
- OID
- 0dfd99…8ba4:31
ArtworkMeta details
Artworks
func(storeID string, offset int64, limit int64) stringArtworks is one page of records as JSON (limit \<= MaxPage = 20): \[{index, kind, mime, mimeType, size, have, complete, editions, slotStart, slotEnd, sha256, digest, cid, title, tier, traits:\[{trait\_type,value}]}]. kind is "chain" | "ipfs"; digest is the dag-pb root ("" otherwise); cid is "" for on-chain artworks. Built from parts escaped once at write time (type names, tiers, trait values) and joined once (UP-M1).
- OID
- 0dfd99…8ba4:32
Artworks details
ArtworkJSON
func(storeID string, idx int64) stringArtworkJSON is the JSON object of one artwork (also used by the upload engine's reads so both realms emit one shape).
- OID
- 0dfd99…8ba4:33
ArtworkJSON details
itoa
func(n int64) string- OID
- 0dfd99…8ba4:34
itoa details
ArtworkBytes
func(storeID string, idx int64) stringArtworkBytes is the raw file of a complete on-chain artwork, "" for an incomplete or IPFS one. Only complete files passed sha256 + CheckImage.
- OID
- 0dfd99…8ba4:35
ArtworkBytes details
ArtworkDataURI
func(storeID string, idx int64) stringArtworkDataURI is "data:\<mime>;base64,…" for a complete on-chain artwork, "" otherwise. mime is one of the four checked types (ENG-I3: no free-form media type ever reaches a data URI).
- OID
- 0dfd99…8ba4:36
ArtworkDataURI details
SlotArtwork
func(storeID string, slot int64) (idx int64, edition int64)SlotArtwork maps a slot (0..slots-1) to its artwork index and 1-based edition: artwork i covers \[slotEnd(i-1), slotEnd(i)). O(log n).
- OID
- 0dfd99…8ba4:37
SlotArtwork details
Composition
func(storeID string) stringComposition is the set composition (design §8, D8 "drop table") as JSON: {store, sealed, artworks, slots, tiers:[{name, artworks, slots}] (low -> high), untiered:{artworks, slots}, traits:[{trait_type, values:[{value, artworks, slots}], none:{artworks, slots}}]}. "slots" counts editions, i.e. the odds of a token: slots/total slots. O(tiers + distinct values): the counters are kept by AddArtworks / Truncate and the names are escaped once, so the largest store the limits allow stays far below the query gas cap (UP-M1).
- OID
- 0dfd99…8ba4:38
Composition details
CountsJSON
func(storeID string, idx []int64, edition []int64) stringCountsJSON aggregates the real-name trait counts of a set of tokens, given each token's artwork index and edition (from SlotArtwork), as the members of a JSON object: "Tier":{tier:n}, then each creator trait type {value:n} in store order, "Edition":{"e/E":n} (artworks with E > 1) and "Storage":{"On-chain"|"IPFS":n}; types and values with no count are left out. Names are the JSON escaped once at write time, values in dictionary order (review UP-M1: no per-read escaping, integer counters only).
- OID
- 0dfd99…8ba4:39
CountsJSON details
countPair
func(artworks int64, slots int64) string- OID
- 0dfd99…8ba4:40
countPair details
TierSlots
func(storeID string) (tiers []string, slots []int64, untiered int64)TierSlots is the typed tier part of Composition: tier names (low -> high), the slots each holds, and the slots of untiered artworks. O(tiers).
- OID
- 0dfd99…8ba4:41
TierSlots details
Render
func(path string) stringRender stays minimal and prints no creator text; uploaded collections are browsed in the gallery realm.
- OID
- 0dfd99…8ba4:42
Render details
recBytes
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(95 <untyped> bigint)
bucketSize
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(64 <untyped> bigint)
offKind
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(0 <untyped> bigint)
offMime
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(1 <untyped> bigint)
offSize
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(2 <untyped> bigint)
offHave
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(6 <untyped> bigint)
offEditions
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(10 <untyped> bigint)
offSlotEnd
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(14 <untyped> bigint)
offLogOff
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(18 <untyped> bigint)
offTier
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(22 <untyped> bigint)
offTraits
untyped bigintFixed artwork record, recBytes long, bucketSize records per avl value (design §4; one key per 64 artworks instead of one per artwork): off 0 kind u8 (media.Kind*) 1 mime u8 (media.Mime*) 2 size u32 declared byte size 6 have u32 bytes received (= size when complete; ipfs: = size at add) 10 editions u32 14 slotEnd u32 prefix sum of editions, exclusive 18 logOff u32 chain: offset in the byte log (= declared on-chain bytes before it) 22 tier u8 0 = none, else 1-based index into tiers 23 traits [8]u8 per trait type: dictionary index + 1, 0 = none (MaxTraitTypes) 31 sha256 [32] of the file bytes 63 digest [32] dag-pb root digest (UnixFS), zero otherwise All fields are big-endian. A raw CID is derived from sha256.
Value
(23 <untyped> bigint)
offSHA
untyped bigint// 31
Value
(31 <untyped> bigint)
offDigest
untyped bigint// 63
Value
(63 <untyped> bigint)
record
typeValue
v1.record
putU32
func(b []uint8, off int, v int64)- OID
- 0dfd99…8ba4:43
putU32 details
getU32
func(s string, off int) int64- OID
- 0dfd99…8ba4:45
getU32 details
decodeRecord
func(s string) v1.record- OID
- 0dfd99…8ba4:46
decodeRecord details
bucket
typebucket holds up to bucketSize packed records and their titles (concatenated, each prefixed by its byte length as one byte).
Value
v1.bucket