Turn a shared hand from the Winamax replayer into a clean, normalised hand object — players, stacks in big blinds, blinds/ante, button, hero cards, board, actions per street, winners. Dependency-free Node.js (ESM).
When a player shares a hand, the replayer loads a public JSON document from
Winamax's asset CDN. The hand id in the share link is YYYY-<64 hex>, and the
asset lives at:
https://poker-assets.winamax.<tld>/replayer/hand/YYYY/xx/yy/<hash>
where xx/yy are the first two byte-pairs of the hash. This package:
- extracts the id and derives that path (
handPath), - fetches the JSON server-side (
fetchHand— the CDN needs a browser User-Agent and is not CORS-enabled, so fetch it from a backend / proxy), - normalises it into a usable hand (
parseWinamaxHand).
npm install # no runtime dependenciesimport { parseWinamaxHand, fetchHand } from 'winamax-replay-parser';
// Server-side, from a share link:
const json = await fetchHand('https://www.winamax.fr/replayer/replayer.html?2026-…&lang=fr_FR');
const hand = parseWinamaxHand(json);
hand.bb; // 200
hand.heroCards; // ["Th","8c"]
hand.seats; // [{ seat, name, chips, bb }, …]
hand.buttonSeat; // dealer seat id
hand.rounds; // [{ street, actions:[{ name, action, bb }] }, …]
hand.winners; // [{ name, bb }]Already have the JSON? Skip the fetch and call parseWinamaxHand(json) directly.
npm run example # parses the bundled sample hand| Export | Purpose |
|---|---|
parseWinamaxHand(json) |
Normalise a replayer JSON document |
extractId(link) |
YYYY-<hex> from a link or raw id |
handPath(id) |
Asset path YYYY/xx/yy/<hash> |
handUrl(link) |
Full public asset URL |
fetchHand(link) |
Fetch + JSON-parse (Node 18+) |
npm testTests run against a synthetic sample hand (fictional player names — no real player data is shipped) and cover blinds/ante parsing, stacks in bb, button, hero, board, winners, and the link→path derivation.
This is a parser for a public format, for hand review / study purposes. It does not log in, scrape private data, or interact with a live table.
© 2026 Flavien Verwaerde — All rights reserved. See LICENSE (proprietary, evaluation only).