const ReasonNotUpload, ReasonNoStore, ReasonNotSealed, ReasonBoundElsewhere, ReasonSupply, ReasonUnbound, ReasonReady
Readiness reasons (Status.reason).
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package upload is the engine/v2 adapter for uploaded collections (docs/uploaded-collections.md §5.3, §7–§10, §0a; mai...
Package upload is the engine/v2 adapter for uploaded collections (docs/uploaded-collections.md §5.3, §7–§10, §0a; mainnet plan §2.3, WP-F). Core knows it as a media engine (Manifest.Kind "media"): each collection's params name one sealed asset store ("store:<id>", r/…/assets/v1) and Bind locks that store to the collection while it is a Draft. After the reveal every token's art is the artwork of the slot a salt-keyed permutation gives it, and core itself serves it:
What holds, and why:
The adapter is stateful by design (bindings and cached keys), declares Living false, takes no fee (D3) and holds no coins.
Readiness reasons (Status.reason).
Trait names the adapter adds itself (assets/v1 reserves them, so a creator's trait type can never collide). A collection's trait list is TraitTypes(params): Tier (if the store has tiers), the creator's types in store order, Edition (if an artwork has editions), Storage.
MaxTraitsBatch bounds TraitsBatch (JSON); MaxTraitLists bounds the typed TraitLists. Both compute the permutation key once per call (§0a), never per token. Sized so the worst store the asset limits allow stays <= 1B test gas per call (review UP-M1; zz_worst_gas_test.gno).
CardFingerprint = sha256(cardSVG) = the engine's sample fingerprint (TestCardFingerprint checks it against core's registration).
EngineVersion is Manifest().Version.
FeeBps is the engine-author fee (D3: none; fixed forever at Register).
Assignment is the typed TokenArtwork for other realms (gallery): ready is false before Final or when the collection is not ready; a is a copy.
Bind locks the collection's store (its params "store:<id>") to the collection. Caller == core creator == store owner, from a wallet; core state Draft; the collection uses this engine; the store is sealed and not bound elsewhere; maxSupply == the store's slots. cid may be "<cid>" or "c/<cid>"; the binding is kept under core's bare id. Event StoreBound{store, cid}.
IsUpload reports whether cid's engine is this adapter.
Readiness is the typed Status for other realms.
Register is an explicit call (not init: under the inert package policy init runs in the approver's tx). The card's fingerprint is reserved in core's source for the platform author, so only that key can sign it.
Render stays minimal; uploaded collections are browsed in the gallery.
SelfPath and AssetsPath are the engine id and the store realm it reads.
SetComposition is {collection, store, ready, reason, set}, set = assets.Composition of the collection's store: slots per tier and per trait value over the planned set (public and fixed before the sale, D8).
Settle caches the salt and permutation key once the collection is Final. Anyone may call it; it is deterministic (the salt is final) and idempotent, and it only saves read gas: the lazy path computes the same key. Event Settled{cid, key} (first call only).
Status is {cid, upload, state, store, bound, ready, reason, badge, settled, maxSupply, slots}. The frontend shows the mint UI only when ready (T14).
StorageBadge is "computed" (any other engine), "onchain", "ipfs", "mixed", or "unbound" for an upload collection that is not ready (§9).
StoreOf is the store named by cid's params ("" if none).
TokenArtwork is the token's assignment as JSON: {collection, tid, revealed, ready, reason} and, once revealed and ready, {store, artwork, slot, edition, editions, assignment, kind, mime, mimeType, size, sha256, digest, cid, uri, tier, tierSource, title, traits}. uri is "ipfs://<cid>" for IPFS art and "" for on-chain art (read its bytes with TokenImage / TokenURI: base64 of up to 256 KiB is not free).
TokenImage is the inline image: core.TokenURI, except "" for IPFS art (never a remote URL); core's placeholder before Final. Panics on an unknown token or a collection of another engine.
TokenMetadata is the upload view of the metadata (§10.2): core's TokenMetadata fields plus image_size and properties (store, artwork, edition, storage, cid, title, tier, tierSource, assignment, fair, mimeVerified). "image" equals core.TokenURI and is written with RawStrField (a data URI / ipfs URI needs no escaping: M-4, the 256 KiB PNG no longer runs out of gas). mimeVerified (UP-I6) is true only for on-chain files, whose type the chain checked; an IPFS file's mime is the creator's claim. Before Final: core's placeholder image and [{Status: Unrevealed}].
TokenTraitList is the typed real-name trait list of one token (a copy).
TokenTraits is TokenTraitList as [{"trait_type","value"}] JSON.
TokenURI is core.TokenURI of an upload collection (sinopia4: core serves the art through Media): "data:<mime>;base64,…" for on-chain art, "ipfs://<cidv1>" for IPFS art, core's placeholder before Final. Kept for callers of the sinopia3 adapter; read core directly.
TraitCounts is {"n": tokens counted, "counts": {type: {value: count}}} over tokens offset+1 … offset+limit (limit <= MaxTraitCounts, burned skipped), with the creator's real names: Tier, the creator's trait types (store order, values in dictionary order), Edition, Storage. Before Final every token counts as {"Status": "Unrevealed"}, Final but not ready as {"Status": "Not ready"}. One permutation key per call; the counting runs in assets/v1 over integer ids (review UP-M1).
TraitJSONLists is TraitLists with each token's traits as a JSON array (the bytes TokenTraits returns), for pages that print them (reader.Cards). limit <= MaxTraitJSONLists.
TraitLists returns, for tokens offset+1 … offset+limit (limit <= MaxTraitLists, burned tokens skipped), the token ids and their real-name traits. The permutation key is computed once per call.
TraitsBatch is [{tid, traits:[{trait_type, value}]}] for tokens offset+1 … offset+limit (limit <= MaxTraitsBatch), burned tokens skipped.
Unbind releases the store while the collection is still a Draft. Creator only. Event StoreUnbound{store, cid}.