@idosgames/core 0.16.0 → 0.18.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/CHANGELOG.md CHANGED
@@ -14,6 +14,51 @@ and this project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.ht
14
14
 
15
15
  ## [Unreleased]
16
16
 
17
+ ## [0.18.0] - 2026-09-23
18
+
19
+ ### Added
20
+
21
+ - **Title login mode and play access by token balance** (`cfg.Blockchain.PlayAccess`):
22
+ `PlatformLoginResponse.PlayAccess`, `client.auth.playAccess` + `playAccess:changed`,
23
+ `playAccess:required` (a gameplay call refused with HTTP 403 `PLAY_ACCESS_REQUIRED` — not raised as
24
+ `error:global`), `client.auth.getAuthOptions()` (the mode before login),
25
+ `client.auth.linkWallet()`, `client.blockchain.getPlayAccess()` / `confirmPlayAccess()`,
26
+ `WalletGateBalanceSource.InGame`.
27
+ - **Session refresh by refresh token** (`Authentication/RefreshSession`). Logins now return
28
+ `RefreshToken`; the client keeps it (storage only when remembering), rotates it on every refresh,
29
+ and uses it FIRST on a 401 and on `autoLogin()`. Replaying the login method is the fallback. Any
30
+ remembered session comes back, wallet and Google included. The token is forgotten only on refusals
31
+ that mean it is dead (invalid/expired/revoked/reused/missing, banned) — a transient refusal keeps it.
32
+
33
+ ### Removed
34
+
35
+ - `BlockchainWalletLoginPolicy.TokenGates` — token requirements live in `PlayAccess` only.
36
+
37
+ ## [0.17.0] - 2026-09-23
38
+
39
+ A game on the SDK can now hand idosgames.com a frame of itself for the site's **Shot** button
40
+ ("take a shot and share"). The request comes from the parent page, so the same release gives every
41
+ game↔site bridge ONE list of platform origins instead of a copy per bridge.
42
+
43
+ ### Added
44
+
45
+ - **`PLATFORM_ORIGINS`** and **`isPlatformParentOrigin(origin)`** — the origins of the platform's
46
+ own pages, checked by every bridge a game exposes to its parent (push, wallet, the new screenshot
47
+ responder in `@idosgames/app-shell`). The push bridge and the wallet's frame guard used to carry
48
+ their own copies; they now read this one, with unchanged behaviour.
49
+ `isPlatformParentOrigin` also accepts a `localhost` parent, but **only while the game itself is
50
+ served from localhost** — a shipped build on `{id}.idos.games` answers nothing except the real
51
+ site, so a page on the player's own machine cannot ask it for anything. The wallet keeps checking
52
+ `PLATFORM_ORIGINS` directly and does not gain the local allowance.
53
+
54
+ ### Removed
55
+
56
+ - **`PlatformBridgeDefinitions.AllowShowTitlesPlayed` / `AllowShowWorkshopWorks`** (config section
57
+ `PlatformBridge`) — the publisher no longer decides what a player may show about themselves on
58
+ idosgames.com. The "Uses" and "Workshop" tabs of a public profile are shown by default; the player
59
+ alone can hide them, in their profile settings on the site. Nothing to do in a game client: these
60
+ fields were never read there, and the server ignores them if an old config still carries them.
61
+
17
62
  ## [0.16.0] - 2026-09-20
18
63
 
19
64
  The social layer became one subsystem shared by the platform and every title, so the Workshop no
@@ -0,0 +1,2 @@
1
+ var o=class{getString(e){if(typeof localStorage>"u")return null;try{return localStorage.getItem(e)}catch{return null}}setString(e,r){if(!(typeof localStorage>"u"))try{localStorage.setItem(e,r);}catch{}}remove(e){if(!(typeof localStorage>"u"))try{localStorage.removeItem(e);}catch{}}},a=class{map=new Map;getString(e){return this.map.get(e)??null}setString(e,r){this.map.set(e,r);}remove(e){this.map.delete(e);}};function n(){return globalThis.Telegram?.WebApp??null}function s(){return crypto.randomUUID()}var g="idos_device_id",i=class{storage;constructor(e=new o){this.storage=e;}getPlatform(){return n()?.platform??"Web"}getFullURL(){return typeof location<"u"?location.href:""}getStartParameter(){let e=n()?.initDataUnsafe?.start_param;return typeof e=="string"?e:null}getReferrer(){if(typeof document>"u")return null;let e=document.referrer;return e&&e.length>0?e:null}getTelegramInitDataRaw(){let e=n()?.initData;return e&&e.length>0?e:null}getDeviceID(){let e=this.storage.getString(g);return e||(e=s(),this.storage.setString(g,e)),e}getDeviceModel(){return typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"Web"}shareLink(e){let r=n();if(r?.openTelegramLink){r.openTelegramLink(e);return}typeof window<"u"&&window.open(e,"_blank");}openInvoice(e){let r=n();if(r?.openInvoice){r.openInvoice(e);return}typeof window<"u"&&window.open(e,"_blank");}async showAd(e){let r=globalThis;typeof r.showAd=="function"&&await r.showAd(e);}async copyToClipboard(e){typeof navigator<"u"&&navigator.clipboard&&await navigator.clipboard.writeText(e);}};var p="idos_device_id",l=class{storage;constructor(e=new a){this.storage=e;}getPlatform(){return "Web"}getFullURL(){return ""}getStartParameter(){return null}getTelegramInitDataRaw(){return null}getDeviceID(){let e=this.storage.getString(p);return e||(e="noop-device",this.storage.setString(p,e)),e}getDeviceModel(){return "Noop"}shareLink(){}openInvoice(){}async showAd(){}async copyToClipboard(){}};var u=["https://idosgames.com","https://www.idosgames.com"];function m(t){return t==="localhost"||t==="127.0.0.1"||t==="[::1]"||t.endsWith(".localhost")}function f(t){if(u.includes(t))return true;if(typeof window>"u"||!m(window.location.hostname))return false;try{return m(new URL(t).hostname)}catch{return false}}
2
+ export{o as a,a as b,n as c,s as d,i as e,u as f,f as g,l as h};