const Side, Sheets
Side is the number of sheets per map side; a collection is exactly Sheets tokens (CheckLaunch in the adapter).
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package pafta is a Sinopia engine: a collection of 256 map sheets that together form one large survey map (16 x 16 sh...
Package pafta is a Sinopia engine: a collection of 256 map sheets that together form one large survey map (16 x 16 sheets). The terrain is one global field, so the edges of neighbouring sheets join exactly; every token is one sheet, with its own settlement, landmark and place name.
Fairness. The map and every token's sheet are fixed by the collection's final salt (core commit-reveal), which exists only after the sale closed and both secrets were revealed:
1mapSeed = sha256hex("art|pafta|map|v1|" + cid + "|" + salt)
2permKey = sha256hex("art|pafta|perm|v1|" + cid + "|" + salt)
3tile(tid) = media.Permute(permKey, 256, tid-1)
The token's own seed (core's safe.Seed(cid, tid, salt)) only chooses what is drawn on its sheet. Before Final nobody, the creator included, can tell which sheet a token will be or what the map looks like. Without a collection (core.RenderWith, Studio, the registration sample) a seed renders a "standalone" sheet of its own map (Standalone).
The adapter (r/…/engines/pafta) decides which of the two a call gets: only core's real TokenURI/TokenTraits call for a Final commit-reveal collection of this engine is placed.
frontend/src/engines/pafta.ts is a byte-identical TypeScript twin; pafta_test.gno and pafta.test.ts pin the same golden vectors. Pure integer maths: no floats, no time, no block data.
Side is the number of sheets per map side; a collection is exactly Sheets tokens (CheckLaunch in the adapter).
The map face of every sheet: a composite view crops each token's SVG to the box (MapX, MapY, MapSize) of the Width x Height sheet and lays the boxes edge to edge on the 16 x 16 grid.
Hash domains of the post-reveal map seed and sheet permutation.
DefaultParams is the canonical form of the defaults; it renders exactly like "".
MaxSVGBytes: see the size table in docs/engines/pafta.md.
1const ParamsSchema = `{"type":"object","properties":{` +
2 `"palette":{"type":"string","title":"Palette","enum":["Seeded","Survey","Atlas","Admiralty","Antique"],"default":"Seeded"},` +
3 `"landform":{"type":"string","title":"Landform","enum":["Seeded","Island","Archipelago","Mainland Coast","Inland Sea"],` +
4 `"default":"Seeded"}}}`ParamsSchema is the Studio form. Studio sends JSON.stringify of the values in this property order; ValidateParams accepts exactly that or "".
Manifest describes the engine. Author and FeeBps are set by the adapter.
MapSeed is collection cid's map seed for its final salt.
PermKey is collection cid's sheet permutation key for its final salt.
Render returns the SVG of a standalone sheet of in.Seed.
SheetCode is "A1" … "P16": row letter + column number.
SheetSVG is the full sheet of token seed at place p.
SheetTraits are the traits of token seed at place p, in TraitTypes order. It never renders.
Traits returns the eight traits of a standalone sheet of in.Seed.
ValidateParams accepts "" (the showcase defaults) and the canonical JSON.
Defaults is the showcase look (params "").
ParseParams accepts "" or the canonical JSON Studio produces, nothing else.
Placement is token tid (1..256) of a Final collection with salt salt.
Standalone is the placement of a seed without a collection: a sheet of the seed's own map, drawn among the sheets with land at their centre (any sheet when the map has none).