Version Packages#10
Open
github-actions[bot] wants to merge 1 commit into
Open
Conversation
eb4afab to
77f006a
Compare
77f006a to
f2895ff
Compare
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
@networked-art/punks-sdk@0.1.0
Minor Changes
01edc56Thanks @jwahdatehagh! - AddaddressLabel/addressForLabelfor curated, non-ENS address labels.addressLabel(address)returns anAddressLabel({ short, name }) for aknown address, or
undefined. Checksum-insensitive.shortis the compactform for inline display (e.g.
NODE);nameis the full name for headingsand tooltips (e.g.
NODE FOUNDATION).addressForLabel(text)is the reverse: it resolves either label form (shortor full) to its address, case- and punctuation-insensitively — for resolving
a typed label to an account in search.
address-labels.ts).label:
CuratedCollectionInstitutiongains an optionaladdress(drives thelabel) and an optional
short(compact badge form, defaulting to the sluguppercased).
addressLabelderives{ short, name: title }for anyinstitution that declares an
address. No addresses are bundled yet; addverified ones to the institution entries in
search-collections.json.65bf873Thanks @jwahdatehagh! - Add an optional per-PunksourceTemplateto curated collections, plusforPunkand
matcheslookups for surfacing collections in a UI.sourceTemplate— a URL with an{id}placeholder (e.g.https://museumpunks.com/{id}) — to deep-link asingle Punk on the curating site. Optional and validated;
sourceisunchanged.
punks.collections.forPunk(id)returns the collections a Punk belongs to,each with the institutions that hold it and a resolved
sourceUrl(the mostspecific
sourceTemplatefilled with the id, else the institution / collectionsource). Ids outside0..9999return[].punks.collections.matches(text)returns every collection (optionallynarrowed to one institution) whose alias appears anywhere in a phrase, for
surfacing an explainer alongside a search.
CuratedCollectionMembershipandCuratedCollectionMatchtypes;sourceTemplate?added toCuratedCollectionandCuratedCollectionInstitution.0c4bac3Thanks @jwahdatehagh! - Add an optionalstandardtocreatePunksSdk(and the offline data client) thatscopes curated collections to a single Punk standard.
textsearch; an aliasof any other standard falls through to a literal trait lookup. The
collectionsfacade (list/get/has) is scoped to match. Left unset,every collection resolves — the default, so existing behavior is unchanged.
parseSearchTexttakes a matching{ standard }option.searchCollections/getSearchCollectionexports stay global.37e2007Thanks @jwahdatehagh! - EveryContractWritePlannow carries akinddiscriminator.kind: PlanKindfield onContractWritePlan, a string-literalunion naming every prepared transaction across the canonical market, the
auction, the vault, the stash, the C721 / legacy / V1 wrappers, and the V1
market — so a UI can branch on the action without parsing
description.PlanKindis exported alongside the existing action types. Plans builtthrough the SDK gain the field automatically.
37e2007Thanks @jwahdatehagh! - Add the native bidding surface toPunksMarketClient.bid(punkId)reads the currentpunkBidsentry into a newPunkMarketBid(
{ punkId, hasBid, bidder, valueWei }).enterBid,acceptBid, andwithdrawBid(each with aprepare*variant)wrap
enterBidForPunk,acceptBidForPunk, andwithdrawBidForPunkon thecanonical
CryptoPunksMarket.#7
5510214Thanks @seanbonner! - Add a curated-collections layer: named, sourced sets of Punk ids that resolvein search and through a lookup API. Ships the on-chain
burnedset (12 Punks)in a new bundled
search-collections.json.punks.search({ text: 'burned punks' })resolves whole-phrase collectionaliases to their id set via the existing
includeIdspath, composing withthe rest of the query (
burned alien,burned OR alien). Quoting opts backout to a literal trait lookup.
punks.collections.list()/.get(slug)/.has(slug)expose the sets forUI, each with
{ slug, title, description, aliases, source, standard, ids }.Standalone
searchCollectionsandgetSearchCollectionare also exported.CuratedCollectiontype.normalizePunkStandardand thePunkStandardReftype are unchanged for consumers (re-exported from their previous module).
By @seanbonner.
#8
691ac11Thanks @seanbonner! - Add themuseumcurated collection (16 Punks across 6 institutions) withsearchable per-institution sub-sets.
punks.search({ text: 'museum punks' })returns the whole institution-heldset;
search('MOMA'),search('zkm'),search('museum of modern art'),etc. each resolve to just that institution's Punks.
institutions, each independently resolvable. Thecollection's
idsis the union of its institutions, and the deep-freeze ofthe bundle extends to them. New
CuratedCollectionInstitutiontype;punks.collections.get('museum')includes theinstitutionsarray.Toledo Museum of Art (museumpunks.com). Two of the museum Punks (#2838,
#5449, both ZKM) are also in the
burnedset.By @seanbonner.
#9
5253171Thanks @seanbonner! - Add theperfect-and-pricelesscurated collection: the 24 Punks printed andshown in Kate Vass Galerie's 2018-2019 "Perfect & Priceless" exhibition, each
framed print backed by its seed phrase sealed in an envelope.
perfect & priceless,perfect and priceless,kate vass,kate vass galerie,paper punks,paper.&spelling of a name matches the same set as the spelled-out form.
By @seanbonner.
37e2007Thanks @jwahdatehagh! - Add a@networked-art/punks-sdk/similarityentry point: an in-memory indexthat scores how alike two Punks are and surfaces look-alikes and
recommendations from a set of likes and dislikes.
createPunksSimilarity/PunkSimilarityIndexbuild over the offlinedataset (optionally including per-pixel data).
score(a, b)returns a 0–1score,
components(a, b)its breakdown across type, head, accessories,colors, scalar traits, and (when available) pixels, and
explain(a, b)theshared / only-A / only-B traits and colors plus per-axis scalar deltas behind
that score.
similar(punkId, options)ranks the rest of the collection;recommend({ liked, disliked, ... })blends multiple seeds with a dislike penalty. Bothtake a
profile(balanced|traits|visual|colors) or explicitweights, plusfilter/excludeIds/includeSelf/limit/minScore/diversify.PunkSimilarityProfile,PunkSimilarityComponents,PunkSimilarityWeights,PunkSimilarityOptions,PunkSimilarityRecommendOptions,PunkSimilarityResult,PunkSimilarityScalarDelta,PunkSimilarityExplanation, andPunksSimilarityConfig.37e2007Thanks @jwahdatehagh! -PunksAuctionand its escrow are deployed on mainnet; wire up their addressesand round out the auction client.
New
PUNKS_AUCTION_ADDRESSandPUNKS_AUCTION_ESCROW_ADDRESSconstants.PunksAuctionClientnow defaults to the live address (soaddressisoptional in config but always set) and adds the deployed reads
escrowAddress(),punksDataAddress(),activeLotFor({ seller, standard, punkId }), andbalanceOf(account);vaultFactoryAddress()now readsVAULTS.Combined create-and-execute flows
createLotAndAcceptOfferandcreateLotAndStartAuction(mirrored on the SDK facade ascreateLotAndAccept/
createLotAndStartAuction), plusclearStaleLots(ids)andwithdraw()forETH credited after a failed direct payout.
adjustOfferAmountnow takes an absolutenewAmountWeiand reads the currentoffer on-chain to size
msg.value(previously{ amountWei, increase }).New
@networked-art/punks-sdk./auctionhelpers mirroring the contract:the
PUNKS_AUCTION_*constants (MAX_LOT_ITEMS,MAX_INSTANT_ITEMS,MAX_OFFER_SLOTS,MAX_SLOT_IDS,TOTAL_WEIGHT_BPS,BID_INCREASE_BPS,BPS,DURATION_SECONDS,BIDDING_GRACE_SECONDS),minPunksAuctionBidWei,splitPunksAuctionLotWeights,punksAuctionOfferSlotMatchesPunk,punksAuctionLotMatchesOffer,isPunksFilterEmpty, and thePunksAuctionLotLike/PunksAuctionOfferLiketypes. Lot and offer buildersnow enforce these bounds.
Thanks @yougogirldoteth!
37e2007Thanks @jwahdatehagh! - Add aPunksVaultclient so the EOA controlling a vault can drivenative-market actions on vaulted Punks without first reclaiming them.
PUNKS_VAULT_FACTORY_ADDRESSandPUNKS_VAULT_FACTORY_START_BLOCKconstants for the
PunksVaultFactorythat deploys deterministic per-uservault clones.
createPunksVaultClient/PunksVaultClient(andPunksVaultFacade.at(address))prepare plans that target the vault and forward to the canonical
CryptoPunksMarket(or any market passed per call):prepareList/prepareUnlist,prepareTransferPunk,prepareAcceptBid, andprepareWithdrawFromMarket/prepareWithdrawFromMarketTo.PunksVaultClientConfigandPunksVaultConfigtypes.37e2007Thanks @jwahdatehagh! - An unquoted query that exactly names a trait now matches that trait exactly.punks.search({ text: 'Dark Hair' })behaves like"Dark Hair": when thewhole query is the exact name of a trait it folds to that single trait
instead of fuzzy-matching each word. Partial or compound queries still take
the substring path.
parseSearchTextWithExactTraitsSync, so the same text round-trips to the samecriteria in both search and offers.
By @yougogirldoteth.
37e2007Thanks @jwahdatehagh! - Numeric search constraints accept spelled-out numbers.<n> attributes/colors/pixels(and the range and comparator forms)now accept
zerothroughsevenas words, sofive attributesparses thesame as
5 attributes.By @yougogirldoteth.
37e2007Thanks @jwahdatehagh! - Add a folk-synonym layer to search: human phrases rewrite to canonical traitsearch text before the query is compiled.
search-synonyms.jsonmaps user-facing phrases (e.g.velma,ringo starr,sunglasses) to normal search text, sopunks.search({ text: 'sunglasses' })resolves toshades. Multi-word keysmatch greedily (the longest phrase wins) and a quoted term still passes
through as a literal trait lookup.
searchSynonymswith aSearchSynonymsMaptype. Synonyms expandafter curated collections resolve, so collection id sets and trait phrases
never collide.
Thanks @seanbonner!
37e2007Thanks @jwahdatehagh! - Search text and offer criteria now support general trait OR groups.formatSearchTextemits a general any-of trait mask as a quotedA OR Blist (it previously threw for anything but skin-tone, female / male, or
attribute-count groups), and rejects only the cases that genuinely cannot
round-trip (a generic OR list combined with other criteria).
when each alternative resolves to one trait; offer-slot compilation otherwise
materializes an explicit id set (capped at 64) when criteria can't compress.
This fixes curated-collection offer slots, which resolve to id sets.
By @yougogirldoteth.