@indiegems/gem-web-sdk 6.0.0 → 7.1.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/brand/ticket-hero-128.png +0 -0
- package/brand/ticket-hero-256.png +0 -0
- package/brand/ticket-hero-384.png +0 -0
- package/brand/ticket-hero-512.png +0 -0
- package/brand/ticket-hero-768.png +0 -0
- package/brand/ticket-icon-20-1.5x.png +0 -0
- package/brand/ticket-icon-20-1x.png +0 -0
- package/brand/ticket-icon-20-2x.png +0 -0
- package/brand/ticket-icon-20-3x.png +0 -0
- package/brand/ticket-icon-32-1.5x.png +0 -0
- package/brand/ticket-icon-32-1x.png +0 -0
- package/brand/ticket-icon-32-2x.png +0 -0
- package/brand/ticket-icon-32-3x.png +0 -0
- package/dist/game.d.ts +87 -2
- package/dist/gem-web-sdk.bridge.js +1 -1
- package/dist/gem-web-sdk.esm.js +2 -2
- package/dist/gem-web-sdk.game.js +2 -2
- package/dist/gem-web-sdk.min.js +2 -2
- package/dist/gem-web-sdk.sdk.js +2 -2
- package/dist/gem-web-sdk.server-api.js +1 -1
- package/dist/gem-web-sdk.server.js +2 -2
- package/dist/index.d.ts +37 -0
- package/dist/sdk.d.ts +309 -54
- package/dist/server-api.d.ts +195 -42
- package/dist/server.d.ts +250 -45
- package/package.json +1 -1
- package/schema/bridge.v1.json +87 -2
package/package.json
CHANGED
package/schema/bridge.v1.json
CHANGED
|
@@ -583,6 +583,80 @@
|
|
|
583
583
|
"format": "url",
|
|
584
584
|
"optional": true,
|
|
585
585
|
"$comment": "LEGACY — the earlier spelling of `avatarIconUrl`, and the same value. Same pin caveat. A current frame reads it only when `avatarIconUrl` is absent."
|
|
586
|
+
},
|
|
587
|
+
"boost": {
|
|
588
|
+
"kind": "object",
|
|
589
|
+
"optional": true,
|
|
590
|
+
"$comment": [
|
|
591
|
+
"The player's Boost, FOR DISPLAY ONLY — a platform rule, not advice. A",
|
|
592
|
+
"Boost is the Arcade's one real-money product: it",
|
|
593
|
+
"multiplies what the player EARNS in platform currencies (Gems and",
|
|
594
|
+
"Tickets) and raises their earning limits. It never touches achievement",
|
|
595
|
+
"points.",
|
|
596
|
+
"",
|
|
597
|
+
"ADVISORY. It may lag: it is pushed on connect and again when the",
|
|
598
|
+
"parent's copy changes, never on the instant a boost starts or ends. The",
|
|
599
|
+
"platform applies the real multiplier server-side when it pays, whatever",
|
|
600
|
+
"a game renders. A game may SHOW it — a \"2x\" badge on a reward screen —",
|
|
601
|
+
"and must never gate content, difficulty, matchmaking, prices or power on",
|
|
602
|
+
"it. It is also trivially forgeable inside the game's own realm, which is",
|
|
603
|
+
"the second reason nothing may key on it.",
|
|
604
|
+
"",
|
|
605
|
+
"Platform-assigned numbers only, so it sits on the trusted side of the",
|
|
606
|
+
"`untrusted` split: currency ids and slugs, multipliers, a day count. NO",
|
|
607
|
+
"tier, SKU, price, source (paid, comp, trial) or instant: free and paid",
|
|
608
|
+
"boosts look identical to a game, and `expiresInDays` is whole days",
|
|
609
|
+
"rounded up because a second-precision expiry is a near-unique",
|
|
610
|
+
"per-player value two games could join on to link a player's two",
|
|
611
|
+
"game-scoped identities.",
|
|
612
|
+
"",
|
|
613
|
+
"ABSENT MEANS THE PARENT DID NOT SAY — an older parent, a backend without",
|
|
614
|
+
"boosts, or a read that has not landed. A frame reads absence as 1x",
|
|
615
|
+
"everywhere, which is also what an unboosted player's message says.",
|
|
616
|
+
"",
|
|
617
|
+
"Additive and optional, so no `v` bump, and ungated like the rest of",
|
|
618
|
+
"`gem.player`: no capability, because a frame that ignores the field",
|
|
619
|
+
"loses nothing but a badge."
|
|
620
|
+
],
|
|
621
|
+
"fields": {
|
|
622
|
+
"multipliers": {
|
|
623
|
+
"kind": "array",
|
|
624
|
+
"maxItems": 8,
|
|
625
|
+
"$comment": "One entry per boostable platform currency the parent knows of, in the parent's display order. `multiplierBp` is basis points: 10000 is 1x (not boosted), 20000 is 2x. A currency missing from the list is 1x. A parent drops an entry it cannot fit in these bounds rather than losing the whole message to it.",
|
|
626
|
+
"items": {
|
|
627
|
+
"kind": "object",
|
|
628
|
+
"fields": {
|
|
629
|
+
"currencyId": { "kind": "string", "maxLength": 64 },
|
|
630
|
+
"currencySlug": {
|
|
631
|
+
"kind": "string",
|
|
632
|
+
"maxLength": 32,
|
|
633
|
+
"$comment": "The currency's slug, e.g. GEMS or ARCADE_TICKETS — the same slug `gem.rewardCue` and `gem.requestPurchase` take."
|
|
634
|
+
},
|
|
635
|
+
"multiplierBp": { "kind": "int", "min": 10000, "max": 1000000 }
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"expiresInDays": {
|
|
640
|
+
"kind": "int",
|
|
641
|
+
"min": 1,
|
|
642
|
+
"max": 7,
|
|
643
|
+
"optional": true,
|
|
644
|
+
"$comment": [
|
|
645
|
+
"Whole days until the SOONEST multiplied currency drops back, rounded up",
|
|
646
|
+
"so a boost with any time left reads at least 1, and CAPPED AT 7: 7 means",
|
|
647
|
+
"\"7 or more\". Absent when no currency is multiplied. A count of days,",
|
|
648
|
+
"never an instant.",
|
|
649
|
+
"",
|
|
650
|
+
"THE CAP IS A PRIVACY BOUND, not a display choice. An exact count lets a",
|
|
651
|
+
"game watch it jump by a purchase's term (30 days) and infer that the",
|
|
652
|
+
"player just paid, and when. Capped, a boost with more than a week left",
|
|
653
|
+
"looks the same whether it was bought yesterday or a month ago. The",
|
|
654
|
+
"player's own account surfaces keep the exact figure; only what crosses",
|
|
655
|
+
"here is capped, and a parent clamps rather than letting a larger value",
|
|
656
|
+
"cost the frame the whole message."
|
|
657
|
+
]
|
|
658
|
+
}
|
|
659
|
+
}
|
|
586
660
|
}
|
|
587
661
|
},
|
|
588
662
|
"rateLimit": { "perMinute": 12 }
|
|
@@ -2104,11 +2178,22 @@
|
|
|
2104
2178
|
"player's one real wallet (gem-api's rule), so a cue confirms the same",
|
|
2105
2179
|
"way everywhere; a grant the receipt reports suppressed confirms nothing.",
|
|
2106
2180
|
"",
|
|
2181
|
+
"AT THE DAILY MAXIMUM the platform trims a grant to what is left of the",
|
|
2182
|
+
"player's day across all games, down to 0 once it is spent, and sends the",
|
|
2183
|
+
"parent `platform_daily_maximum_reached`. A parent resolves a cue it holds",
|
|
2184
|
+
"then into its own \"daily max\" state rather than letting it fade, and",
|
|
2185
|
+
"tells the player itself. That event is the player's, never relayed into",
|
|
2186
|
+
"the frame: the game learns nothing from it, and needs to do nothing",
|
|
2187
|
+
"differently.",
|
|
2188
|
+
"",
|
|
2107
2189
|
"Gated by `rewardCue`: sent only to a parent that advertised it; to any",
|
|
2108
2190
|
"other, `gem.cueReward` returns false and the game does NOTHING. There is",
|
|
2109
2191
|
"no fallback celebration: Gems display belongs to the arcade (the",
|
|
2110
2192
|
"creator's ruling, 2026-09-24), so a game draws no Gems flight, counter or",
|
|
2111
|
-
"celebration of its own.
|
|
2193
|
+
"celebration of its own. The same holds for Tickets (`ARCADE_TICKETS`): the",
|
|
2194
|
+
"arcade's wallet shows Gems and Tickets side by side and flies a payout",
|
|
2195
|
+
"into the one `currencySlug` names. `origin` is the centre of the game's icon for",
|
|
2196
|
+
"that currency — its gem, or its ticket."
|
|
2112
2197
|
],
|
|
2113
2198
|
"fields": {
|
|
2114
2199
|
"currencySlug": { "kind": "string", "maxLength": 32 },
|
|
@@ -2308,7 +2393,7 @@
|
|
|
2308
2393
|
"currencySlug": {
|
|
2309
2394
|
"kind": "string",
|
|
2310
2395
|
"maxLength": 32,
|
|
2311
|
-
"$comment": "Which platform currency to pay in, e.g. GEMS. The item must carry a price in it; the parent resolves that price itself and refuses when there is none. FRAME-CHOSEN AND UNCONSTRAINED HERE: nothing in this schema limits it to a currency the player earned rather than bought, so the parent checks it against a server-side earned-currency allowlist. See the EARNED CURRENCIES ONLY obligation above - this field is where that whole argument lands."
|
|
2396
|
+
"$comment": "Which platform currency to pay in, e.g. GEMS or ARCADE_TICKETS. The item must carry a price in it; the parent resolves that price itself and refuses when there is none. FRAME-CHOSEN AND UNCONSTRAINED HERE: nothing in this schema limits it to a currency the player earned rather than bought, so the parent checks it against a server-side earned-currency allowlist. See the EARNED CURRENCIES ONLY obligation above - this field is where that whole argument lands."
|
|
2312
2397
|
},
|
|
2313
2398
|
"quantity": {
|
|
2314
2399
|
"kind": "int",
|