ExportOptions¶
Namespace Nfty.Core.Publish in assembly Nfty.Core.
Exactly what leaves the machine.
Remarks¶
Four independent axes, not a mode switch — the art, each of the two metadata sets, and the source book — because the reasons people share a collection do not line up into a ladder. A marketplace wants less than a buyer, who wants less than a collaborator, but a sealed review copy is not a point on that line at all.
Every member is init-only with a default, so a new axis is additive at every existing call site — the same rule the manifests follow for schema evolution.
The passphrase is deliberately NOT here. It is a parameter of the operation, not a property of the description: this record is the thing a front-end holds in a view model, binds to checkboxes, and would quite reasonably log or serialize while debugging. A secret that lives in it is a secret waiting to be written to disk by accident.
Constructors¶
ExportOptions()¶
Properties¶
CollectionImage¶
collection.json's image. Null falls to the first token's image address when a ExportOptions.ImageBaseUri is set and the art is exported, and is otherwise left out.
ExternalLink¶
collection.json's external_link: the collection's website.
ExternalUrlBase¶
When set, each item's external_url is this followed by its token id.
FeeRecipient¶
Who the royalty is paid to: 0x and 40 hexadecimal digits.
ImageBaseUri¶
Where the uploaded images/ folder lives. Each image link becomes this followed by the image's FILE NAME: ipfs://CID/ gives ipfs://CID/1.png.
Remarks
By file name, not by path inside the export: uploading the images/ folder to IPFS (Pinata, NFT.Storage, ipfs add -r) gives a CID whose root IS that folder's contents, so the right link has no images/ in it. It is also the only order that works: the metadata carries this address, so the art has to be uploaded (and addressed) first.
Export-only; the cooked Set keeps its relative paths. Must be absolute, use the scheme ipfs, https, http or ar, and end with / (MarketplaceRules.BaseUriProblem()). Never guessed or repaired. Null leaves the relative path and the plan says so.
Images¶
Include images/ — the generated art.
IncludeCollectionMetadata¶
Write collection.json, the contract-level metadata (OpenSea's contractURI shape).
Remarks
An axis of its own. It is not an item file and no Set contains it; the export makes it. On for ExportPreset.Marketplace, off elsewhere. The name and symbol come from the Set, the description from its metadata.
IncludeCookBook¶
Ship the source .cbk alongside the Set.
Remarks
A flag, with the PATH supplied to the operation — for the same reason the passphrase is. A Set records only its book's hash, never the book, so the caller is the one that knows which file is meant; but a preset has to be able to say "include it" without knowing where it lives, or ExportPreset.FullProject could not be a preset at all.
IncludeSetManifest¶
Include set.json — the Set's own record: seed, source-book hash, rarity table.
Remarks
On by default, off for ExportPreset.Marketplace: a public drop has no use for the seed and the book's hash, and a seed that should stay private until the reveal is otherwise published with the art. An export without it is for UPLOAD, not for opening — nfty reads a Set by its set.json, so it cannot reopen one, and a sealed export (which exists to be opened) refuses to leave it out.
ModelBaseUri¶
Where the uploaded models/ folder lives. Each animation_url becomes this followed by the model's file name: ipfs://CID/ gives ipfs://CID/1.glb.
Remarks
Same rules and reason as ExportOptions.ImageBaseUri. An animation_url is written only when this is set, the models are exported and their format is glb.
Models¶
Include models/ — the 3D model written for each asset at cook time.
Remarks
On by default, and on for ExportPreset.Marketplace too — a marketplace shows a glb animation_url as a 3D viewer, so the models are part of the listing, not an extra. A Set cooked without models has no models/, so the flag then changes nothing and the plan never mentions the part.
The models are copied as cooked and never re-rendered, so the debug mark (ExportOptions.NumberWatermark), which stamps only the art on the way out, cannot reach one: a model's texture is the unstamped asset.
NftyMetadata¶
Include nfty/ — per-asset DNA, the seed, and the color rolled on every layer.
Remarks
The axis with a consequence worth stating: this is the file that records HOW each asset came out the way it did. It is what a buyer wants and what a public listing has no use for.
Note¶
What the recipient should read first. Travels in the clear on a sealed export.
NumberWatermark¶
Stamp each asset's set number into a corner of its art.
Remarks
A debug mark, and it says so. Loose sprites lose their filenames the moment they are dragged into an engine, a sprite editor or a chat window, and a folder of five hundred near-identical characters is unsortable without one. The number stamped is the asset's own set number, so a stamped sprite cross-references nfty/NNNN.json with nothing else having to be recorded.
It is destructive, so it only ever happens on the way OUT. The export renders a stamped copy and ships that; the author's Set is never touched. A stamped export is for working with, not for minting - which is why it is a box you tick rather than part of any preset.
OpenSeaMetadata¶
Include metadata/ — the standards-pure ERC-721 / OpenSea fields.
RoyaltyPercent¶
Creator royalty, as a percentage from 0 to 100 with at most 2 decimals; null for none.
Remarks
Written as seller_fee_basis_points (2.5% is 250).
Sealed¶
Encrypt the export and mark it view-only.
Remarks
Orthogonal to the content axes on purpose — any of the four presets can be sealed, and a sealed export still has to decide what is inside it.
Shape¶
Folder or single file.
SpriteSheet¶
Also stitch every asset into one spritesheet.png.
Remarks
A fifth content axis, not a fifth shape. It travels with the export rather than replacing it — a sheet is what an engine loads and the numbered PNGs are what a marketplace mints, and a collection handed to a game developer usually wants both. So it is a checkbox beside the other four and not a preset, and it is the one entry in an export that does not exist on disk until the export makes it.
SpriteSheetColumns¶
Cells across the sheet, or null to fall to the squarest grid that fits.
Remarks
Null is a real answer and not a zero. Most people want "just lay it out", and asking two numbers of somebody who has no opinion is how a checkbox becomes a form. The default is SpriteSheet.Fit, and either number may be given alone — the other follows from the count.
SpriteSheetRows¶
Cells down the sheet, or null to derive it from the columns and the count.
TokenNaming¶
How the exported files are named — the Set's padded names, or bare token ids.
Remarks
Applies to metadata, image and model file names, the name inside the metadata and every URI. The rich nfty/ files keep the Set's own numbering and names: they are nfty's record of the Set, cross-referenced by set number, and are not what a marketplace reads.
TokenStart¶
The token id of the Set's first asset: 1 (the default) or 0, as the contract counts.
Remarks
Token id = set number - 1 + this.
WatermarkCorner¶
Which corner the stamp sits in.
Methods¶
For(ExportPreset)¶
The options a preset starts from.
Parameters
preset(ExportPreset) - Which one.
Returns. Ordinary options; change any of them afterward.
Exceptions
ArgumentOutOfRangeException-presetis not a defined preset.
MatchingPreset()¶
Which preset these options ARE, or null when they are a combination of the author's own.
Returns. The preset these options equal, or null.
Remarks
Answered by comparing content rather than by remembering which button was pressed, so a screen cannot go on claiming a preset after a box beneath it was unticked. The note is ignored: it is a message to a person, not part of the export's shape. So are the marketplace VALUES (base URI, naming, links, royalty): they fill in what a content axis writes, they do not choose what leaves. ExportPreset.Marketplace STARTS at token-id naming, but a different naming does not un-name it.
ExportOptions.Shape is ignored too, and that is the correction. A preset names WHAT LEAVES the machine; folder-or-file is how it is packed, and the two are separate questions — which is why the shape controls sit in their own column rather than among the content boxes. Comparing it meant every preset came un-named the moment the shape was changed: ticking all four content boxes and choosing Single file left Full project lit until the shape was touched and then lit nothing at all, and Marketplace did the same in the other direction, unnoticed because its default shape is the common one. The presets still START at a shape apiece (ExportPreset.FullProject at a folder, the rest at an archive), which is what a starting point is for.
They stay distinguishable without it: the four differ in content or in the seal, never in shape alone.
SummaryOf(ExportPreset)¶
One sentence saying who the preset is for. Stated in Core so the CLI's help and the GUI's tiles cannot describe the same choice differently.
Parameters
preset(ExportPreset) - Which one.
Returns. The sentence.
Exceptions
ArgumentOutOfRangeException-presetis not a defined preset.
TitleOf(ExportPreset)¶
The preset's name, as a person reads it.
Parameters
preset(ExportPreset) - Which one.
Returns. A short title.
Exceptions
ArgumentOutOfRangeException-presetis not a defined preset.