@series-inc/venus-sdk 3.0.4 → 3.1.0-beta.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.
Files changed (39) hide show
  1. package/README.md +324 -123
  2. package/dist/{AdsApi-CNGRf6j0.d.mts → AdsApi-meVfUcZy.d.mts} +37 -25
  3. package/dist/{AdsApi-CNGRf6j0.d.ts → AdsApi-meVfUcZy.d.ts} +37 -25
  4. package/dist/chunk-2PDL7CQK.mjs +26 -0
  5. package/dist/chunk-2PDL7CQK.mjs.map +1 -0
  6. package/dist/{chunk-PXWCNWJ6.mjs → chunk-EMVTVSGL.mjs} +421 -109
  7. package/dist/chunk-EMVTVSGL.mjs.map +1 -0
  8. package/dist/chunk-IZLOB7DV.mjs +343 -0
  9. package/dist/chunk-IZLOB7DV.mjs.map +1 -0
  10. package/dist/{chunk-W7IPHM67.mjs → chunk-QABXMFND.mjs} +3 -26
  11. package/dist/chunk-QABXMFND.mjs.map +1 -0
  12. package/dist/core-5JLON75E.mjs +4 -0
  13. package/dist/{core-R3FHW62G.mjs.map → core-5JLON75E.mjs.map} +1 -1
  14. package/dist/index.cjs +768 -105
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.mts +140 -25
  17. package/dist/index.d.ts +140 -25
  18. package/dist/index.mjs +5 -3
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/venus-api/index.cjs +452 -101
  21. package/dist/venus-api/index.cjs.map +1 -1
  22. package/dist/venus-api/index.d.mts +2 -2
  23. package/dist/venus-api/index.d.ts +2 -2
  24. package/dist/venus-api/index.mjs +46 -3
  25. package/dist/venus-api/index.mjs.map +1 -1
  26. package/dist/vite/index.cjs +534 -0
  27. package/dist/vite/index.cjs.map +1 -0
  28. package/dist/vite/index.mjs +527 -0
  29. package/dist/vite/index.mjs.map +1 -0
  30. package/dist/webview/index.cjs +346 -0
  31. package/dist/webview/index.cjs.map +1 -0
  32. package/dist/webview/index.d.mts +17 -0
  33. package/dist/webview/index.d.ts +17 -0
  34. package/dist/webview/index.mjs +4 -0
  35. package/dist/webview/index.mjs.map +1 -0
  36. package/package.json +19 -1
  37. package/dist/chunk-PXWCNWJ6.mjs.map +0 -1
  38. package/dist/chunk-W7IPHM67.mjs.map +0 -1
  39. package/dist/core-R3FHW62G.mjs +0 -3
@@ -614,6 +614,7 @@ interface LoggingApi {
614
614
  interface SharedAssetsApi {
615
615
  loadCharactersBundle(): Promise<ArrayBuffer>;
616
616
  loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
617
+ loadLibraryCode(libraryKey: string): Promise<string>;
617
618
  }
618
619
 
619
620
  declare class RpcSharedAssetsApi implements SharedAssetsApi {
@@ -622,6 +623,7 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
622
623
  constructor(rpcClient: RpcClient, venusApi: VenusAPI);
623
624
  loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
624
625
  loadCharactersBundle(): Promise<ArrayBuffer>;
626
+ loadLibraryCode(libraryKey: string): Promise<string>;
625
627
  }
626
628
  interface LoadEmbeddedAssetsRequest {
627
629
  assetKey: string;
@@ -668,25 +670,29 @@ interface LeaderboardConfig {
668
670
  maxDurationSec: number;
669
671
  minScore: number;
670
672
  maxScore: number;
671
- requiresHash: boolean;
672
- scoringFields: string[];
673
+ requiresToken: boolean;
674
+ enableScoreSealing: boolean;
675
+ scoreSealingSecret?: string;
673
676
  modes: Record<string, LeaderboardModeConfig>;
674
677
  periods: Record<string, LeaderboardPeriodConfig>;
675
678
  antiCheat: LeaderboardAntiCheatConfig;
676
679
  displaySettings: LeaderboardDisplaySettings;
677
680
  }
678
- interface StartRunResult {
679
- sessionId: string;
681
+ interface ScoreToken {
682
+ token: string;
680
683
  startTime: number;
681
684
  expiresAt: number;
682
- hashNonce?: string | null;
685
+ sealingNonce?: string | null;
686
+ sealingSecret?: string | null;
683
687
  mode: string;
684
688
  }
685
- interface SubmitScoreOptions {
689
+ interface SubmitScoreParams {
690
+ token?: string;
691
+ score: number;
692
+ duration: number;
686
693
  mode?: string;
687
694
  telemetry?: Record<string, any>;
688
695
  metadata?: Record<string, any>;
689
- hash?: string;
690
696
  }
691
697
  interface SubmitScoreResult {
692
698
  accepted: boolean;
@@ -694,7 +700,7 @@ interface SubmitScoreResult {
694
700
  zScore?: number | null;
695
701
  isAnomaly?: boolean;
696
702
  }
697
- interface GetLeaderboardOptions {
703
+ interface GetPagedScoresOptions {
698
704
  mode?: string;
699
705
  period?: string;
700
706
  periodDate?: number | string;
@@ -710,9 +716,9 @@ interface LeaderboardEntry {
710
716
  username: string;
711
717
  avatarUrl: string | null;
712
718
  score: number;
713
- durationSec: number;
719
+ duration: number;
714
720
  submittedAt: number;
715
- sessionId?: string;
721
+ token?: string;
716
722
  rank: number | null;
717
723
  zScore?: number | null;
718
724
  isAnomaly?: boolean;
@@ -722,7 +728,7 @@ interface LeaderboardEntry {
722
728
  metadata?: Record<string, any> | null;
723
729
  isSeed?: boolean;
724
730
  }
725
- interface LeaderboardResponse {
731
+ interface PagedScoresResponse {
726
732
  variant: 'standard' | 'highlight';
727
733
  entries: LeaderboardEntry[];
728
734
  totalEntries: number;
@@ -730,12 +736,12 @@ interface LeaderboardResponse {
730
736
  playerRank: number | null;
731
737
  periodInstance: string;
732
738
  }
733
- interface PlayerStatsOptions {
739
+ interface PlayerRankOptions {
734
740
  mode?: string;
735
741
  period?: string;
736
742
  periodDate?: number | string;
737
743
  }
738
- interface PlayerStats {
744
+ interface PlayerRankResult {
739
745
  rank: number | null;
740
746
  score?: number;
741
747
  totalPlayers: number;
@@ -743,7 +749,7 @@ interface PlayerStats {
743
749
  trustScore: number;
744
750
  periodInstance: string;
745
751
  }
746
- interface LeaderboardHighlightContext {
752
+ interface PodiumScoresContext {
747
753
  topEntries: LeaderboardEntry[];
748
754
  beforePlayer: LeaderboardEntry[];
749
755
  playerEntry?: LeaderboardEntry | null;
@@ -753,18 +759,18 @@ interface LeaderboardHighlightContext {
753
759
  omittedBefore: number;
754
760
  omittedAfter: number;
755
761
  }
756
- interface LeaderboardHighlightResponse extends LeaderboardResponse {
762
+ interface PodiumScoresResponse extends PagedScoresResponse {
757
763
  variant: 'highlight';
758
- context: LeaderboardHighlightContext;
764
+ context: PodiumScoresContext;
759
765
  }
760
- interface LeaderboardHighlightOptions extends Omit<GetLeaderboardOptions, 'variant'> {
766
+ interface GetPodiumScoresOptions extends Omit<GetPagedScoresOptions, 'variant'> {
761
767
  }
762
768
  interface LeaderboardApi {
763
- startRun(mode?: string): Promise<StartRunResult>;
764
- submitScore(sessionId: string, score: number, durationSec: number, options?: SubmitScoreOptions): Promise<SubmitScoreResult>;
765
- getLeaderboard(options?: GetLeaderboardOptions): Promise<LeaderboardResponse>;
766
- getPlayerStats(options?: PlayerStatsOptions): Promise<PlayerStats>;
767
- getLeaderboardHighlight(options?: LeaderboardHighlightOptions): Promise<LeaderboardHighlightResponse>;
769
+ createScoreToken(mode?: string): Promise<ScoreToken>;
770
+ submitScore(params: SubmitScoreParams): Promise<SubmitScoreResult>;
771
+ getPagedScores(options?: GetPagedScoresOptions): Promise<PagedScoresResponse>;
772
+ getMyRank(options?: PlayerRankOptions): Promise<PlayerRankResult>;
773
+ getPodiumScores(options?: GetPodiumScoresOptions): Promise<PodiumScoresResponse>;
768
774
  }
769
775
 
770
776
  interface PreloaderApi {
@@ -818,7 +824,7 @@ interface SocialApi {
818
824
  * - iOS / Android: opens the native share sheet.
819
825
  * - Web: copies the generated URL to the clipboard (with fallback toast).
820
826
  *
821
- * @param options.launchParams Arbitrary launch parameters (must include gameId).
827
+ * @param options.launchParams Arbitrary launch parameters for your game.
822
828
  * @param options.metadata Optional OpenGraph metadata for rich previews.
823
829
  * @returns The generated share URL.
824
830
  */
@@ -831,7 +837,7 @@ interface SocialApi {
831
837
  *
832
838
  * Games can render or print the returned QR image or re-use the share URL.
833
839
  *
834
- * @param options.launchParams Arbitrary launch parameters (must include gameId).
840
+ * @param options.launchParams Arbitrary launch parameters for your game.
835
841
  * @param options.metadata Optional OpenGraph metadata for the share.
836
842
  * @param options.qrOptions Customisation for the generated QR code.
837
843
  * @returns The generated share URL and QR code (as a data URL).
@@ -1081,6 +1087,10 @@ interface VenusSimulationAPI {
1081
1087
  sumContributions(contributions: Record<string, any>): Record<string, number>;
1082
1088
  }
1083
1089
  interface VenusConfig {
1090
+ /**
1091
+ * @deprecated Use VenusAPI.getLocale() and VenusAPI.getLanguageCode() instead. Will be removed in v4.0.0
1092
+ * TODO: Remove in SDK v4.0.0
1093
+ */
1084
1094
  user?: {
1085
1095
  id: string;
1086
1096
  username?: string;
@@ -1188,6 +1198,8 @@ interface VenusAPI {
1188
1198
  }): Promise<any>;
1189
1199
  getCurrentProfile(): Profile;
1190
1200
  getLaunchParams(): Record<string, string>;
1201
+ getLocale(): string;
1202
+ getLanguageCode(): string;
1191
1203
  /**
1192
1204
  * @deprecated Please use the popups API. (e.g, VenusAPI.popups)
1193
1205
  */
@@ -1406,4 +1418,4 @@ interface AdsApi {
1406
1418
  showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
1407
1419
  }
1408
1420
 
1409
- export { type Recipe as $, type AnalyticsApi as A, type Subscription as B, type CdnApi as C, type AwakeCallback as D, type Experiment as E, type FetchBlobOptions as F, type GetFutureTimeOptions as G, type Host as H, type PauseCallback as I, type ResumeCallback as J, type QuitCallback as K, type LifecycleApi as L, type SimulationApi as M, type NavigationApi as N, type VenusSimulationConfig as O, type PushAppOptions as P, type QuitOptions as Q, type RpcRequest as R, type StorageApi as S, type TimeApi as T, type ExecuteRecipeOptions as U, type VenusAPI as V, type CollectRecipeResult as W, type GetActiveRunsOptions as X, type ExecuteScopedRecipeResult as Y, type GetAvailableRecipesOptions as Z, type GetAvailableRecipesResult as _, type RpcResponse as a, type LeaderboardEntry as a$, type GetBatchRecipeRequirements as a0, type TriggerRecipeChainOptions as a1, type RecipeRequirementResult as a2, VenusTransport as a3, type LoggingApi as a4, type IapApi as a5, type SpendCurrencyOptions as a6, type LoadEmbeddedAssetsResponse as a7, type SharedAssetsApi as a8, type LeaderboardApi as a9, type AiMessage as aA, type Asset as aB, type Category as aC, MockAvatarApi as aD, type TimeIntervalTriggerInput as aE, type NotificationTriggerInput as aF, type OnRequestCallback as aG, type OnResponseCallback as aH, type OnNotificationCallback as aI, type RpcTransport as aJ, VenusRoom as aK, type CreateRoomOptions as aL, type JoinOrCreateResult as aM, type RoomSubscriptionOptions as aN, type ProposeMovePayload as aO, type ProposeMoveResult as aP, type ValidateMoveResult as aQ, type ExecuteScopedRecipeOptions as aR, type RecipeInfo as aS, RpcSharedAssetsApi as aT, type LoadEmbeddedAssetsRequest as aU, type LeaderboardModeConfig as aV, type LeaderboardPeriodType as aW, type LeaderboardPeriodConfig as aX, type LeaderboardAntiCheatConfig as aY, type LeaderboardDisplaySettings as aZ, type LeaderboardConfig as a_, type StartRunResult as aa, type SubmitScoreOptions as ab, type SubmitScoreResult as ac, type GetLeaderboardOptions as ad, type LeaderboardResponse as ae, type PlayerStatsOptions as af, type PlayerStats as ag, type LeaderboardHighlightOptions as ah, type LeaderboardHighlightResponse as ai, type PreloaderApi as aj, type SocialApi as ak, type ShareMetadata as al, type ShareLinkResult as am, type SocialQRCodeOptions as an, type QRCodeResult as ao, type Avatar3dApi as ap, type AssetManifest as aq, type Avatar3dConfig as ar, type ShowEditorOptions as as, type Avatar3dEdits as at, type AdsApi as au, type PostApi as av, type RoomsApi as aw, type InitializationOptions as ax, type InitializationContext as ay, type HudInsets as az, type RpcNotification as b, type LeaderboardHighlightContext as b0, createHost as b1, type VenusSimulationState as b2, type VenusSimulationEffect as b3, type VenusSimulationRecipe as b4, type RecipeRequirementQuery as b5, type BatchRecipeRequirementsResult as b6, type VenusSimulationAPI as b7, type VenusConfig as b8, type VenusRoomsConfig as b9, type ActionSheetOption as ba, RpcClient as c, type NavigationStackInfo as d, type NotificationsApi as e, type ScheduleLocalNotification as f, type ScheduleNotificationOptions as g, type PopupsApi as h, type ActionSheetItem as i, type ShowActionSheetOptions as j, type ShowAlertOptions as k, type ShowConfirmOptions as l, type ShowToastOptions as m, type ShowInterstitialAdOptions as n, type ShowRewardedAdOptions as o, type ProfileApi as p, type Profile as q, type SubPath as r, type ServerTimeData as s, type AiApi as t, type AiChatCompletionRequest as u, type AiChatCompletionData as v, type HapticsApi as w, HapticFeedbackStyle as x, type FeaturesApi as y, type SleepCallback as z };
1421
+ export { type AwakeCallback as $, type ActionSheetOption as A, type BatchRecipeRequirementsResult as B, type ShowRewardedAdOptions as C, type ProfileApi as D, type CdnApi as E, type SubPath as F, type FetchBlobOptions as G, type Host as H, type ServerTimeData as I, type GetFutureTimeOptions as J, type AiApi as K, type AiChatCompletionRequest as L, type AiChatCompletionData as M, type NavigationApi as N, type HapticsApi as O, type Profile as P, type QuitOptions as Q, type RecipeRequirementResult as R, type StorageApi as S, type TimeApi as T, HapticFeedbackStyle as U, type VenusAPI as V, type FeaturesApi as W, type Experiment as X, type LifecycleApi as Y, type SleepCallback as Z, type Subscription as _, type VenusSimulationState as a, type RecipeInfo as a$, type PauseCallback as a0, type ResumeCallback as a1, type QuitCallback as a2, type SimulationApi as a3, type ExecuteRecipeOptions as a4, type CollectRecipeResult as a5, type GetActiveRunsOptions as a6, type ExecuteScopedRecipeResult as a7, type GetAvailableRecipesOptions as a8, type GetAvailableRecipesResult as a9, type AssetManifest as aA, type Avatar3dConfig as aB, type ShowEditorOptions as aC, type Avatar3dEdits as aD, type AdsApi as aE, type PostApi as aF, type RoomsApi as aG, type InitializationOptions as aH, type InitializationContext as aI, type HudInsets as aJ, type AiMessage as aK, type Asset as aL, type Category as aM, MockAvatarApi as aN, type TimeIntervalTriggerInput as aO, type NotificationTriggerInput as aP, type OnRequestCallback as aQ, type OnResponseCallback as aR, type OnNotificationCallback as aS, type RpcTransport as aT, type CreateRoomOptions as aU, type JoinOrCreateResult as aV, type RoomSubscriptionOptions as aW, type ProposeMovePayload as aX, type ProposeMoveResult as aY, type ValidateMoveResult as aZ, type ExecuteScopedRecipeOptions as a_, type Recipe as aa, type GetBatchRecipeRequirements as ab, type TriggerRecipeChainOptions as ac, VenusTransport as ad, type LoggingApi as ae, type IapApi as af, type SpendCurrencyOptions as ag, type LoadEmbeddedAssetsResponse as ah, type SharedAssetsApi as ai, type LeaderboardApi as aj, type ScoreToken as ak, type SubmitScoreParams as al, type SubmitScoreResult as am, type GetPagedScoresOptions as an, type PagedScoresResponse as ao, type PlayerRankOptions as ap, type PlayerRankResult as aq, type GetPodiumScoresOptions as ar, type PodiumScoresResponse as as, type PreloaderApi as at, type SocialApi as au, type ShareMetadata as av, type ShareLinkResult as aw, type SocialQRCodeOptions as ax, type QRCodeResult as ay, type Avatar3dApi as az, type VenusSimulationEffect as b, RpcSharedAssetsApi as b0, type LoadEmbeddedAssetsRequest as b1, type LeaderboardModeConfig as b2, type LeaderboardPeriodType as b3, type LeaderboardPeriodConfig as b4, type LeaderboardAntiCheatConfig as b5, type LeaderboardDisplaySettings as b6, type LeaderboardConfig as b7, type LeaderboardEntry as b8, type PodiumScoresContext as b9, createHost as ba, type VenusSimulationRecipe as c, type VenusSimulationConfig as d, type RecipeRequirementQuery as e, type VenusSimulationAPI as f, type VenusConfig as g, type VenusRoomsConfig as h, VenusRoom as i, type AnalyticsApi as j, type RpcRequest as k, type RpcResponse as l, type RpcNotification as m, RpcClient as n, type NavigationStackInfo as o, type PushAppOptions as p, type NotificationsApi as q, type ScheduleLocalNotification as r, type ScheduleNotificationOptions as s, type PopupsApi as t, type ActionSheetItem as u, type ShowActionSheetOptions as v, type ShowAlertOptions as w, type ShowConfirmOptions as x, type ShowToastOptions as y, type ShowInterstitialAdOptions as z };
@@ -614,6 +614,7 @@ interface LoggingApi {
614
614
  interface SharedAssetsApi {
615
615
  loadCharactersBundle(): Promise<ArrayBuffer>;
616
616
  loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
617
+ loadLibraryCode(libraryKey: string): Promise<string>;
617
618
  }
618
619
 
619
620
  declare class RpcSharedAssetsApi implements SharedAssetsApi {
@@ -622,6 +623,7 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
622
623
  constructor(rpcClient: RpcClient, venusApi: VenusAPI);
623
624
  loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
624
625
  loadCharactersBundle(): Promise<ArrayBuffer>;
626
+ loadLibraryCode(libraryKey: string): Promise<string>;
625
627
  }
626
628
  interface LoadEmbeddedAssetsRequest {
627
629
  assetKey: string;
@@ -668,25 +670,29 @@ interface LeaderboardConfig {
668
670
  maxDurationSec: number;
669
671
  minScore: number;
670
672
  maxScore: number;
671
- requiresHash: boolean;
672
- scoringFields: string[];
673
+ requiresToken: boolean;
674
+ enableScoreSealing: boolean;
675
+ scoreSealingSecret?: string;
673
676
  modes: Record<string, LeaderboardModeConfig>;
674
677
  periods: Record<string, LeaderboardPeriodConfig>;
675
678
  antiCheat: LeaderboardAntiCheatConfig;
676
679
  displaySettings: LeaderboardDisplaySettings;
677
680
  }
678
- interface StartRunResult {
679
- sessionId: string;
681
+ interface ScoreToken {
682
+ token: string;
680
683
  startTime: number;
681
684
  expiresAt: number;
682
- hashNonce?: string | null;
685
+ sealingNonce?: string | null;
686
+ sealingSecret?: string | null;
683
687
  mode: string;
684
688
  }
685
- interface SubmitScoreOptions {
689
+ interface SubmitScoreParams {
690
+ token?: string;
691
+ score: number;
692
+ duration: number;
686
693
  mode?: string;
687
694
  telemetry?: Record<string, any>;
688
695
  metadata?: Record<string, any>;
689
- hash?: string;
690
696
  }
691
697
  interface SubmitScoreResult {
692
698
  accepted: boolean;
@@ -694,7 +700,7 @@ interface SubmitScoreResult {
694
700
  zScore?: number | null;
695
701
  isAnomaly?: boolean;
696
702
  }
697
- interface GetLeaderboardOptions {
703
+ interface GetPagedScoresOptions {
698
704
  mode?: string;
699
705
  period?: string;
700
706
  periodDate?: number | string;
@@ -710,9 +716,9 @@ interface LeaderboardEntry {
710
716
  username: string;
711
717
  avatarUrl: string | null;
712
718
  score: number;
713
- durationSec: number;
719
+ duration: number;
714
720
  submittedAt: number;
715
- sessionId?: string;
721
+ token?: string;
716
722
  rank: number | null;
717
723
  zScore?: number | null;
718
724
  isAnomaly?: boolean;
@@ -722,7 +728,7 @@ interface LeaderboardEntry {
722
728
  metadata?: Record<string, any> | null;
723
729
  isSeed?: boolean;
724
730
  }
725
- interface LeaderboardResponse {
731
+ interface PagedScoresResponse {
726
732
  variant: 'standard' | 'highlight';
727
733
  entries: LeaderboardEntry[];
728
734
  totalEntries: number;
@@ -730,12 +736,12 @@ interface LeaderboardResponse {
730
736
  playerRank: number | null;
731
737
  periodInstance: string;
732
738
  }
733
- interface PlayerStatsOptions {
739
+ interface PlayerRankOptions {
734
740
  mode?: string;
735
741
  period?: string;
736
742
  periodDate?: number | string;
737
743
  }
738
- interface PlayerStats {
744
+ interface PlayerRankResult {
739
745
  rank: number | null;
740
746
  score?: number;
741
747
  totalPlayers: number;
@@ -743,7 +749,7 @@ interface PlayerStats {
743
749
  trustScore: number;
744
750
  periodInstance: string;
745
751
  }
746
- interface LeaderboardHighlightContext {
752
+ interface PodiumScoresContext {
747
753
  topEntries: LeaderboardEntry[];
748
754
  beforePlayer: LeaderboardEntry[];
749
755
  playerEntry?: LeaderboardEntry | null;
@@ -753,18 +759,18 @@ interface LeaderboardHighlightContext {
753
759
  omittedBefore: number;
754
760
  omittedAfter: number;
755
761
  }
756
- interface LeaderboardHighlightResponse extends LeaderboardResponse {
762
+ interface PodiumScoresResponse extends PagedScoresResponse {
757
763
  variant: 'highlight';
758
- context: LeaderboardHighlightContext;
764
+ context: PodiumScoresContext;
759
765
  }
760
- interface LeaderboardHighlightOptions extends Omit<GetLeaderboardOptions, 'variant'> {
766
+ interface GetPodiumScoresOptions extends Omit<GetPagedScoresOptions, 'variant'> {
761
767
  }
762
768
  interface LeaderboardApi {
763
- startRun(mode?: string): Promise<StartRunResult>;
764
- submitScore(sessionId: string, score: number, durationSec: number, options?: SubmitScoreOptions): Promise<SubmitScoreResult>;
765
- getLeaderboard(options?: GetLeaderboardOptions): Promise<LeaderboardResponse>;
766
- getPlayerStats(options?: PlayerStatsOptions): Promise<PlayerStats>;
767
- getLeaderboardHighlight(options?: LeaderboardHighlightOptions): Promise<LeaderboardHighlightResponse>;
769
+ createScoreToken(mode?: string): Promise<ScoreToken>;
770
+ submitScore(params: SubmitScoreParams): Promise<SubmitScoreResult>;
771
+ getPagedScores(options?: GetPagedScoresOptions): Promise<PagedScoresResponse>;
772
+ getMyRank(options?: PlayerRankOptions): Promise<PlayerRankResult>;
773
+ getPodiumScores(options?: GetPodiumScoresOptions): Promise<PodiumScoresResponse>;
768
774
  }
769
775
 
770
776
  interface PreloaderApi {
@@ -818,7 +824,7 @@ interface SocialApi {
818
824
  * - iOS / Android: opens the native share sheet.
819
825
  * - Web: copies the generated URL to the clipboard (with fallback toast).
820
826
  *
821
- * @param options.launchParams Arbitrary launch parameters (must include gameId).
827
+ * @param options.launchParams Arbitrary launch parameters for your game.
822
828
  * @param options.metadata Optional OpenGraph metadata for rich previews.
823
829
  * @returns The generated share URL.
824
830
  */
@@ -831,7 +837,7 @@ interface SocialApi {
831
837
  *
832
838
  * Games can render or print the returned QR image or re-use the share URL.
833
839
  *
834
- * @param options.launchParams Arbitrary launch parameters (must include gameId).
840
+ * @param options.launchParams Arbitrary launch parameters for your game.
835
841
  * @param options.metadata Optional OpenGraph metadata for the share.
836
842
  * @param options.qrOptions Customisation for the generated QR code.
837
843
  * @returns The generated share URL and QR code (as a data URL).
@@ -1081,6 +1087,10 @@ interface VenusSimulationAPI {
1081
1087
  sumContributions(contributions: Record<string, any>): Record<string, number>;
1082
1088
  }
1083
1089
  interface VenusConfig {
1090
+ /**
1091
+ * @deprecated Use VenusAPI.getLocale() and VenusAPI.getLanguageCode() instead. Will be removed in v4.0.0
1092
+ * TODO: Remove in SDK v4.0.0
1093
+ */
1084
1094
  user?: {
1085
1095
  id: string;
1086
1096
  username?: string;
@@ -1188,6 +1198,8 @@ interface VenusAPI {
1188
1198
  }): Promise<any>;
1189
1199
  getCurrentProfile(): Profile;
1190
1200
  getLaunchParams(): Record<string, string>;
1201
+ getLocale(): string;
1202
+ getLanguageCode(): string;
1191
1203
  /**
1192
1204
  * @deprecated Please use the popups API. (e.g, VenusAPI.popups)
1193
1205
  */
@@ -1406,4 +1418,4 @@ interface AdsApi {
1406
1418
  showInterstitialAd(options?: ShowInterstitialAdOptions): Promise<boolean>;
1407
1419
  }
1408
1420
 
1409
- export { type Recipe as $, type AnalyticsApi as A, type Subscription as B, type CdnApi as C, type AwakeCallback as D, type Experiment as E, type FetchBlobOptions as F, type GetFutureTimeOptions as G, type Host as H, type PauseCallback as I, type ResumeCallback as J, type QuitCallback as K, type LifecycleApi as L, type SimulationApi as M, type NavigationApi as N, type VenusSimulationConfig as O, type PushAppOptions as P, type QuitOptions as Q, type RpcRequest as R, type StorageApi as S, type TimeApi as T, type ExecuteRecipeOptions as U, type VenusAPI as V, type CollectRecipeResult as W, type GetActiveRunsOptions as X, type ExecuteScopedRecipeResult as Y, type GetAvailableRecipesOptions as Z, type GetAvailableRecipesResult as _, type RpcResponse as a, type LeaderboardEntry as a$, type GetBatchRecipeRequirements as a0, type TriggerRecipeChainOptions as a1, type RecipeRequirementResult as a2, VenusTransport as a3, type LoggingApi as a4, type IapApi as a5, type SpendCurrencyOptions as a6, type LoadEmbeddedAssetsResponse as a7, type SharedAssetsApi as a8, type LeaderboardApi as a9, type AiMessage as aA, type Asset as aB, type Category as aC, MockAvatarApi as aD, type TimeIntervalTriggerInput as aE, type NotificationTriggerInput as aF, type OnRequestCallback as aG, type OnResponseCallback as aH, type OnNotificationCallback as aI, type RpcTransport as aJ, VenusRoom as aK, type CreateRoomOptions as aL, type JoinOrCreateResult as aM, type RoomSubscriptionOptions as aN, type ProposeMovePayload as aO, type ProposeMoveResult as aP, type ValidateMoveResult as aQ, type ExecuteScopedRecipeOptions as aR, type RecipeInfo as aS, RpcSharedAssetsApi as aT, type LoadEmbeddedAssetsRequest as aU, type LeaderboardModeConfig as aV, type LeaderboardPeriodType as aW, type LeaderboardPeriodConfig as aX, type LeaderboardAntiCheatConfig as aY, type LeaderboardDisplaySettings as aZ, type LeaderboardConfig as a_, type StartRunResult as aa, type SubmitScoreOptions as ab, type SubmitScoreResult as ac, type GetLeaderboardOptions as ad, type LeaderboardResponse as ae, type PlayerStatsOptions as af, type PlayerStats as ag, type LeaderboardHighlightOptions as ah, type LeaderboardHighlightResponse as ai, type PreloaderApi as aj, type SocialApi as ak, type ShareMetadata as al, type ShareLinkResult as am, type SocialQRCodeOptions as an, type QRCodeResult as ao, type Avatar3dApi as ap, type AssetManifest as aq, type Avatar3dConfig as ar, type ShowEditorOptions as as, type Avatar3dEdits as at, type AdsApi as au, type PostApi as av, type RoomsApi as aw, type InitializationOptions as ax, type InitializationContext as ay, type HudInsets as az, type RpcNotification as b, type LeaderboardHighlightContext as b0, createHost as b1, type VenusSimulationState as b2, type VenusSimulationEffect as b3, type VenusSimulationRecipe as b4, type RecipeRequirementQuery as b5, type BatchRecipeRequirementsResult as b6, type VenusSimulationAPI as b7, type VenusConfig as b8, type VenusRoomsConfig as b9, type ActionSheetOption as ba, RpcClient as c, type NavigationStackInfo as d, type NotificationsApi as e, type ScheduleLocalNotification as f, type ScheduleNotificationOptions as g, type PopupsApi as h, type ActionSheetItem as i, type ShowActionSheetOptions as j, type ShowAlertOptions as k, type ShowConfirmOptions as l, type ShowToastOptions as m, type ShowInterstitialAdOptions as n, type ShowRewardedAdOptions as o, type ProfileApi as p, type Profile as q, type SubPath as r, type ServerTimeData as s, type AiApi as t, type AiChatCompletionRequest as u, type AiChatCompletionData as v, type HapticsApi as w, HapticFeedbackStyle as x, type FeaturesApi as y, type SleepCallback as z };
1421
+ export { type AwakeCallback as $, type ActionSheetOption as A, type BatchRecipeRequirementsResult as B, type ShowRewardedAdOptions as C, type ProfileApi as D, type CdnApi as E, type SubPath as F, type FetchBlobOptions as G, type Host as H, type ServerTimeData as I, type GetFutureTimeOptions as J, type AiApi as K, type AiChatCompletionRequest as L, type AiChatCompletionData as M, type NavigationApi as N, type HapticsApi as O, type Profile as P, type QuitOptions as Q, type RecipeRequirementResult as R, type StorageApi as S, type TimeApi as T, HapticFeedbackStyle as U, type VenusAPI as V, type FeaturesApi as W, type Experiment as X, type LifecycleApi as Y, type SleepCallback as Z, type Subscription as _, type VenusSimulationState as a, type RecipeInfo as a$, type PauseCallback as a0, type ResumeCallback as a1, type QuitCallback as a2, type SimulationApi as a3, type ExecuteRecipeOptions as a4, type CollectRecipeResult as a5, type GetActiveRunsOptions as a6, type ExecuteScopedRecipeResult as a7, type GetAvailableRecipesOptions as a8, type GetAvailableRecipesResult as a9, type AssetManifest as aA, type Avatar3dConfig as aB, type ShowEditorOptions as aC, type Avatar3dEdits as aD, type AdsApi as aE, type PostApi as aF, type RoomsApi as aG, type InitializationOptions as aH, type InitializationContext as aI, type HudInsets as aJ, type AiMessage as aK, type Asset as aL, type Category as aM, MockAvatarApi as aN, type TimeIntervalTriggerInput as aO, type NotificationTriggerInput as aP, type OnRequestCallback as aQ, type OnResponseCallback as aR, type OnNotificationCallback as aS, type RpcTransport as aT, type CreateRoomOptions as aU, type JoinOrCreateResult as aV, type RoomSubscriptionOptions as aW, type ProposeMovePayload as aX, type ProposeMoveResult as aY, type ValidateMoveResult as aZ, type ExecuteScopedRecipeOptions as a_, type Recipe as aa, type GetBatchRecipeRequirements as ab, type TriggerRecipeChainOptions as ac, VenusTransport as ad, type LoggingApi as ae, type IapApi as af, type SpendCurrencyOptions as ag, type LoadEmbeddedAssetsResponse as ah, type SharedAssetsApi as ai, type LeaderboardApi as aj, type ScoreToken as ak, type SubmitScoreParams as al, type SubmitScoreResult as am, type GetPagedScoresOptions as an, type PagedScoresResponse as ao, type PlayerRankOptions as ap, type PlayerRankResult as aq, type GetPodiumScoresOptions as ar, type PodiumScoresResponse as as, type PreloaderApi as at, type SocialApi as au, type ShareMetadata as av, type ShareLinkResult as aw, type SocialQRCodeOptions as ax, type QRCodeResult as ay, type Avatar3dApi as az, type VenusSimulationEffect as b, RpcSharedAssetsApi as b0, type LoadEmbeddedAssetsRequest as b1, type LeaderboardModeConfig as b2, type LeaderboardPeriodType as b3, type LeaderboardPeriodConfig as b4, type LeaderboardAntiCheatConfig as b5, type LeaderboardDisplaySettings as b6, type LeaderboardConfig as b7, type LeaderboardEntry as b8, type PodiumScoresContext as b9, createHost as ba, type VenusSimulationRecipe as c, type VenusSimulationConfig as d, type RecipeRequirementQuery as e, type VenusSimulationAPI as f, type VenusConfig as g, type VenusRoomsConfig as h, VenusRoom as i, type AnalyticsApi as j, type RpcRequest as k, type RpcResponse as l, type RpcNotification as m, RpcClient as n, type NavigationStackInfo as o, type PushAppOptions as p, type NotificationsApi as q, type ScheduleLocalNotification as r, type ScheduleNotificationOptions as s, type PopupsApi as t, type ActionSheetItem as u, type ShowActionSheetOptions as v, type ShowAlertOptions as w, type ShowConfirmOptions as x, type ShowToastOptions as y, type ShowInterstitialAdOptions as z };
@@ -0,0 +1,26 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __esm = (fn, res) => function __init() {
7
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
8
+ };
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
23
+
24
+ export { __esm, __export, __publicField, __toCommonJS };
25
+ //# sourceMappingURL=chunk-2PDL7CQK.mjs.map
26
+ //# sourceMappingURL=chunk-2PDL7CQK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-2PDL7CQK.mjs"}