@idosgames/core 0.21.3 → 0.21.5

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 CHANGED
@@ -14,6 +14,37 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
14
14
 
15
15
  ## [Unreleased]
16
16
 
17
+ ## [0.21.5] - 2026-10-10
18
+
19
+ Daily caps on crypto rewards are the publisher's own setting now. Additive — nothing that worked changes.
20
+
21
+ ### Added
22
+
23
+ - `CryptoServerGrantPolicy.RefuseOverCap` (optional boolean) in the title config model. With a daily
24
+ reward cap set (`PerPlayerDailyTokens` / `TitleDailyTokens`), `true` makes the engine refuse a reward
25
+ over the cap with `CRYPTO_SERVER_GRANT_CAP_EXCEEDED:{currency}` instead of granting it as the
26
+ currency's IOU (the default). Both caps and this choice are editable for the title token (Main) too.
27
+ - `@idosgames/react` 0.4.6: `errorText()` (`@idosgames/react/ui`) turns that refusal into
28
+ "Today's reward limit is reached — come back tomorrow" / «Суточный лимит наград исчерпан — приходите
29
+ завтра» instead of showing the raw code.
30
+
31
+ ## [0.21.4] - 2026-10-09
32
+
33
+ A 429 now waits exactly as long as the server says. Backwards-compatible: against an older server
34
+ nothing changes.
35
+
36
+ ### Changed
37
+
38
+ - **Server-named wait on 429.** The engine and the site backend (since 2026-10-09: token buckets
39
+ instead of "ban the address for 999 s") answer 429 with `RetryAfterMs` in the body (readable
40
+ cross-origin) and a `Retry-After` header. The transport sleeps exactly that (+ up to 250 ms jitter,
41
+ so players refused together do not return in the same millisecond) and retries — a quick second
42
+ tap on "upgrade" now goes through half a second later instead of failing.
43
+ - A named wait longer than 15 s (`MAX_RATE_LIMIT_WAIT_MS` — an address blocked for hammering) returns
44
+ at once as a `connection` failure "Too many requests — try again in N s", without retrying inside
45
+ the block (that only prolonged it).
46
+ - A 429 that names nothing (Cloudflare's edge, an older server) keeps the old 1.5 / 4 / 6 s schedule.
47
+
17
48
  ## [0.21.3] - 2026-10-09
18
49
 
19
50
  Crypto prices everywhere: a short crypto balance no longer just fails a purchase inside idosgames.com.
@@ -146,7 +146,7 @@ type VirtualCurrencyDefinition = { CurrencyID: string; DisplayName?: null | stri
146
146
  type CryptoNetworkBinding = { NetworkID: string; ContractAddress?: null | string; Decimals?: null | number; MinWithdraw?: null | string; DepositsEnabled?: null | boolean; WithdrawalsEnabled?: null | boolean; [key: string]: unknown; };
147
147
  type CryptoLimits = { DailyWithdrawUsd?: null | string; MonthlyWithdrawUsd?: null | string; KycRequiredAboveUsd?: null | string; [key: string]: unknown; };
148
148
  type CryptoCurrencyPermissions = { DepositsEnabled?: null | boolean; WithdrawalsEnabled?: null | boolean; SpendableInGame?: null | boolean; ConvertibleToVirtual?: null | boolean; [key: string]: unknown; };
149
- type CryptoCurrencyDefinition = { CurrencyID: string; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; DisplayDecimals?: null | number; ValueInUSD?: null | string; ValueInUSDUpdatedAt?: null | string; UsdPriceRefreshMinutes?: null | number; DeveloperWithdrawalFeePercent?: null | string; CommunityMarketingWithdrawalFeePercent?: null | string; WithdrawalBurnPercent?: null | string; PlayerTradeFeePercent?: null | string; Networks?: null | Array<CryptoNetworkBinding>; Limits?: null | CryptoLimits; Permissions?: null | CryptoCurrencyPermissions; Conversion?: null | CurrencyConversion; Audit?: null | CurrencyAudit; Status?: null | 'Active' | 'Hidden' | 'Deprecated' | 'Maintenance'; ServerGrantPolicy?: null | { Mode?: null | string; FundingNetworkID?: null | string; PerPlayerDailyTokens?: null | number; TitleDailyTokens?: null | number; [key: string]: unknown; }; UnbackedRewardCurrencyID?: null | string; [key: string]: unknown; };
149
+ type CryptoCurrencyDefinition = { CurrencyID: string; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; DisplayDecimals?: null | number; ValueInUSD?: null | string; ValueInUSDUpdatedAt?: null | string; UsdPriceRefreshMinutes?: null | number; DeveloperWithdrawalFeePercent?: null | string; CommunityMarketingWithdrawalFeePercent?: null | string; WithdrawalBurnPercent?: null | string; PlayerTradeFeePercent?: null | string; Networks?: null | Array<CryptoNetworkBinding>; Limits?: null | CryptoLimits; Permissions?: null | CryptoCurrencyPermissions; Conversion?: null | CurrencyConversion; Audit?: null | CurrencyAudit; Status?: null | 'Active' | 'Hidden' | 'Deprecated' | 'Maintenance'; ServerGrantPolicy?: null | { Mode?: null | string; FundingNetworkID?: null | string; PerPlayerDailyTokens?: null | number; TitleDailyTokens?: null | number; RefuseOverCap?: null | boolean; [key: string]: unknown; }; UnbackedRewardCurrencyID?: null | string; [key: string]: unknown; };
150
150
  /** The title's currency catalog (config), returned by getCurrencyDefinitions(). */
151
151
  interface CurrencyDefinitions {
152
152
  VirtualCurrencies?: Record<string, VirtualCurrencyDefinition> | null;
@@ -146,7 +146,7 @@ type VirtualCurrencyDefinition = { CurrencyID: string; DisplayName?: null | stri
146
146
  type CryptoNetworkBinding = { NetworkID: string; ContractAddress?: null | string; Decimals?: null | number; MinWithdraw?: null | string; DepositsEnabled?: null | boolean; WithdrawalsEnabled?: null | boolean; [key: string]: unknown; };
147
147
  type CryptoLimits = { DailyWithdrawUsd?: null | string; MonthlyWithdrawUsd?: null | string; KycRequiredAboveUsd?: null | string; [key: string]: unknown; };
148
148
  type CryptoCurrencyPermissions = { DepositsEnabled?: null | boolean; WithdrawalsEnabled?: null | boolean; SpendableInGame?: null | boolean; ConvertibleToVirtual?: null | boolean; [key: string]: unknown; };
149
- type CryptoCurrencyDefinition = { CurrencyID: string; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; DisplayDecimals?: null | number; ValueInUSD?: null | string; ValueInUSDUpdatedAt?: null | string; UsdPriceRefreshMinutes?: null | number; DeveloperWithdrawalFeePercent?: null | string; CommunityMarketingWithdrawalFeePercent?: null | string; WithdrawalBurnPercent?: null | string; PlayerTradeFeePercent?: null | string; Networks?: null | Array<CryptoNetworkBinding>; Limits?: null | CryptoLimits; Permissions?: null | CryptoCurrencyPermissions; Conversion?: null | CurrencyConversion; Audit?: null | CurrencyAudit; Status?: null | 'Active' | 'Hidden' | 'Deprecated' | 'Maintenance'; ServerGrantPolicy?: null | { Mode?: null | string; FundingNetworkID?: null | string; PerPlayerDailyTokens?: null | number; TitleDailyTokens?: null | number; [key: string]: unknown; }; UnbackedRewardCurrencyID?: null | string; [key: string]: unknown; };
149
+ type CryptoCurrencyDefinition = { CurrencyID: string; DisplayName?: null | string; AssetPaths?: null | Record<string, string>; DisplayDecimals?: null | number; ValueInUSD?: null | string; ValueInUSDUpdatedAt?: null | string; UsdPriceRefreshMinutes?: null | number; DeveloperWithdrawalFeePercent?: null | string; CommunityMarketingWithdrawalFeePercent?: null | string; WithdrawalBurnPercent?: null | string; PlayerTradeFeePercent?: null | string; Networks?: null | Array<CryptoNetworkBinding>; Limits?: null | CryptoLimits; Permissions?: null | CryptoCurrencyPermissions; Conversion?: null | CurrencyConversion; Audit?: null | CurrencyAudit; Status?: null | 'Active' | 'Hidden' | 'Deprecated' | 'Maintenance'; ServerGrantPolicy?: null | { Mode?: null | string; FundingNetworkID?: null | string; PerPlayerDailyTokens?: null | number; TitleDailyTokens?: null | number; RefuseOverCap?: null | boolean; [key: string]: unknown; }; UnbackedRewardCurrencyID?: null | string; [key: string]: unknown; };
150
150
  /** The title's currency catalog (config), returned by getCurrencyDefinitions(). */
151
151
  interface CurrencyDefinitions {
152
152
  VirtualCurrencies?: Record<string, VirtualCurrencyDefinition> | null;