@idosgames/core 0.21.2 → 0.21.3
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/CHANGELOG.md +50 -0
- package/dist/{RealtimeSession-DV8nqoW9.d.ts → RealtimeSession-C5VICo95.d.ts} +210 -169
- package/dist/{RealtimeSession-EKLR1A0G.d.cts → RealtimeSession-wV_8qMas.d.cts} +210 -169
- package/dist/chunk-CS7ACWDY.js +1 -0
- package/dist/chunk-YEBYHDZG.js +2 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +2 -2
- package/dist/platform/index.cjs +2 -2
- package/dist/platform/index.d.cts +55 -1
- package/dist/platform/index.d.ts +55 -1
- package/dist/platform/index.js +1 -1
- package/dist/realtime/index.cjs +1 -1
- package/dist/realtime/index.d.cts +2 -2
- package/dist/realtime/index.d.ts +2 -2
- package/dist/realtime/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-76ZM4DUB.js +0 -1
- package/dist/chunk-DE75YD5H.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,56 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [0.21.3] - 2026-10-09
|
|
18
|
+
|
|
19
|
+
Crypto prices everywhere: a short crypto balance no longer just fails a purchase inside idosgames.com.
|
|
20
|
+
Additive — nothing that worked changes outside the site's frame.
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **Top-up, then charge.** A charge the engine refuses for a crypto shortfall
|
|
25
|
+
(`CC {id}: insufficient balance (have …, need …)` — any module: store, lootbox, craft, marketplace,
|
|
26
|
+
PvP, …) goes to the top-up handler, and the transport sends the SAME request again, once, after the
|
|
27
|
+
deposit is credited. The refusal that was paid for raises no `error:global`; the request is not
|
|
28
|
+
"busy" while the player is in the payment window.
|
|
29
|
+
- Inside idosgames.com's frame the handler installs itself: the site's own deposit window opens on
|
|
30
|
+
the missing amount (`requestPlatformTopUp`, messages `IDOS_PLATFORM_TOPUP_REQUEST` / `_RESPONSE`),
|
|
31
|
+
then crypto balances are re-read and the purchase repeats. The site deposits only to its own
|
|
32
|
+
session's account, which must be the game's player.
|
|
33
|
+
- Outside the site the game's own wallet does it: `useWalletTopUp` + `LazyWalletPanel topUp`
|
|
34
|
+
in `@idosgames/wallet` 0.6.3, mounted by the base through `createBaseModule({ WalletTopUp })`
|
|
35
|
+
(`@idosgames/app-shell` 0.12.2); any other handler: `client.checkout.setTopUpHandler(fn)`.
|
|
36
|
+
- `client.checkout.topUpAvailable` — keep a "buy" button with a crypto price enabled when true;
|
|
37
|
+
`client.checkout.shortfallFromError(error)` / `cryptoShortfallFromError`; `CryptoShortfall.missingAmount`
|
|
38
|
+
(exact decimal string); event `checkout:topUpFailed`.
|
|
39
|
+
- `client.blockchain.getDefinitions(opts?)` goes through the central cache by the config version
|
|
40
|
+
(section `Blockchain:Definitions`, kept in storage like other sections): concurrent readers share
|
|
41
|
+
one request, a repeat read asks nothing; `{ forceRefresh: true }` before moving money.
|
|
42
|
+
- Re-reads after a top-up go by revision: `cache.ensureState(["InventoryV2"], { force: true })`.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- Sections fetched outside the config projection survived a sign-in with a NEW config version in the
|
|
47
|
+
same page (stale until a reload): they are now cleared when the version changes.
|
|
48
|
+
- A collection trade (`sendTradeOffer` / `cancelTradeOffer` / `acceptTradeOffer` / `declineTradeOffer`)
|
|
49
|
+
froze the player's `Collection` in the cache: the reply carries the container's new revision but not
|
|
50
|
+
its data, so the old copy passed as fresh and a versioned read returned nothing. The container is now
|
|
51
|
+
marked for a full re-read (`cache.invalidateState`).
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- More reads go through the central cache: `gameLoop.getBoardDefinition` by the config version (kept
|
|
56
|
+
under it in storage), `quest.getUserQuestState` as a view by the `Quest` / `EventToken` revisions
|
|
57
|
+
(expires at the nearest cycle end; `forceRefresh` asks anyway). Both take `ReadOptions`.
|
|
58
|
+
- `cache.invalidateState(containers)` — for an action that changed containers without bringing them.
|
|
59
|
+
|
|
60
|
+
### Added (continued)
|
|
61
|
+
|
|
62
|
+
- `askPlatformPage` — the one game ↔ site request/answer bridge (moved here from `@idosgames/wallet`),
|
|
63
|
+
`PLATFORM_BRIDGE_ACK`, `PLATFORM_PAGE_UNAVAILABLE`, `canUsePlatformTopUp`.
|
|
64
|
+
- `CryptoCurrencyDefinition`: `PlayerTradeFeePercent` (developer fee on crypto moving between players),
|
|
65
|
+
`UsdPriceRefreshMinutes` (the title token's own USD price refresh rate, paid plans).
|
|
66
|
+
|
|
17
67
|
## [0.21.2] - 2026-10-05
|
|
18
68
|
|
|
19
69
|
The model follows the backend rename (rolled out 05.10.2026). Patch, not minor: the server no longer
|