Skip to content

Releases: networked-art/cryptopunks

@networked-art/punks-sdk@0.1.0

05 Jun 16:31
89bfba9

Choose a tag to compare

Minor Changes

  • 01edc56 Thanks @jwahdatehagh! - Add addressLabel / addressForLabel for curated, non-ENS address labels.

    • addressLabel(address) returns an AddressLabel ({ short, name }) for a
      known address, or undefined. Checksum-insensitive. short is the compact
      form for inline display (e.g. NODE); name is the full name for headings
      and tooltips (e.g. NODE FOUNDATION).
    • addressForLabel(text) is the reverse: it resolves either label form (short
      or full) to its address, case- and punctuation-insensitively — for resolving
      a typed label to an account in search.
    • Hand-curated seeds: NODE FOUNDATION and YUGALABS (in address-labels.ts).
    • Curated-collection institutions are the single source of truth for their own
      label: CuratedCollectionInstitution gains an optional address (drives the
      label) and an optional short (compact badge form, defaulting to the slug
      uppercased). addressLabel derives { short, name: title } for any
      institution that declares an address. No addresses are bundled yet; add
      verified ones to the institution entries in search-collections.json.
  • 65bf873 Thanks @jwahdatehagh! - Add an optional per-Punk sourceTemplate to curated collections, plus forPunk
    and matches lookups for surfacing collections in a UI.

    • A collection (or an institution) may set sourceTemplate — a URL with an
      {id} placeholder (e.g. https://museumpunks.com/{id}) — to deep-link a
      single Punk on the curating site. Optional and validated; source is
      unchanged.
    • punks.collections.forPunk(id) returns the collections a Punk belongs to,
      each with the institutions that hold it and a resolved sourceUrl (the most
      specific sourceTemplate filled with the id, else the institution / collection
      source). Ids outside 0..9999 return [].
    • punks.collections.matches(text) returns every collection (optionally
      narrowed to one institution) whose alias appears anywhere in a phrase, for
      surfacing an explainer alongside a search.
    • New CuratedCollectionMembership and CuratedCollectionMatch types;
      sourceTemplate? added to CuratedCollection and CuratedCollectionInstitution.
  • 0c4bac3 Thanks @jwahdatehagh! - Add an optional standard to createPunksSdk (and the offline data client) that
    scopes curated collections to a single Punk standard.

    • When set, only collections of that standard resolve in text search; an alias
      of any other standard falls through to a literal trait lookup. The
      collections facade (list / get / has) is scoped to match. Left unset,
      every collection resolves — the default, so existing behavior is unchanged.
    • parseSearchText takes a matching { standard } option.
    • The standalone searchCollections / getSearchCollection exports stay global.
  • 37e2007 Thanks @jwahdatehagh! - Every ContractWritePlan now carries a kind discriminator.

    • New required kind: PlanKind field on ContractWritePlan, a string-literal
      union 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.
    • PlanKind is exported alongside the existing action types. Plans built
      through the SDK gain the field automatically.
  • 37e2007 Thanks @jwahdatehagh! - Add the native bidding surface to PunksMarketClient.

    • bid(punkId) reads the current punkBids entry into a new PunkMarketBid
      ({ punkId, hasBid, bidder, valueWei }).
    • enterBid, acceptBid, and withdrawBid (each with a prepare* variant)
      wrap enterBidForPunk, acceptBidForPunk, and withdrawBidForPunk on the
      canonical CryptoPunksMarket.
  • #7 5510214 Thanks @seanbonner! - Add a curated-collections layer: named, sourced sets of Punk ids that resolve
    in search and through a lookup API. Ships the on-chain burned set (12 Punks)
    in a new bundled search-collections.json.

    • punks.search({ text: 'burned punks' }) resolves whole-phrase collection
      aliases to their id set via the existing includeIds path, composing with
      the rest of the query (burned alien, burned OR alien). Quoting opts back
      out to a literal trait lookup.
    • punks.collections.list() / .get(slug) / .has(slug) expose the sets for
      UI, each with { slug, title, description, aliases, source, standard, ids }.
      Standalone searchCollections and getSearchCollection are also exported.
    • New CuratedCollection type. normalizePunkStandard and the PunkStandardRef
      type are unchanged for consumers (re-exported from their previous module).

    By @seanbonner.

  • #8 691ac11 Thanks @seanbonner! - Add the museum curated collection (16 Punks across 6 institutions) with
    searchable per-institution sub-sets.

    • punks.search({ text: 'museum punks' }) returns the whole institution-held
      set; search('MOMA'), search('zkm'), search('museum of modern art'),
      etc. each resolve to just that institution's Punks.
    • A collection may now nest institutions, each independently resolvable. The
      collection's ids is the union of its institutions, and the deep-freeze of
      the bundle extends to them. New CuratedCollectionInstitution type;
      punks.collections.get('museum') includes the institutions array.
    • Source data is MoMA, ZKM Karlsruhe, LACMA, Centre Pompidou, ICA Miami, and
      Toledo Museum of Art (museumpunks.com). Two of the museum Punks (#2838,
      #5449, both ZKM) are also in the burned set.

    By @seanbonner.

  • #9 5253171 Thanks @seanbonner! - Add the perfect-and-priceless curated collection: the 24 Punks printed and
    shown in Kate Vass Galerie's 2018-2019 "Perfect & Priceless" exhibition, each
    framed print backed by its seed phrase sealed in an envelope.

    • Resolves under every name the set is known by — perfect & priceless,
      perfect and priceless, kate vass, kate vass galerie, paper punks,
      paper.
    • The collection alias matcher now skips punctuation-only tokens, so the &
      spelling of a name matches the same set as the spelled-out form.

    By @seanbonner.

  • 37e2007 Thanks @jwahdatehagh! - Add a @networked-art/punks-sdk/similarity entry point: an in-memory index
    that scores how alike two Punks are and surfaces look-alikes and
    recommendations from a set of likes and dislikes.

    • createPunksSimilarity / PunkSimilarityIndex build over the offline
      dataset (optionally including per-pixel data). score(a, b) returns a 0–1
      score, components(a, b) its breakdown across type, head, accessories,
      colors, scalar traits, and (when available) pixels, and explain(a, b) the
      shared / 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. Both
      take a profile (balanced | traits | visual | colors) or explicit
      weights, plus filter / excludeIds / includeSelf / limit /
      minScore / diversify.
    • New types: PunkSimilarityProfile, PunkSimilarityComponents,
      PunkSimilarityWeights, PunkSimilarityOptions,
      PunkSimilarityRecommendOptions, PunkSimilarityResult,
      PunkSimilarityScalarDelta, PunkSimilarityExplanation, and
      PunksSimilarityConfig.
  • 37e2007 Thanks @jwahdatehagh! - PunksAuction and its escrow are deployed on mainnet; wire up their addresses
    and round out the auction client.

    • New PUNKS_AUCTION_ADDRESS and PUNKS_AUCTION_ESCROW_ADDRESS constants.
      PunksAuctionClient now defaults to the live address (so address is
      optional in config but always set) and adds the deployed reads
      escrowAddress(), punksDataAddress(), activeLotFor({ seller, standard, punkId }), and balanceOf(account); vaultFactoryAddress() now reads
      VAULTS.
    • Combined create-and-execute flows createLotAndAcceptOffer and
      createLotAndStartAuction (mirrored on the SDK facade as createLotAndAccept
      / createLotAndStartAuction), plus clearStaleLots(ids) and withdraw() for
      ETH credited afte...
Read more