@series-inc/venus-sdk 3.1.1 → 3.1.2-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.
@@ -819,8 +819,7 @@ interface LoggingApi {
819
819
  }
820
820
 
821
821
  interface SharedAssetsApi {
822
- loadCharactersBundle(): Promise<ArrayBuffer>;
823
- loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
822
+ loadAssetsBundle(game: string, bundleKey: string): Promise<ArrayBuffer>;
824
823
  loadLibraryCode(libraryKey: string): Promise<string>;
825
824
  }
826
825
 
@@ -828,8 +827,7 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
828
827
  private readonly venusApi;
829
828
  private readonly rpcClient;
830
829
  constructor(rpcClient: RpcClient, venusApi: VenusAPI);
831
- loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
832
- loadCharactersBundle(): Promise<ArrayBuffer>;
830
+ loadAssetsBundle(game: string, bundleKey: string): Promise<ArrayBuffer>;
833
831
  loadLibraryCode(libraryKey: string): Promise<string>;
834
832
  }
835
833
  interface LoadEmbeddedAssetsRequest {
@@ -819,8 +819,7 @@ interface LoggingApi {
819
819
  }
820
820
 
821
821
  interface SharedAssetsApi {
822
- loadCharactersBundle(): Promise<ArrayBuffer>;
823
- loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
822
+ loadAssetsBundle(game: string, bundleKey: string): Promise<ArrayBuffer>;
824
823
  loadLibraryCode(libraryKey: string): Promise<string>;
825
824
  }
826
825
 
@@ -828,8 +827,7 @@ declare class RpcSharedAssetsApi implements SharedAssetsApi {
828
827
  private readonly venusApi;
829
828
  private readonly rpcClient;
830
829
  constructor(rpcClient: RpcClient, venusApi: VenusAPI);
831
- loadBurgerTimeAssetsBundle(): Promise<ArrayBuffer>;
832
- loadCharactersBundle(): Promise<ArrayBuffer>;
830
+ loadAssetsBundle(game: string, bundleKey: string): Promise<ArrayBuffer>;
833
831
  loadLibraryCode(libraryKey: string): Promise<string>;
834
832
  }
835
833
  interface LoadEmbeddedAssetsRequest {
@@ -3422,7 +3422,7 @@ function initializeTime(venusApi, host) {
3422
3422
  }
3423
3423
 
3424
3424
  // src/version.ts
3425
- var SDK_VERSION = "3.1.1";
3425
+ var SDK_VERSION = "3.1.2-beta.0";
3426
3426
 
3427
3427
  // src/shared-assets/embeddedLibrariesManifest.ts
3428
3428
  var DEFAULT_SHARED_LIB_CDN_BASE = "https://venus-static-01293ak.web.app/libs";
@@ -3593,10 +3593,6 @@ function base64ToUtf8(base64) {
3593
3593
  return decodeURIComponent(escape(result));
3594
3594
  }
3595
3595
 
3596
- // src/shared-assets/consts.ts
3597
- var BurgerTimeAssetsCdnPath = "burger-time/Core.stow";
3598
- var CharacterAssetsCdnPath = "burger-time/Character.stow";
3599
-
3600
3596
  // src/shared-assets/RpcSharedAssetsApi.ts
3601
3597
  var RpcSharedAssetsApi = class {
3602
3598
  constructor(rpcClient, venusApi) {
@@ -3605,33 +3601,18 @@ var RpcSharedAssetsApi = class {
3605
3601
  this.rpcClient = rpcClient;
3606
3602
  this.venusApi = venusApi;
3607
3603
  }
3608
- async loadBurgerTimeAssetsBundle() {
3609
- try {
3610
- const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
3611
- assetKey: "burgerTimeCoreBundle"
3612
- });
3613
- return base64ToArrayBuffer(response.base64Data);
3614
- } catch (err) {
3615
- try {
3616
- const blob = await this.venusApi.cdn.fetchBlob(BurgerTimeAssetsCdnPath);
3617
- return await blob.arrayBuffer();
3618
- } catch (e) {
3619
- throw new Error("Failed to load burgerTimeAssetsBundle");
3620
- }
3621
- }
3622
- }
3623
- async loadCharactersBundle() {
3604
+ async loadAssetsBundle(game, bundleKey) {
3624
3605
  try {
3625
3606
  const response = await this.rpcClient.callT("H5_LOAD_EMBEDDED_ASSET" /* H5_LOAD_EMBEDDED_ASSET */, {
3626
- assetKey: "characters"
3607
+ assetKey: bundleKey
3627
3608
  });
3628
3609
  return base64ToArrayBuffer(response.base64Data);
3629
3610
  } catch (err) {
3630
3611
  try {
3631
- const blob = await this.venusApi.cdn.fetchBlob(CharacterAssetsCdnPath);
3612
+ const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}`);
3632
3613
  return await blob.arrayBuffer();
3633
3614
  } catch (e) {
3634
- throw new Error("Failed to load charactersBundle");
3615
+ throw new Error(`Failed to load ${bundleKey}`);
3635
3616
  }
3636
3617
  }
3637
3618
  }
@@ -3669,12 +3650,8 @@ var MockSharedAssetsApi = class {
3669
3650
  __publicField(this, "venusApi");
3670
3651
  this.venusApi = venusApi;
3671
3652
  }
3672
- async loadBurgerTimeAssetsBundle() {
3673
- const blob = await this.venusApi.cdn.fetchBlob(BurgerTimeAssetsCdnPath);
3674
- return await blob.arrayBuffer();
3675
- }
3676
- async loadCharactersBundle() {
3677
- const blob = await this.venusApi.cdn.fetchBlob(CharacterAssetsCdnPath);
3653
+ async loadAssetsBundle(game, bundleKey) {
3654
+ const blob = await this.venusApi.cdn.fetchBlob(`${game}/${bundleKey}`);
3678
3655
  return await blob.arrayBuffer();
3679
3656
  }
3680
3657
  async loadLibraryCode(libraryKey) {
@@ -5168,5 +5145,5 @@ function initializeSocial(venusApi, host) {
5168
5145
  }
5169
5146
 
5170
5147
  export { DEFAULT_SHARED_LIB_CDN_BASE, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, HASH_ALGORITHM_NODE, HASH_ALGORITHM_WEB_CRYPTO, HapticFeedbackStyle, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, MODULE_TO_LIBRARY_SPECIFIERS, MockAdsApi, MockAiApi, MockAnalyticsApi, MockAvatarApi, MockCdnApi, MockDeviceApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLeaderboardApi, MockLifecycleApi, MockLoggingApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockSocialApi, MockStorageApi, MockSystemApi, MockTimeApi, RemoteHost, RpcAdsApi, RpcAiApi, RpcAnalyticsApi, RpcAvatarApi, RpcClient, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcLeaderboardApi, RpcLifecycleApi, RpcLoggingApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRoomsApi, RpcSharedAssetsApi, RpcSimulationApi, RpcSocialApi, RpcStorageApi, SDK_VERSION, VenusMessageId, VenusRoom, base64ToArrayBuffer, base64ToUtf8, computeScoreHash, createHost, createMockStorageApi, getLibraryDefinition, initializeAds, initializeAi, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLeaderboard, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeSimulation, initializeSocial, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, isPacificDaylightTime, setupRoomNotifications };
5171
- //# sourceMappingURL=chunk-FTIFUYDL.mjs.map
5172
- //# sourceMappingURL=chunk-FTIFUYDL.mjs.map
5148
+ //# sourceMappingURL=chunk-QQTWO5KS.mjs.map
5149
+ //# sourceMappingURL=chunk-QQTWO5KS.mjs.map