Skip to content

flaverw/winamax-replay-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winamax-replay-parser

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).

How it works

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:

  1. extracts the id and derives that path (handPath),
  2. 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),
  3. normalises it into a usable hand (parseWinamaxHand).

Install

npm install   # no runtime dependencies

Usage

import { 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

API

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+)

Tests

npm test

Tests 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.

Notes

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.

License

© 2026 Flavien Verwaerde — All rights reserved. See LICENSE (proprietary, evaluation only).

About

Parse the public JSON of a shared hand from the Winamax replayer into a normalised hand

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors