@series-inc/rundot-game-sdk 5.22.0-beta.0 → 5.22.0-beta.2
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/dist/{AdsApi-BjhGPCAI.d.ts → AdsApi-BT2-dh42.d.ts} +191 -12
- package/dist/{LeaderboardApi-CBSE1wBb.d.ts → LeaderboardApi-UEZaRvg5.d.ts} +10 -1
- package/dist/{chunk-RKRXON75.js → chunk-FLUTHNEO.js} +48 -33
- package/dist/chunk-FLUTHNEO.js.map +1 -0
- package/dist/{chunk-FWSKWJ64.js → chunk-O3DF3FUB.js} +397 -76
- package/dist/chunk-O3DF3FUB.js.map +1 -0
- package/dist/host-http.d.ts +1 -1
- package/dist/index.d.ts +144 -24
- package/dist/index.js +2 -2
- package/dist/mp-server/index.d.ts +3 -1
- package/dist/mp-server/index.js +1 -1
- package/dist/mp-server/index.js.map +1 -1
- package/dist/rundot-game-api/index.d.ts +3 -3
- package/dist/rundot-game-api/index.js +5 -3
- package/dist/rundot-game-api/index.js.map +1 -1
- package/dist/sandbox/index.js +7 -3
- package/dist/sandbox/index.js.map +1 -1
- package/dist/vite/{dev-server-BQFML2D4.js → dev-server-6P24HSXW.js} +338 -82
- package/dist/vite/dev-server-6P24HSXW.js.map +1 -0
- package/dist/vite/index.d.ts +50 -3
- package/dist/vite/index.js +4 -2
- package/dist/vite/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-FWSKWJ64.js.map +0 -1
- package/dist/chunk-RKRXON75.js.map +0 -1
- package/dist/vite/dev-server-BQFML2D4.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as LeaderboardApi, I as ImageGenApi, A as AudioGenApi, V as VideoGenApi, q as SpriteGenApi, T as ThreeDGenApi } from './LeaderboardApi-
|
|
1
|
+
import { H as LeaderboardApi, I as ImageGenApi, A as AudioGenApi, V as VideoGenApi, q as SpriteGenApi, T as ThreeDGenApi } from './LeaderboardApi-UEZaRvg5.js';
|
|
2
2
|
|
|
3
3
|
interface StorageApi {
|
|
4
4
|
key(index: number): Promise<string | null>;
|
|
@@ -714,6 +714,8 @@ type AiChatCompletionData = {
|
|
|
714
714
|
message: {
|
|
715
715
|
role: string;
|
|
716
716
|
content: string;
|
|
717
|
+
/** Present only for reasoning models (e.g. deepseek-r1): the model's thinking, separate from the visible `content`. */
|
|
718
|
+
reasoning_content?: string;
|
|
717
719
|
/** Present only when the model invoked one or more tools on this turn. */
|
|
718
720
|
toolCalls?: ToolUse[];
|
|
719
721
|
};
|
|
@@ -734,6 +736,11 @@ type AiChatCompletionData = {
|
|
|
734
736
|
*
|
|
735
737
|
* - `delta`: incremental assistant text. Concatenate `text` across all
|
|
736
738
|
* `delta` events to reconstruct the final message.
|
|
739
|
+
* - `reasoning`: incremental reasoning / chain-of-thought text, emitted only
|
|
740
|
+
* by reasoning models (e.g. deepseek-r1). Concatenate `text` across all
|
|
741
|
+
* `reasoning` events (like `delta`) to reconstruct the full reasoning trace.
|
|
742
|
+
* Streamed on a distinct channel so consumers can render or ignore it
|
|
743
|
+
* independently of the answer; content-only consumers can skip it.
|
|
737
744
|
* - `tool_call_chunk`: partial tool-call metadata. Providers stream tool
|
|
738
745
|
* arguments as multiple chunks; buffer by `index` until `done`.
|
|
739
746
|
* - `done`: terminal event for a successful stream. Carries `finishReason`
|
|
@@ -745,6 +752,9 @@ type AiChatCompletionData = {
|
|
|
745
752
|
type AiChatCompletionStreamChunk = {
|
|
746
753
|
type: 'delta';
|
|
747
754
|
text: string;
|
|
755
|
+
} | {
|
|
756
|
+
type: 'reasoning';
|
|
757
|
+
text: string;
|
|
748
758
|
} | {
|
|
749
759
|
type: 'tool_call_chunk';
|
|
750
760
|
index: number;
|
|
@@ -890,21 +900,32 @@ interface GamepadConnectionEvent {
|
|
|
890
900
|
id: string;
|
|
891
901
|
source: GamepadSource;
|
|
892
902
|
}
|
|
893
|
-
interface
|
|
903
|
+
interface GamepadLatencyStats {
|
|
894
904
|
p50: number;
|
|
895
905
|
p95: number;
|
|
896
906
|
max: number;
|
|
897
907
|
sampleCount: number;
|
|
898
908
|
}
|
|
899
|
-
interface
|
|
909
|
+
interface GamepadApi {
|
|
910
|
+
/**
|
|
911
|
+
* Resolves once the one-time `GAMEPAD_SUBSCRIBE` handshake has settled (success,
|
|
912
|
+
* timeout, or reject) — i.e. once `isSupported()` is authoritative. Never
|
|
913
|
+
* rejects, never hangs. This is the readiness contract consumers MUST await
|
|
914
|
+
* before trusting `isSupported()`: the handshake is async and the SDK fires it
|
|
915
|
+
* during init, so `isSupported()` is routinely still `false` at game mount.
|
|
916
|
+
* Without awaiting this, a consumer either gives up on a transient `false`
|
|
917
|
+
* (race) or polls in hope it flips (silent fallback). On the local/mock tier
|
|
918
|
+
* there is no handshake, so this resolves immediately.
|
|
919
|
+
*/
|
|
920
|
+
ready(): Promise<void>;
|
|
900
921
|
/**
|
|
901
922
|
* True when the SDK can read controllers on this surface (capability —
|
|
902
923
|
* independent of whether a pad is currently connected). Determined solely by
|
|
903
|
-
* the one-time `
|
|
924
|
+
* the one-time `GAMEPAD_SUBSCRIBE` handshake: `true` iff the host returned a
|
|
904
925
|
* valid `{ supported: true, mode: 'tier1' | 'tier2' }`. The SDK never infers
|
|
905
926
|
* this from `navigator.getGamepads` (which exists yet is broken under Steam
|
|
906
|
-
* Input). Returns `false` before the handshake resolves
|
|
907
|
-
* timeout/reject/`supported: false`/unknown `mode`. Never hangs.
|
|
927
|
+
* Input). Returns `false` before the handshake resolves (await `ready()`
|
|
928
|
+
* first) and on timeout/reject/`supported: false`/unknown `mode`. Never hangs.
|
|
908
929
|
*/
|
|
909
930
|
isSupported(): boolean;
|
|
910
931
|
/**
|
|
@@ -918,7 +939,7 @@ interface InputApi {
|
|
|
918
939
|
onDisconnected(callback: (event: GamepadConnectionEvent) => void): Subscription;
|
|
919
940
|
/** Performance telemetry, off unless the input debug flag is enabled. */
|
|
920
941
|
readonly __debug: {
|
|
921
|
-
getLatencyStats():
|
|
942
|
+
getLatencyStats(): GamepadLatencyStats;
|
|
922
943
|
};
|
|
923
944
|
}
|
|
924
945
|
declare const GAMEPAD_BUTTON_NAMES: readonly GamepadButtonName[];
|
|
@@ -941,6 +962,23 @@ type ResumeCallback = () => void;
|
|
|
941
962
|
type PauseCallback = () => void;
|
|
942
963
|
type QuitCallback = () => void;
|
|
943
964
|
type BackButtonCallback = () => void;
|
|
965
|
+
/**
|
|
966
|
+
* Why the player's identity changed mid-session:
|
|
967
|
+
* - `sign_in` — anonymous → authenticated, SAME profile.id (linkWithCredential)
|
|
968
|
+
* - `account_switch` — profile.id changed (signed into a different existing account)
|
|
969
|
+
* - `sign_out` — authenticated → anonymous
|
|
970
|
+
*/
|
|
971
|
+
type IdentityChangeReason = 'sign_in' | 'account_switch' | 'sign_out';
|
|
972
|
+
interface IdentityChangedEvent {
|
|
973
|
+
/** Identity now in effect. After `sign_in`, `isAnonymous === false`. */
|
|
974
|
+
profile: Profile;
|
|
975
|
+
/** Identity in effect immediately before; `null` if unknown. */
|
|
976
|
+
previousProfile: Profile | null;
|
|
977
|
+
reason: IdentityChangeReason;
|
|
978
|
+
/** `previousProfile?.id !== profile.id` — game state keyed on the old id is now orphaned. */
|
|
979
|
+
idChanged: boolean;
|
|
980
|
+
}
|
|
981
|
+
type IdentityChangedCallback = (event: IdentityChangedEvent) => void;
|
|
944
982
|
interface LifecycleApi {
|
|
945
983
|
/**
|
|
946
984
|
* Registers a callback for when the game transitions from "idle" to "active" state.
|
|
@@ -1006,6 +1044,19 @@ interface LifecycleApi {
|
|
|
1006
1044
|
* @returns Subscription object that can be used to unsubscribe from the event
|
|
1007
1045
|
*/
|
|
1008
1046
|
onBackButton(callback: BackButtonCallback): Subscription;
|
|
1047
|
+
/**
|
|
1048
|
+
* Registers a callback for when the player's identity changes mid-session
|
|
1049
|
+
* (e.g. an anonymous player signs in without the game reloading).
|
|
1050
|
+
*
|
|
1051
|
+
* The host preserves the running game; this event lets the game react —
|
|
1052
|
+
* re-render the avatar, refetch user-scoped state, or re-issue a request
|
|
1053
|
+
* that previously required authentication. By the time the callback fires,
|
|
1054
|
+
* `RundotGameAPI.profile` already reflects the new identity.
|
|
1055
|
+
*
|
|
1056
|
+
* @param callback - Function to execute when identity changes
|
|
1057
|
+
* @returns Subscription object that can be used to unsubscribe from the event
|
|
1058
|
+
*/
|
|
1059
|
+
onIdentityChanged(callback: IdentityChangedCallback): Subscription;
|
|
1009
1060
|
}
|
|
1010
1061
|
|
|
1011
1062
|
interface ExecuteRecipeOptions {
|
|
@@ -1547,6 +1598,29 @@ declare class RundotGameTransport implements RpcTransport {
|
|
|
1547
1598
|
type Protocol = {
|
|
1548
1599
|
type: string;
|
|
1549
1600
|
};
|
|
1601
|
+
interface JoinTicketRequest {
|
|
1602
|
+
roomType: string;
|
|
1603
|
+
roomCode?: string;
|
|
1604
|
+
action: 'create' | 'joinOrCreate' | 'joinByCode';
|
|
1605
|
+
/**
|
|
1606
|
+
* Equality constraints for matchmaking. A candidate room matches iff every
|
|
1607
|
+
* key here exists on the room's stored criteria with a strictly-equal value.
|
|
1608
|
+
* Omitted (or `{}`) imposes no constraint — preserving pre-WS6 behavior.
|
|
1609
|
+
*/
|
|
1610
|
+
criteria?: Record<string, string | number>;
|
|
1611
|
+
/** Options applied only when this ticket creates a new room. */
|
|
1612
|
+
createOptions?: {
|
|
1613
|
+
maxPlayers?: number;
|
|
1614
|
+
isPrivate?: boolean;
|
|
1615
|
+
metadata?: Record<string, unknown>;
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* Optional matchmaking/create knobs threaded through the client room APIs.
|
|
1620
|
+
* Both fields optional, so an omitted `RoomOptions` is the pre-WS6 path by
|
|
1621
|
+
* construction — no runtime "did the caller pass options" guard is needed.
|
|
1622
|
+
*/
|
|
1623
|
+
type RoomOptions = Pick<JoinTicketRequest, 'criteria' | 'createOptions'>;
|
|
1550
1624
|
/** Summary of a realtime room, as listed by `multiplayer.getUserRooms()`. */
|
|
1551
1625
|
interface RealtimeRoomSummary {
|
|
1552
1626
|
roomId: string;
|
|
@@ -1628,7 +1702,7 @@ interface MultiplayerApi {
|
|
|
1628
1702
|
/**
|
|
1629
1703
|
* Create a new room of the given type.
|
|
1630
1704
|
*/
|
|
1631
|
-
createRoom<P extends Protocol>(roomType: string): Promise<ServerRoom<P>>;
|
|
1705
|
+
createRoom<P extends Protocol>(roomType: string, opts?: RoomOptions): Promise<ServerRoom<P>>;
|
|
1632
1706
|
/**
|
|
1633
1707
|
* Join a room by its 6-char code.
|
|
1634
1708
|
*/
|
|
@@ -1636,7 +1710,7 @@ interface MultiplayerApi {
|
|
|
1636
1710
|
/**
|
|
1637
1711
|
* Join an existing room or create a new one (matchmaking by room type).
|
|
1638
1712
|
*/
|
|
1639
|
-
joinOrCreateRoom<P extends Protocol>(roomType: string): Promise<ServerRoom<P>>;
|
|
1713
|
+
joinOrCreateRoom<P extends Protocol>(roomType: string, opts?: RoomOptions): Promise<ServerRoom<P>>;
|
|
1640
1714
|
/**
|
|
1641
1715
|
* List the realtime rooms the current user is a member of.
|
|
1642
1716
|
*/
|
|
@@ -2853,6 +2927,107 @@ interface EntitlementApi {
|
|
|
2853
2927
|
getLedger(entitlementId?: string, limit?: number, startAfter?: number): Promise<LedgerEntry[]>;
|
|
2854
2928
|
}
|
|
2855
2929
|
|
|
2930
|
+
/**
|
|
2931
|
+
* Information returned when a stat submission triggers one or more rule
|
|
2932
|
+
* evaluations server-side. Mirrors the cloud-run GrantInfo type in
|
|
2933
|
+
* server/cloud-run/src/types/collectibles.ts.
|
|
2934
|
+
*
|
|
2935
|
+
* Most submissions resolve with an empty `grants` array — only stats wired to
|
|
2936
|
+
* a collectible rule produce grants. RUN.tv consumers use `grants` to drive
|
|
2937
|
+
* the reveal overlay; fire-and-forget callers can ignore it.
|
|
2938
|
+
*/
|
|
2939
|
+
interface GrantInfo {
|
|
2940
|
+
/** Card identifier (= entitlementId on the platform). */
|
|
2941
|
+
cardId: string;
|
|
2942
|
+
/** Rule that fired to produce this grant. */
|
|
2943
|
+
ruleId: string;
|
|
2944
|
+
/** Card type from the catalog. 'vip' and 'premium' grants do not flow
|
|
2945
|
+
* through stats.submit and so do not appear here. */
|
|
2946
|
+
type: 'free' | 'completion';
|
|
2947
|
+
/** Source of the trigger for analytics attribution. */
|
|
2948
|
+
source: 'watch' | 'completion_reward';
|
|
2949
|
+
}
|
|
2950
|
+
interface StatsApi {
|
|
2951
|
+
/**
|
|
2952
|
+
* Submit a stat value for the current user in this game. Schemaless — any
|
|
2953
|
+
* `(statId, value)` pair is accepted. The server stores last-write-wins.
|
|
2954
|
+
*
|
|
2955
|
+
* Resolves with `{ grants }` containing the cards granted by rule evaluation
|
|
2956
|
+
* for **this specific statId**. The array is empty for stats with no rules,
|
|
2957
|
+
* or when this stat's rules did not fire.
|
|
2958
|
+
*
|
|
2959
|
+
* Submits issued within the same synchronous tick coalesce into a single
|
|
2960
|
+
* round-trip (per-stat last-write-wins on `value`). Each caller's promise
|
|
2961
|
+
* resolves or rejects based on their own statId's outcome — callers do not
|
|
2962
|
+
* observe grants from other stats in the same batch, even if one is
|
|
2963
|
+
* submitted next to theirs.
|
|
2964
|
+
*
|
|
2965
|
+
* For most game use cases the result can be ignored — the platform records
|
|
2966
|
+
* grants server-side regardless and consumers (like RUN.tv's Profile)
|
|
2967
|
+
* refresh entitlements on a separate cadence. Consumers that drive a
|
|
2968
|
+
* reveal-overlay UX synchronous with the submit await the grants.
|
|
2969
|
+
*/
|
|
2970
|
+
submit(statId: string, value: number): Promise<{
|
|
2971
|
+
grants: GrantInfo[];
|
|
2972
|
+
}>;
|
|
2973
|
+
/** Get the current value of a stat, or `null` if never submitted. */
|
|
2974
|
+
getValue(statId: string): Promise<number | null>;
|
|
2975
|
+
/** Get all stat values for the current user in this game as a flat map. */
|
|
2976
|
+
getAllValues(): Promise<Record<string, number>>;
|
|
2977
|
+
}
|
|
2978
|
+
|
|
2979
|
+
/**
|
|
2980
|
+
* Card catalog entry. Mirrors the cloud-run CollectibleCard shape — the same
|
|
2981
|
+
* data that gets authored in a game's `.rundot/collectibles.config.json`.
|
|
2982
|
+
*
|
|
2983
|
+
* The SDK does not interpret these fields; they are passed through to the
|
|
2984
|
+
* consumer for rendering. `artPath` / `thumbPath` are CDN-relative — resolve
|
|
2985
|
+
* them via `RundotGameAPI.cdn.resolveAssetUrl` before display.
|
|
2986
|
+
*/
|
|
2987
|
+
interface CollectibleCard {
|
|
2988
|
+
cardId: string;
|
|
2989
|
+
storyId: string;
|
|
2990
|
+
episodeId?: string;
|
|
2991
|
+
type: 'free' | 'premium' | 'vip' | 'completion';
|
|
2992
|
+
rarity: 'common' | 'rare' | 'epic' | 'legendary';
|
|
2993
|
+
title: string;
|
|
2994
|
+
description: string;
|
|
2995
|
+
artPath: string;
|
|
2996
|
+
thumbPath: string;
|
|
2997
|
+
lockedArtPath?: string;
|
|
2998
|
+
priceRbOverride?: number;
|
|
2999
|
+
limitedTimeEnd?: string;
|
|
3000
|
+
}
|
|
3001
|
+
/** Result of a VIP card claim. */
|
|
3002
|
+
interface VipClaimResult {
|
|
3003
|
+
granted: boolean;
|
|
3004
|
+
cardId: string;
|
|
3005
|
+
}
|
|
3006
|
+
interface CollectiblesApi {
|
|
3007
|
+
/**
|
|
3008
|
+
* Fetch the deployed card catalog for the current game. Returns every card
|
|
3009
|
+
* authored in `.rundot/collectibles.config.json` — both owned and unowned
|
|
3010
|
+
* from the user's perspective. Pair with `RundotGameAPI.entitlements.*` to
|
|
3011
|
+
* decide which cards the player currently owns.
|
|
3012
|
+
*
|
|
3013
|
+
* Typically called once on game init and cached client-side; the catalog
|
|
3014
|
+
* only changes on the next `rundot deploy`.
|
|
3015
|
+
*/
|
|
3016
|
+
listCards(): Promise<CollectibleCard[]>;
|
|
3017
|
+
/**
|
|
3018
|
+
* Claim a VIP card for the current user. The server validates that the
|
|
3019
|
+
* user is an active subscriber AND has completed the requested series (via
|
|
3020
|
+
* the `series_completed_{seriesId}` stat), then grants the matching card
|
|
3021
|
+
* entitlement directly — no rule engine, no client-writable trigger stat
|
|
3022
|
+
* in between.
|
|
3023
|
+
*
|
|
3024
|
+
* Rejects with an error when the server returns 403 (subscription required)
|
|
3025
|
+
* or 400 (series not completed / card mismatch / unknown card). Consumers
|
|
3026
|
+
* typically translate the error message into a toast.
|
|
3027
|
+
*/
|
|
3028
|
+
claimVipCard(seriesId: string, cardId: string): Promise<VipClaimResult>;
|
|
3029
|
+
}
|
|
3030
|
+
|
|
2856
3031
|
interface StorefrontItem {
|
|
2857
3032
|
itemId: string;
|
|
2858
3033
|
name: string;
|
|
@@ -3476,7 +3651,7 @@ interface Host {
|
|
|
3476
3651
|
readonly ai: AiApi;
|
|
3477
3652
|
readonly textGen: TextGenApi;
|
|
3478
3653
|
readonly haptics: HapticsApi;
|
|
3479
|
-
readonly
|
|
3654
|
+
readonly gamepad: GamepadApi;
|
|
3480
3655
|
readonly features: FeaturesApi;
|
|
3481
3656
|
readonly lifecycle: LifecycleApi;
|
|
3482
3657
|
readonly simulation: SimulationApi;
|
|
@@ -3495,6 +3670,8 @@ interface Host {
|
|
|
3495
3670
|
readonly spriteGen: SpriteGenApi;
|
|
3496
3671
|
readonly threeDGen: ThreeDGenApi;
|
|
3497
3672
|
readonly entitlements: EntitlementApi;
|
|
3673
|
+
readonly stats: StatsApi;
|
|
3674
|
+
readonly collectibles: CollectiblesApi;
|
|
3498
3675
|
readonly shop: ShopApi;
|
|
3499
3676
|
readonly accessGate: AccessGateApi;
|
|
3500
3677
|
readonly multiplayer: MultiplayerApi;
|
|
@@ -3810,7 +3987,7 @@ interface RundotGameAPI {
|
|
|
3810
3987
|
simulation: SimulationApi;
|
|
3811
3988
|
leaderboard: LeaderboardApi;
|
|
3812
3989
|
ugc: UgcApi;
|
|
3813
|
-
|
|
3990
|
+
gamepad: GamepadApi;
|
|
3814
3991
|
log(message: string, ...args: any[]): void;
|
|
3815
3992
|
error(message: string, ...args: any[]): void;
|
|
3816
3993
|
isAvailable(): boolean;
|
|
@@ -4009,6 +4186,8 @@ interface RundotGameAPI {
|
|
|
4009
4186
|
spriteGen: SpriteGenApi;
|
|
4010
4187
|
threeDGen: ThreeDGenApi;
|
|
4011
4188
|
entitlements: EntitlementApi;
|
|
4189
|
+
stats: StatsApi;
|
|
4190
|
+
collectibles: CollectiblesApi;
|
|
4012
4191
|
shop: ShopApi;
|
|
4013
4192
|
accessGate: AccessGateApi;
|
|
4014
4193
|
video: VideoApi;
|
|
@@ -4037,4 +4216,4 @@ interface AdsApi {
|
|
|
4037
4216
|
showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
|
|
4038
4217
|
}
|
|
4039
4218
|
|
|
4040
|
-
export { type AddToHomeScreenResult as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type RequestRCSOptInInput as J, type RequestRCSOptInResult as K, type PopupsApi as L, type ShowToastOptions as M, type NavigationApi as N, type ShowInterstitialAdOptions as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type ShowRewardedAdOptions as T, type ProfileApi as U, type DeviceApi as V, type DeviceInfo as W, type EnvironmentApi as X, type EnvironmentInfo as Y, type SystemApi as Z, type SafeArea as _, type RecipeRequirementQuery as a, type
|
|
4219
|
+
export { type AddToHomeScreenResult as $, type AnalyticsApi as A, type BatchRecipeRequirementsResult as B, type NotificationsApi as C, type ScheduleLocalNotification as D, type ScheduleNotificationOptions as E, type RCSAvailabilityStatus as F, type ScheduleRCSInput as G, type Host as H, type ScheduleRCSResult as I, type RequestRCSOptInInput as J, type RequestRCSOptInResult as K, type PopupsApi as L, type ShowToastOptions as M, type NavigationApi as N, type ShowInterstitialAdOptions as O, type Profile as P, type QuitOptions as Q, type RundotGameAPI as R, type SimulationActiveRunsUpdate as S, type ShowRewardedAdOptions as T, type ProfileApi as U, type DeviceApi as V, type DeviceInfo as W, type EnvironmentApi as X, type EnvironmentInfo as Y, type SystemApi as Z, type SafeArea as _, type RecipeRequirementQuery as a, type StartRoomGameOptions as a$, type CdnApi as a0, type FetchFromCdnOptions as a1, type AssetUrlResult as a2, type TimeApi as a3, type ServerTimeData as a4, type GetFutureTimeOptions as a5, type AiApi as a6, type AiChatCompletionRequest as a7, type AiChatCompletionData as a8, type AiChatCompletionStreamOptions as a9, type SimulationSlotContainer as aA, type SimulationAssignment as aB, type SimulationState as aC, type ExecuteRecipeOptions as aD, type ExecuteRecipeResponse as aE, type CollectRecipeResult as aF, type ResetStateOptions as aG, type ResetStateResult as aH, type GetActiveRunsOptions as aI, type ExecuteScopedRecipeOptions as aJ, type ExecuteScopedRecipeResult as aK, type GetAvailableRecipesOptions as aL, type GetAvailableRecipesResult as aM, type Recipe as aN, type GetBatchRecipeRequirements as aO, type TriggerRecipeChainOptions as aP, type RoomDataUpdate as aQ, type RoomMessageEvent as aR, type ProposedMoveEvent as aS, RundotGameTransport as aT, type RoomsApi as aU, type CreateRoomOptions as aV, type JoinOrCreateRoomOptions as aW, type JoinOrCreateResult as aX, type ListRoomsOptions as aY, type UpdateRoomDataOptions as aZ, type RoomMessageRequest as a_, type AiChatCompletionStreamChunk as aa, type HapticsApi as ab, HapticFeedbackStyle as ac, type GamepadSnapshot as ad, type GamepadConnectionEvent as ae, type Subscription as af, type GamepadApi as ag, type GamepadLatencyStats as ah, type FeaturesApi as ai, type Experiment as aj, type LifecycleApi as ak, type SleepCallback as al, type AwakeCallback as am, type PauseCallback as an, type ResumeCallback as ao, type QuitCallback as ap, type BackButtonCallback as aq, type IdentityChangedCallback as ar, type IdentityChangedEvent as as, type SimulationApi as at, type SimulationSlotValidationResult as au, type SimulationBatchOperation as av, type SimulationBatchOperationsResult as aw, type SimulationAvailableItem as ax, type SimulationPowerPreview as ay, type SimulationSlotMutationResult as az, type RecipeRequirementResult as b, type ImageGenEntry as b$, type ProposeMoveRequest as b0, type ProposeMoveResult as b1, type ValidateMoveVerdict as b2, type ValidateMoveResult as b3, type RoomSubscriptionOptions as b4, type LoggingApi as b5, type IapApi as b6, type SpendCurrencyOptions as b7, type SpendCurrencyResult as b8, type SubscriptionTier as b9, type StorefrontItem as bA, type ShopPurchaseResponse as bB, type ShopOrderHistoryResponse as bC, type PromptLoginResult as bD, type AccessTier as bE, type AccessGateApi as bF, type TextGenApi as bG, type UgcApi as bH, type MultiplayerApi as bI, type VideoApi as bJ, type AppApi as bK, type AdminUgcApi as bL, type AdminImageGenApi as bM, type AdminVideoGenApi as bN, type AdminSpriteGenApi as bO, type AdminAudioGenApi as bP, type AdminThreeDGenApi as bQ, type AppRole as bR, type ResolveLaunchIntentOptions as bS, type LaunchIntent as bT, type AdminUgcBrowseParams as bU, type AdminUgcBrowseResponse as bV, type AdminUgcListReportsParams as bW, type AdminUgcListReportsResponse as bX, type AdminUgcResolveAction as bY, type AdminGenBrowseParams as bZ, type AdminGenBrowseResponse as b_, type RunSubscriptionsResponse as ba, type SubscriptionInterval as bb, type PurchaseSubscriptionResponse as bc, type OpenStoreResult as bd, type LoadEmbeddedAssetsResponse as be, type SharedAssetsApi as bf, type PreloaderApi as bg, type SocialApi as bh, type ShareMetadata as bi, type ShareLinkResult as bj, type SocialQRCodeOptions as bk, type QRCodeResult as bl, type ShareClickData as bm, type ShareFileOptions as bn, type ShareFileResult as bo, type CanShareFileResult as bp, type EntitlementApi as bq, type Entitlement as br, type LedgerEntry as bs, type StatsApi as bt, type GrantInfo as bu, type CollectiblesApi as bv, type CollectibleCard as bw, type VipClaimResult as bx, type ShopApi as by, type StorefrontResponse as bz, type RundotGameAvailableRecipe as c, type Category as c$, type AdminGenListReportsParams as c0, type AdminGenListReportsResponse as c1, type ImageGenReport as c2, type AdminGenResolveAction as c3, type SpriteGenEntry as c4, type SpriteGenReport as c5, type ThreeDGenEntry as c6, type ThreeDGenReport as c7, type Avatar3dApi as c8, type AssetManifest as c9, type AdminSpriteGenBrowseResponse as cA, type AdminSpriteGenListReportsParams as cB, type AdminSpriteGenListReportsResponse as cC, type AdminSpriteGenResolveAction as cD, type AdminThreeDGenBrowseParams as cE, type AdminThreeDGenBrowseResponse as cF, type AdminThreeDGenListReportsParams as cG, type AdminThreeDGenListReportsResponse as cH, type AdminThreeDGenResolveAction as cI, type AdminUgcEntry as cJ, type AdminVideoGenBrowseParams as cK, type AdminVideoGenBrowseResponse as cL, type AdminVideoGenListReportsParams as cM, type AdminVideoGenListReportsResponse as cN, type AdminVideoGenResolveAction as cO, type AiContentBlock as cP, type AiImageContent as cQ, type AiImageUrlContent as cR, type AiMessage as cS, type AiResponseFormat as cT, type AiTextContent as cU, type AiToolResultContent as cV, type AiToolUseContent as cW, type Asset as cX, type AudioGenEntry as cY, type AudioGenReport as cZ, CLIP_CONTENT_TYPE as c_, type Avatar3dConfig as ca, type ShowEditorOptions as cb, type Avatar3dEdits as cc, type AdsApi as cd, type SharedStorageHostApi as ce, type FilesApi as cf, type ClipsApi as cg, type AttributionApi as ch, type InitializationContext as ci, type InitializationOptions as cj, type CaptureConsent as ck, type StartClipRecordingOptions as cl, type ClipBlob as cm, type ClipsSupport as cn, type ClipPersistOptions as co, type ClipResult as cp, type UgcEntry as cq, type CaptureConsentStatus as cr, AccessDeniedError as cs, type AdminGenApi as ct, type AdminImageGenBrowseParams as cu, type AdminImageGenBrowseResponse as cv, type AdminImageGenListReportsParams as cw, type AdminImageGenListReportsResponse as cx, type AdminImageGenResolveAction as cy, type AdminSpriteGenBrowseParams as cz, type RundotGameCollectRecipeResult as d, type StorefrontCollection as d$, type ClipAudioOptions as d0, type ClipCameraOptions as d1, type ClipPipLayout as d2, type ClipPipPosition as d3, type ConnectionState as d4, GAMEPAD_BUTTON_NAMES as d5, type GamepadAxes as d6, type GamepadButtonName as d7, type GamepadButtonState as d8, type GamepadSource as d9, type RoomEnvelopeResponse as dA, type RoomEvents as dB, type RoomGamePhase as dC, type RoomMessageEventType as dD, type RoomMessagePayload as dE, type RoomsEnvelopeResponse as dF, RpcInboundStorageApi as dG, RpcSharedAssetsApi as dH, type RpcTransport as dI, type RunSubscription as dJ, type RundotGameRoomCustomMetadata as dK, type RundotGameRoomPayload as dL, type RundotGameRoomRules as dM, type RundotGameRoomRulesGameState as dN, SHARE_FILE_ALLOWED_MIME_TYPES as dO, SHARE_FILE_MAX_SIZE_BYTES as dP, type ScheduleRCSStatus as dQ, type ServerPlayer as dR, type ServerRoom as dS, type ShareFileMimeType as dT, type ShopOrder as dU, type SimulationBatchOperationAssign as dV, type SimulationBatchOperationRemove as dW, type SimulationBatchOperationResult as dX, type SimulationPersonalState as dY, type SimulationRoomActiveRecipe as dZ, type SimulationRoomState as d_, type GetSubscriptionsForTierRequest as da, type HudInsets as db, type IdentityChangeReason as dc, type InboundForKeyEntry as dd, type InboundMethodIds as de, type InboundStorageApi as df, type IsPlayerSubscribedRequest as dg, type JoinOrCreateRoomEnvelopeResponse as dh, type JoinRoomMatchCriteria as di, type LaunchIntentKind as dj, type ListUserRoomsOptions as dk, type LoadEmbeddedAssetsRequest as dl, MockAvatarApi as dm, type NotificationTriggerInput as dn, type OnNotificationCallback as dp, type OnRequestCallback as dq, type OnResponseCallback as dr, type ProposedMovePayload as ds, type Protocol as dt, type PurchaseSubscriptionRequest as du, type RCSAvailabilityReason as dv, type RCSOptInStatus as dw, ROOM_GAME_PHASES as dx, type RealtimeRoomSummary as dy, type RecipeInfo as dz, type RundotGameExecuteRecipeOptions as e, type StorefrontCollectionItem as e0, type SubPath as e1, type Tool as e2, type ToolChoice as e3, type ToolUse as e4, type TimeIntervalTriggerInput as e5, type UgcReport as e6, type VideoGenEntry as e7, type VideoGenReport as e8, createHost as e9, resolveCollectionItemPrice as ea, type RundotGameExecuteRecipeResult as f, type RundotGameExecuteScopedRecipeOptions as g, RundotGameRoom as h, type RundotGameSimulationConfig as i, type RundotGameSimulationEffect as j, type RundotGameSimulationRecipe as k, type RundotGameSimulationStateResponse as l, type SimulationEntityUpdate as m, type SimulationRunSummary as n, type SimulationSnapshotUpdate as o, type SimulationSubscribeOptions as p, type SimulationUpdateData as q, type SimulationUpdateType as r, type RpcRequest as s, type RpcResponse as t, type RpcNotification as u, RpcClient as v, type StorageApi as w, type NavigationStackInfo as x, type PushAppOptions as y, type NavigateToGameOptions as z };
|
|
@@ -603,6 +603,13 @@ interface SubmitScoreParams {
|
|
|
603
603
|
*/
|
|
604
604
|
hash?: string;
|
|
605
605
|
}
|
|
606
|
+
/**
|
|
607
|
+
* Machine-readable reason a submit was not accepted.
|
|
608
|
+
* - `identity_changed`: the score token was minted under a different identity
|
|
609
|
+
* (the player signed into another account mid-session). Re-mint with
|
|
610
|
+
* `createScoreToken()` and resubmit under the new identity.
|
|
611
|
+
*/
|
|
612
|
+
type SubmitScoreFailureReason = 'identity_changed';
|
|
606
613
|
interface SubmitScoreResult {
|
|
607
614
|
accepted: boolean;
|
|
608
615
|
rank?: number | null;
|
|
@@ -610,6 +617,8 @@ interface SubmitScoreResult {
|
|
|
610
617
|
isAnomaly?: boolean;
|
|
611
618
|
/** Human-readable explanation when `accepted` is false (e.g., keep-best rejection). */
|
|
612
619
|
reason?: string | null;
|
|
620
|
+
/** Machine-readable failure reason the game can branch on, when applicable. */
|
|
621
|
+
failureReason?: SubmitScoreFailureReason;
|
|
613
622
|
}
|
|
614
623
|
interface GetPagedScoresOptions {
|
|
615
624
|
mode?: string;
|
|
@@ -684,4 +693,4 @@ interface LeaderboardApi {
|
|
|
684
693
|
getPodiumScores(options?: GetPodiumScoresOptions): Promise<PodiumScoresResponse>;
|
|
685
694
|
}
|
|
686
695
|
|
|
687
|
-
export type { LeaderboardAntiCheatConfig as $, AudioGenApi as A, RigParams as B, RigResult as C, DepthEstimationParams as D, AnimateParams as E, AnimateResult as F, ThreeDGenJobEvent as G, LeaderboardApi as H, ImageGenApi as I, ScoreToken as J, SubmitScoreParams as K, ListVoicesResult as L, SubmitScoreResult as M, GetPagedScoresOptions as N, PlayerRankOptions as O, PagedScoresResponse as P, PlayerRankResult as Q, RemoveBackgroundParams as R, SaveDesignedVoiceParams as S, ThreeDGenApi as T, UpscaleImageParams as U, VideoGenApi as V, GetPodiumScoresOptions as W, PodiumScoresResponse as X, BgRemovalModel as Y, BiRefNetVariant as Z, ImageGenModel as _, ImageGenParams as a, LeaderboardConfig as a0, LeaderboardDisplaySettings as a1, LeaderboardEntry as a2, LeaderboardModeConfig as a3, LeaderboardPeriodConfig as a4, LeaderboardPeriodType as a5, PodiumScoresContext as a6, RemoveBackgroundOptions as a7, SpriteGenModel as a8,
|
|
696
|
+
export type { LeaderboardAntiCheatConfig as $, AudioGenApi as A, RigParams as B, RigResult as C, DepthEstimationParams as D, AnimateParams as E, AnimateResult as F, ThreeDGenJobEvent as G, LeaderboardApi as H, ImageGenApi as I, ScoreToken as J, SubmitScoreParams as K, ListVoicesResult as L, SubmitScoreResult as M, GetPagedScoresOptions as N, PlayerRankOptions as O, PagedScoresResponse as P, PlayerRankResult as Q, RemoveBackgroundParams as R, SaveDesignedVoiceParams as S, ThreeDGenApi as T, UpscaleImageParams as U, VideoGenApi as V, GetPodiumScoresOptions as W, PodiumScoresResponse as X, BgRemovalModel as Y, BiRefNetVariant as Z, ImageGenModel as _, ImageGenParams as a, LeaderboardConfig as a0, LeaderboardDisplaySettings as a1, LeaderboardEntry as a2, LeaderboardModeConfig as a3, LeaderboardPeriodConfig as a4, LeaderboardPeriodType as a5, PodiumScoresContext as a6, RemoveBackgroundOptions as a7, SpriteGenModel as a8, SubmitScoreFailureReason as a9, UpscaleImageModel as aa, ImageGenResult as b, DepthEstimationResult as c, RemoveBackgroundResult as d, UpscaleImageResult as e, ImageGenJobEvent as f, AudioGenParams as g, AudioGenResult as h, AudioGenJobEvent as i, DesignVoicesParams as j, DesignVoicesResult as k, SaveDesignedVoiceResult as l, VideoGenParams as m, VideoGenResult as n, VideoGenJobEvent as o, VideoGenJobStartedEvent as p, SpriteGenApi as q, SpriteGenParams as r, SpriteGenResult as s, AnimateSpriteParams as t, AnimateSpriteResult as u, SpriteGenJobEvent as v, ThreeDGenParams as w, ThreeDGenResult as x, RemeshParams as y, RemeshResult as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { generateId, createRpcAdminGenApi, MockAdminUgcApi, createMockAdminGenApi, SHARE_FILE_ALLOWED_MIME_TYPES, SHARE_FILE_MAX_SIZE_BYTES, RpcAdsApi, RpcAnalyticsApi, RpcStorageApi, RpcInboundStorageApi, DualEmitStorageApi, RpcAvatarApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, HostProfileApi, HostDeviceApi, HostEnvironmentApi, HostSystemApi, HostCdnApi, HostTimeApi, RpcHapticsApi,
|
|
1
|
+
import { generateId, createRpcAdminGenApi, MockAdminUgcApi, createMockAdminGenApi, SHARE_FILE_ALLOWED_MIME_TYPES, SHARE_FILE_MAX_SIZE_BYTES, RpcAdsApi, RpcAnalyticsApi, RpcStorageApi, RpcInboundStorageApi, DualEmitStorageApi, RpcAvatarApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, HostProfileApi, HostDeviceApi, HostEnvironmentApi, HostSystemApi, HostCdnApi, HostTimeApi, RpcHapticsApi, RpcGamepadApi, RpcFeaturesApi, RpcLifecycleApi, RpcRoomsApi, RpcLoggingApi, RpcPreloaderApi, ClipsApiImpl, RpcEntitlementApi, RpcStatsApi, RpcCollectiblesApi, RpcShopApi, RpcVideoApi, RpcAttributionApi, RpcSharedAssetsApi, initializeRoomsApi, RpcAccessGateApi, WsMultiplayerApi, applyAccessGates, wireIdentityReplica, sanitizeProfile, MockAdsApi, MockLifecycleApi, MockAnalyticsApi, createMockStorageApi, MockAvatarApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockProfileApi, MockDeviceApi, MockEnvironmentApi, MockSystemApi, MockCdnApi, MockTimeApi, MockHapticsApi, MockGamepadApi, MockFeaturesApi, MockLoggingApi, MockIapApi, MockEntitlementApi, MockStatsApi, MockCollectiblesApi, MockShopApi, MockVideoApi, MockAttributionApi, MockPreloaderApi, MockSharedAssetsApi, MockAccessGateApi, MockMultiplayerApi } from './chunk-O3DF3FUB.js';
|
|
2
2
|
import { RundotApiError } from './chunk-HVVCNDSV.js';
|
|
3
3
|
|
|
4
4
|
// src/ai/RpcAiApi.ts
|
|
@@ -1009,7 +1009,7 @@ function initializeSimulation(rundotGameApi, host) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
|
|
1011
1011
|
// src/version.ts
|
|
1012
|
-
var SDK_VERSION = "5.22.0-beta.
|
|
1012
|
+
var SDK_VERSION = "5.22.0-beta.2";
|
|
1013
1013
|
|
|
1014
1014
|
// src/leaderboard/utils.ts
|
|
1015
1015
|
var HASH_ALGORITHM_WEB_CRYPTO = "SHA-256";
|
|
@@ -1082,20 +1082,28 @@ var RpcLeaderboardApi = class {
|
|
|
1082
1082
|
}
|
|
1083
1083
|
this.tokenCache.delete(params.token);
|
|
1084
1084
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1085
|
+
try {
|
|
1086
|
+
return await this.rpcClient.call(
|
|
1087
|
+
"H5_LEADERBOARD_SUBMIT_SCORE" /* H5_LEADERBOARD_SUBMIT_SCORE */,
|
|
1088
|
+
{
|
|
1089
|
+
token: params.token,
|
|
1090
|
+
score: params.score,
|
|
1091
|
+
duration: params.duration,
|
|
1092
|
+
mode: params.mode,
|
|
1093
|
+
period: params.period,
|
|
1094
|
+
telemetry: params.telemetry,
|
|
1095
|
+
metadata: params.metadata,
|
|
1096
|
+
hash
|
|
1097
|
+
// undefined if no sealing, computed if sealing enabled
|
|
1098
|
+
}
|
|
1099
|
+
);
|
|
1100
|
+
} catch (error) {
|
|
1101
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
1102
|
+
if (/token does not belong to profile/i.test(message)) {
|
|
1103
|
+
return { accepted: false, failureReason: "identity_changed", reason: message };
|
|
1097
1104
|
}
|
|
1098
|
-
|
|
1105
|
+
throw error;
|
|
1106
|
+
}
|
|
1099
1107
|
}
|
|
1100
1108
|
getPagedScores(options) {
|
|
1101
1109
|
return this.rpcClient.call(
|
|
@@ -2676,7 +2684,7 @@ var RundotGameTransport = class {
|
|
|
2676
2684
|
return;
|
|
2677
2685
|
}
|
|
2678
2686
|
this.notifyRundotGameMessageReceived(message);
|
|
2679
|
-
if (message.type === "PAUSE" /* PAUSE */ || message.type === "RESUME" /* RESUME */ || message.type === "AWAKE" /* AWAKE */ || message.type === "SLEEP" /* SLEEP */ || message.type === "QUIT" /* QUIT */ || message.type === "BACK_BUTTON" /* BACK_BUTTON */) {
|
|
2687
|
+
if (message.type === "PAUSE" /* PAUSE */ || message.type === "RESUME" /* RESUME */ || message.type === "AWAKE" /* AWAKE */ || message.type === "SLEEP" /* SLEEP */ || message.type === "QUIT" /* QUIT */ || message.type === "IDENTITY_CHANGED" /* IDENTITY_CHANGED */ || message.type === "BACK_BUTTON" /* BACK_BUTTON */) {
|
|
2680
2688
|
const notification = {
|
|
2681
2689
|
type: "rpc-notification",
|
|
2682
2690
|
id: message.type,
|
|
@@ -2732,7 +2740,7 @@ var RundotGameTransport = class {
|
|
|
2732
2740
|
this.isProcessingMessage = false;
|
|
2733
2741
|
return;
|
|
2734
2742
|
}
|
|
2735
|
-
if (message.type === "
|
|
2743
|
+
if (message.type === "GAMEPAD_SNAPSHOT" /* GAMEPAD_SNAPSHOT */ || message.type === "GAMEPAD_CONNECTED" /* GAMEPAD_CONNECTED */ || message.type === "GAMEPAD_DISCONNECTED" /* GAMEPAD_DISCONNECTED */) {
|
|
2736
2744
|
const notification = {
|
|
2737
2745
|
type: "rpc-notification",
|
|
2738
2746
|
id: message.type,
|
|
@@ -2926,6 +2934,11 @@ var RundotGameTransport = class {
|
|
|
2926
2934
|
}
|
|
2927
2935
|
};
|
|
2928
2936
|
|
|
2937
|
+
// src/initSdkArgs.ts
|
|
2938
|
+
function buildInitSdkArgs() {
|
|
2939
|
+
return { sdkVersion: SDK_VERSION };
|
|
2940
|
+
}
|
|
2941
|
+
|
|
2929
2942
|
// src/RemoteHost.ts
|
|
2930
2943
|
var RemoteHost = class {
|
|
2931
2944
|
ads;
|
|
@@ -2945,7 +2958,7 @@ var RemoteHost = class {
|
|
|
2945
2958
|
ai;
|
|
2946
2959
|
textGen;
|
|
2947
2960
|
haptics;
|
|
2948
|
-
|
|
2961
|
+
gamepad;
|
|
2949
2962
|
features;
|
|
2950
2963
|
lifecycle;
|
|
2951
2964
|
simulation;
|
|
@@ -2964,6 +2977,8 @@ var RemoteHost = class {
|
|
|
2964
2977
|
spriteGen;
|
|
2965
2978
|
threeDGen;
|
|
2966
2979
|
entitlements;
|
|
2980
|
+
stats;
|
|
2981
|
+
collectibles;
|
|
2967
2982
|
shop;
|
|
2968
2983
|
accessGate;
|
|
2969
2984
|
multiplayer;
|
|
@@ -3083,7 +3098,7 @@ var RemoteHost = class {
|
|
|
3083
3098
|
this.ai = new RpcAiApi(rpcClient);
|
|
3084
3099
|
this.textGen = this.ai;
|
|
3085
3100
|
this.haptics = new RpcHapticsApi(rpcClient);
|
|
3086
|
-
this.
|
|
3101
|
+
this.gamepad = new RpcGamepadApi(rpcClient, { autoSubscribe: false });
|
|
3087
3102
|
this.features = new RpcFeaturesApi(rpcClient);
|
|
3088
3103
|
this.lifecycle = new RpcLifecycleApi(rpcClient);
|
|
3089
3104
|
this.simulation = new RpcSimulationApi(rpcClient);
|
|
@@ -3106,6 +3121,8 @@ var RemoteHost = class {
|
|
|
3106
3121
|
this.spriteGen = new RpcSpriteGenApi(rpcClient);
|
|
3107
3122
|
this.threeDGen = new RpcThreeDGenApi(rpcClient);
|
|
3108
3123
|
this.entitlements = new RpcEntitlementApi(rpcClient);
|
|
3124
|
+
this.stats = new RpcStatsApi(rpcClient);
|
|
3125
|
+
this.collectibles = new RpcCollectiblesApi(rpcClient);
|
|
3109
3126
|
this.shop = new RpcShopApi(rpcClient);
|
|
3110
3127
|
this.video = new RpcVideoApi(rpcClient);
|
|
3111
3128
|
this.app = new RpcAppApi(rpcClient);
|
|
@@ -3137,31 +3154,25 @@ var RemoteHost = class {
|
|
|
3137
3154
|
const transport = new RundotGameTransport();
|
|
3138
3155
|
transport.start();
|
|
3139
3156
|
this.rpcClient.start(transport);
|
|
3157
|
+
wireIdentityReplica(this.rpcClient, this.rundotGameApi);
|
|
3140
3158
|
const roomsApi = this.rooms;
|
|
3141
3159
|
roomsApi.setupNotifications(transport);
|
|
3142
3160
|
const response = await this.rpcClient.call(
|
|
3143
3161
|
"INITIALIZE_SDK" /* INIT_SDK */,
|
|
3144
|
-
|
|
3162
|
+
buildInitSdkArgs(),
|
|
3145
3163
|
-1
|
|
3146
3164
|
);
|
|
3147
3165
|
transport.instanceId = response.instanceId;
|
|
3148
3166
|
this.instanceId = response.instanceId;
|
|
3149
3167
|
this._roomServerUrl = response.roomServerUrl ?? "";
|
|
3150
|
-
|
|
3151
|
-
const sanitizedProfile = {
|
|
3152
|
-
id: profile.id,
|
|
3153
|
-
username: profile.username,
|
|
3154
|
-
avatarUrl: profile.avatarUrl ?? null,
|
|
3155
|
-
isAnonymous: Boolean(profile.isAnonymous)
|
|
3156
|
-
};
|
|
3157
|
-
this.rundotGameApi._profileData = sanitizedProfile;
|
|
3168
|
+
this.rundotGameApi._profileData = sanitizeProfile(response.profile);
|
|
3158
3169
|
this.rundotGameApi._deviceData = response.device;
|
|
3159
3170
|
this.rundotGameApi._environmentData = response.environment;
|
|
3160
3171
|
this.rundotGameApi._localeData = response.locale;
|
|
3161
3172
|
this.rundotGameApi._languageCodeData = response.languageCode;
|
|
3162
3173
|
this._isInitialized = true;
|
|
3163
3174
|
await this.rpcClient.call("READY" /* READY */, {});
|
|
3164
|
-
void this.
|
|
3175
|
+
void this.gamepad.subscribe();
|
|
3165
3176
|
const safeArea = response.safeArea;
|
|
3166
3177
|
if (safeArea) {
|
|
3167
3178
|
this.rundotGameApi._safeAreaData = safeArea;
|
|
@@ -3369,7 +3380,7 @@ var MockHost = class {
|
|
|
3369
3380
|
ai;
|
|
3370
3381
|
textGen;
|
|
3371
3382
|
haptics;
|
|
3372
|
-
|
|
3383
|
+
gamepad;
|
|
3373
3384
|
features;
|
|
3374
3385
|
lifecycle;
|
|
3375
3386
|
simulation;
|
|
@@ -3388,6 +3399,8 @@ var MockHost = class {
|
|
|
3388
3399
|
spriteGen;
|
|
3389
3400
|
threeDGen;
|
|
3390
3401
|
entitlements;
|
|
3402
|
+
stats;
|
|
3403
|
+
collectibles;
|
|
3391
3404
|
shop;
|
|
3392
3405
|
accessGate;
|
|
3393
3406
|
multiplayer;
|
|
@@ -3460,7 +3473,7 @@ var MockHost = class {
|
|
|
3460
3473
|
this.ai = new MockAiApi();
|
|
3461
3474
|
this.textGen = this.ai;
|
|
3462
3475
|
this.haptics = new MockHapticsApi(rundotGameApi);
|
|
3463
|
-
this.
|
|
3476
|
+
this.gamepad = new MockGamepadApi();
|
|
3464
3477
|
this.features = new MockFeaturesApi();
|
|
3465
3478
|
this.lifecycle = this._mockLifecyclesApi;
|
|
3466
3479
|
this.logging = new MockLoggingApi();
|
|
@@ -3474,6 +3487,8 @@ var MockHost = class {
|
|
|
3474
3487
|
this.spriteGen = new MockSpriteGenApi();
|
|
3475
3488
|
this.threeDGen = new MockThreeDGenApi();
|
|
3476
3489
|
this.entitlements = new MockEntitlementApi();
|
|
3490
|
+
this.stats = new MockStatsApi();
|
|
3491
|
+
this.collectibles = new MockCollectiblesApi();
|
|
3477
3492
|
this.shop = new MockShopApi();
|
|
3478
3493
|
this.video = new MockVideoApi();
|
|
3479
3494
|
this.app = new MockAppApi(rundotGameApi);
|
|
@@ -3907,5 +3922,5 @@ function initializeClips(rundotGameApi, host) {
|
|
|
3907
3922
|
}
|
|
3908
3923
|
|
|
3909
3924
|
export { HASH_ALGORITHM_NODE, HASH_ALGORITHM_WEB_CRYPTO, MockAdminImageGenApi, MockAdminSpriteGenApi, MockAdminThreeDGenApi, MockAiApi, MockAppApi, MockCaptureConsent, MockClipsApi, MockImageGenApi, MockLeaderboardApi, MockSocialApi, MockSpriteGenApi, RemoteHost, RpcAdminImageGenApi, RpcAdminSpriteGenApi, RpcAdminThreeDGenApi, RpcAdminUgcApi, RpcAiApi, RpcAppApi, RpcCaptureConsent, RpcClient, RpcIapApi, RpcImageGenApi, RpcLeaderboardApi, RpcSimulationApi, RpcSocialApi, RpcSpriteGenApi, SDK_VERSION, buildInitializationContext, computeScoreHash, createHost, initializeAi, initializeApp, initializeAudioGen, initializeClips, initializeFiles, initializeIap, initializeImageGen, initializeLeaderboard, initializeSimulation, initializeSocial, initializeSpriteGen, initializeTextGen, initializeThreeDGen, initializeUgc, initializeVideoGen };
|
|
3910
|
-
//# sourceMappingURL=chunk-
|
|
3911
|
-
//# sourceMappingURL=chunk-
|
|
3925
|
+
//# sourceMappingURL=chunk-FLUTHNEO.js.map
|
|
3926
|
+
//# sourceMappingURL=chunk-FLUTHNEO.js.map
|