@moneypot/hub 1.20.0-dev.4 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -23
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -79,29 +79,14 @@ You should always keep your hub server up to date as soon as possible. Never ins
79
79
 
80
80
  ### 1.20.x
81
81
 
82
- Introduces a way to represent the part of a bankroll that is reserved by pending multi-stage games.
83
-
84
- Example
85
-
86
- 1. Player starts a mines game with a max potential payout of $100
87
- 2. Operator calls `dbCreateLiability({ refType: "MINES", refId: game.id, maxPayout: 100, ... })`
88
- - Hub adds 100 to `hub.bankroll.liability`
89
- 3. (Some time later...)
90
- 4. Game ends and player wins or loses
91
- 5. Operator calls `dbResolveLiability({ refType: "MINES", refId: game.id })`
92
-
93
- Changes
94
-
95
- - New column `hub.bankroll.liability`
96
- - Available bankroll = `amount - liability`
97
- - New table `hub.liability`
98
- - Triggers an update in `hub.bankroll.liability` when created/modified
99
- - Various type renames including
100
- - `DbBalance` -> `DbPlayerBalance`
101
- - `DbBankroll` -> `DbHouseBankroll`
102
- - More specific return types
103
- - `dbLockedHouseBankroll(): DbHouseBankroll` -> `DbLockedHouseBankrollWithAvailable` (has `grossAmount` and `available` field to help you avoid mistaking amount vs available)
104
- - `dbLockedPlayerBalance(): DbPlayerBalance` -> `DbLockedPlayerBalance`
82
+ Adds liability tracking for multistage games (mines, crash, etc.) that lock up bankroll before resolution.
83
+
84
+ - (DB migration) New `hub.bankroll.liability` column
85
+ - (DB migration) New `hub.liability` table (each row ties to a game row like `app.mines_game`)
86
+ - `dbCreateLiability()` to reserve bankroll when a game starts, `dbResolveLiability()` to release it when it ends
87
+ - Available bankroll = `amount - liability`
88
+ - Type renames: `DbBalance` `DbPlayerBalance`, `DbBankroll` → `DbHouseBankroll`
89
+ - `dbLockedHouseBankroll()` now returns `DbLockedHouseBankrollWithAvailable` (has `available` field)
105
90
 
106
91
  ### 1.19.x
107
92
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneypot/hub",
3
- "version": "1.20.0-dev.4",
3
+ "version": "1.20.0",
4
4
  "author": "moneypot.com",
5
5
  "homepage": "https://moneypot.com/hub",
6
6
  "keywords": [