Files
amethyst/.claude
Claude 95e79db425 feat(nip15): read marketplace events leniently and tell them from other apps' records
Relays hold NIP-15 bodies far looser than the spec: prices as strings,
durations as floats, `shipping` as an object, missing ids, and other apps'
JSON on the same kinds (a typing game on 30017, offers on 30019, encrypted
blobs on 30020). The strict kotlinx decoders dropped the whole body on the
first surprise.

- Nip15Json reads each field on its own: a bad field is null, a non-object
  body is null, nothing throws. Stall, product, marketplace, auction and bid
  confirmation data classes now have nullable fields; the id falls back to
  the `d` tag the spec makes equal to it.
- AuctionData.read fills a body's gaps from the tag form auction apps
  publish (title/name, summary, image, starting_bid/start_price, currency,
  start_date/start_time, duration/end_time), so hash21/mkauction auctions
  read too. AuctionData.endsAt() adds the merchant's extensions.
- Every NIP-15 event caches its parse (a failure included) and gains
  isWellFormed(): a stall/product/auction has a name, a market a name or
  merchants, a bid an auction and an amount, a confirmation a status and a
  bid. Product/auction stallAddress() names the 30017 they are sold from.
- Bid confirmations read the spec's `duration_extended` (and the
  `duration_extension` Quartz used to write) and write the spec's name.
- Tag-form auctions now index their title and summary: golden regenerated,
  searchable-kinds.md updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015aYRQWCjecNq2owE1gcSUw
2026-10-13 19:41:12 +00:00
..