Add curated-collections layer with burned set#7
Merged
jwahdatehagh merged 2 commits intoMay 28, 2026
Merged
Conversation
Named, sourced sets of Punk ids that resolve in search and through a lookup API, distinct from the trait-phrase synonym rewriter. - Bundle the on-chain `burned` set (12 Punks) in search-collections.json. - Resolve whole-phrase aliases (`burned punks`, `burned`) to their id set via the existing includeIds path, before synonym expansion. Quoting opts back out to a literal trait lookup. - Add `punks.collections` (list / get / has) plus standalone `searchCollections` and `getSearchCollection`, and a `CuratedCollection` type. - Move `normalizeName` / `normalizePunkStandard` to the leaf utils module so collections can reuse them without an import cycle; both stay re-exported from their previous module, so consumers are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jwahdatehagh
approved these changes
May 28, 2026
This was referenced May 28, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the first step of #6: a small curated-collections layer — named, sourced sets of Punk ids that resolve in search and through a lookup API. This PR ships the mechanism plus the objective on-chain
burnedset (12 Punks). Themuseumset follows in a second PR.This is deliberately distinct from
search-synonyms.json, which rewrites trait phrases and structurally can't express id sets. Collections resolve as a separate resolver that runs before synonym expansion, so the two never collide.What's in it
sdk/src/search-collections.json, bundled next tosearch-synonyms.json. Theburnedentry carriestitle/description/aliases/source/standard/ids.burned punks,burned,destroyed punks) resolves to the set via the existingPunksSearchQuery.ids/includeIdspath, so it composes with the rest of a query —burned alienintersects,burned OR alienunions. Matching is on by default; the trailingpunk(s)is optional; quoting ("burned") opts back out to a literal trait lookup.punks.collections.list()/.get(slug)/.has(slug), plus standalonesearchCollectionsandgetSearchCollection. NewCuratedCollectiontype. Getters return fresh copies, so callers can't mutate the bundle.Decisions on the RFC's open questions
burned(ids + title/description/source/standard) — no per-id provenance, keeping the first set objective and minimal.punks.search("burned punks")works with no flag, as in the RFC's headline example. Whole-phrase-only matching keeps free-text surprise low; happy to gate behind a query flag instead if you'd prefer.search-collections.jsonalongsidesearch-synonyms.json.One refactor
normalizeNameandnormalizePunkStandardmoved to the leafutilsmodule so the newcollectionsmodule can reuse them without an import cycle throughquery. Both stay re-exported from their previous module, so this is non-breaking for consumers.V1 / V2
Each collection carries a
standardfield (herev2→PunkStandard.CryptoPunks) so sets stay attributed to the right contract. Two burned Punks (#2838, #5449) are also ZKM museum acquisitions; the upcomingmuseumPR represents that overlap rather than flattening it.🤖 Generated with Claude Code