@moneypot/hub 1.19.16 → 1.20.0-dev.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.
- package/README.md +26 -0
- package/dist/dashboard/assets/index-Gvpn1nS9.js +350 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/src/audit-log.d.ts +9 -9
- package/dist/src/audit-log.js +7 -1
- package/dist/src/config.js +4 -8
- package/dist/src/db/public.d.ts +8 -8
- package/dist/src/db/public.js +29 -7
- package/dist/src/db/transaction.d.ts +2 -5
- package/dist/src/db/transaction.js +0 -1
- package/dist/src/db/types.d.ts +11 -2
- package/dist/src/db/util.d.ts +1 -3
- package/dist/src/deprecated.d.ts +6 -0
- package/dist/src/deprecated.js +2 -0
- package/dist/src/hash-chain/plugins/hub-create-hash-chain.js +12 -12
- package/dist/src/index.d.ts +7 -2
- package/dist/src/index.js +4 -0
- package/dist/src/liability/internal/db.d.ts +8 -0
- package/dist/src/liability/internal/db.js +27 -0
- package/dist/src/liability/internal/index.d.ts +2 -0
- package/dist/src/liability/internal/index.js +2 -0
- package/dist/src/liability/internal/processor.d.ts +12 -0
- package/dist/src/liability/internal/processor.js +123 -0
- package/dist/src/liability/public/config.d.ts +36 -0
- package/dist/src/liability/public/config.js +12 -0
- package/dist/src/liability/public/db.d.ts +10 -0
- package/dist/src/liability/public/db.js +53 -0
- package/dist/src/liability/public/index.d.ts +2 -0
- package/dist/src/liability/public/index.js +1 -0
- package/dist/src/liability/types.d.ts +24 -0
- package/dist/src/liability/types.js +1 -0
- package/dist/src/migrations.js +2 -2
- package/dist/src/pg-versions/017-liability.sql +48 -0
- package/dist/src/plugins/hub-make-outcome-bet.js +4 -4
- package/dist/src/plugins/hub-risk-limits.js +1 -1
- package/dist/src/risk-policy.d.ts +2 -2
- package/dist/src/risk-policy.js +3 -3
- package/dist/src/server/index.d.ts +4 -2
- package/dist/src/server/index.js +14 -3
- package/dist/src/test/index.d.ts +7 -6
- package/dist/src/test/index.js +7 -2
- package/dist/src/util.d.ts +5 -0
- package/package.json +10 -11
- package/dist/dashboard/assets/index-QbfKgHTj.js +0 -350
package/README.md
CHANGED
|
@@ -77,6 +77,32 @@ insert into hub.api_key default values returning key;
|
|
|
77
77
|
|
|
78
78
|
You should always keep your hub server up to date as soon as possible. Never install an old, intermediate version: it may leave you without an automatic upgrade path.
|
|
79
79
|
|
|
80
|
+
### 1.20.x
|
|
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`
|
|
105
|
+
|
|
80
106
|
### 1.19.x
|
|
81
107
|
|
|
82
108
|
- All of hub's internal graphql-schema-modifying plugins have been moved to hub's set of required plugins.
|