[ownership] Server-side deck ownership, collection API, 40-card eligibility (#57) #74

Merged
claude merged 2 commits from night2/ownership/collection into night/2026-11-17 2026-11-18 16:12:33 +00:00
2 Commits
Author SHA1 Message Date
claudeandClaude Opus 5.5 9943de3b53 [ownership] collectionRouter: optional injected duelCard hook (#57)
Attaches duel: DuelCard to collection cards when the server has a frozen
profile (requested by ui-duel); omitted while pending, never fetches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:02:50 -05:00
claudeandClaude Opus 5.5 fcdd05f2b1 [ownership] Server-side deck ownership, collection API, 40-card eligibility (#57)
- server/game/ownership.ts: verifyAccount, resolveDeck (token ids only; canonical
  owner in linked wallets, confirmations, exact deckSize, 4 copies per pageId,
  cards rebuilt from their block), collection (all linked wallets, paged at one
  tip, no 128-block cap). Signature agreed with host-pvp on #57.
- server/game/collection.ts: GET /api/game/collection (Dex bearer) with owned,
  playable, needed, eligible.
- account router exports accountVerifier; http.ts shares one AccountStore and
  DexKeys between the account and game routes and passes gameRouter({ownership}).
- App.tsx: My collection counts cards in every wallet linked to the account.
- tests/ownership-deck.test.ts: in-memory ledger fixture, no network.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 21:42:28 -05:00