@arkadiuminc/sdk 2.67.1 → 2.69.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.
@@ -3,7 +3,7 @@ import { AnalyticsProviderType, IAnalyticConfig } from './defs';
3
3
  import { DimensionsObject, Dimension } from './dimensions';
4
4
  import { IHost } from '../host';
5
5
  import { DebugProvider } from '../../core/debug-provider';
6
- import { ApiEnv } from '../backend/backend.api';
6
+ import { AuthArena } from '../auth';
7
7
 
8
8
  interface EnvironmentVersion {
9
9
  GameKey: string;
@@ -30,13 +30,13 @@ export declare class AnalyticsApi implements AnalyticsApiContract {
30
30
  private host;
31
31
  private rpcProvider;
32
32
  private debugProvider;
33
- private arenaEnvironment;
33
+ private auth;
34
34
  private providers;
35
35
  private configuredProviders;
36
36
  private disabledProviders;
37
37
  private info;
38
38
  providersTypes: typeof AnalyticsProviderType;
39
- constructor(host: IHost, rpcProvider: RpcProvider, debugProvider: DebugProvider, arenaEnvironment: ApiEnv);
39
+ constructor(host: IHost, rpcProvider: RpcProvider, debugProvider: DebugProvider, auth: AuthArena);
40
40
  getEnvVersion(): Promise<EnvironmentVersion>;
41
41
  setGameVersion(v: string): Promise<void>;
42
42
  setNestVersion(v: string): Promise<void>;
@@ -2,6 +2,7 @@ import { Backend } from '../backend/backend.api';
2
2
  import { createStore } from '../../utils/observable';
3
3
  import { RpcProvider } from '../../core/rpc';
4
4
  import { IHost } from '../host';
5
+ import { PersistenceArena } from '../persistence';
5
6
 
6
7
  interface Image {
7
8
  png: string;
@@ -31,6 +32,10 @@ interface AuthUIManagerContract {
31
32
  onOpenAuthForm(observer: any): void;
32
33
  }
33
34
  export declare function getAvatarLink(avatarName: string, extension: string): string;
35
+ interface UserIdentity {
36
+ eagleId: string | undefined;
37
+ uniqueArkId: string;
38
+ }
34
39
  export declare abstract class Auth {
35
40
  private backendApi;
36
41
  protected userProfileReader: UserProfileReaderContract;
@@ -48,12 +53,15 @@ export declare abstract class Auth {
48
53
  getUserId(): Promise<string | undefined>;
49
54
  }
50
55
  export declare class AuthArena extends Auth {
51
- constructor(backendApi: Backend, host: IHost, rpcProvider: RpcProvider);
56
+ private persistence;
57
+ constructor(backendApi: Backend, host: IHost, rpcProvider: RpcProvider, persistence: PersistenceArena);
52
58
  getUserProfile(): Promise<UserProfile | null>;
59
+ getUserIdentity(): Promise<UserIdentity>;
53
60
  }
54
61
  export declare class AuthGame extends Auth {
55
62
  private rpcProvider;
56
63
  constructor(backendApi: Backend, host: IHost, rpcProvider: RpcProvider);
57
64
  getUserProfile(): Promise<UserProfile | null>;
65
+ getUserIdentity(): Promise<UserIdentity | undefined>;
58
66
  }
59
67
  export {};
@@ -59,10 +59,8 @@ export declare class WalletArena implements Wallet, VirtualItemsApiProvider {
59
59
  */
60
60
  getGems(): Promise<number>;
61
61
  /**
62
- * Consumes the desired amount of gems from the user wallet
63
- * @param amount
64
- * @returns true if the spending of the gem amount was successful, false otherwise
65
- */
62
+ * @deprecated Use purchaseBundle instead
63
+ */
66
64
  consumeGems(amount: number): Promise<boolean>;
67
65
  getBundles(): Promise<Bundles>;
68
66
  purchaseBundle(bundleSku: string, amount?: number): Promise<boolean>;
@@ -82,10 +80,8 @@ export declare class WalletGame implements Wallet {
82
80
  */
83
81
  getGems(): Promise<number>;
84
82
  /**
85
- * Consumes the desired amount of gems from the user wallet
86
- * @param amount
87
- * @returns true if the spending of the gem amount was successful, false otherwise
88
- */
83
+ * @deprecated Use purchaseBundle instead
84
+ */
89
85
  consumeGems(amount: number): Promise<boolean>;
90
86
  isGemsSupported(): Promise<boolean>;
91
87
  getBundles(): Promise<Bundles>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkadiuminc/sdk",
3
- "version": "2.67.1",
3
+ "version": "2.69.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "main": "dist/pkg/arkadium-sdk.umd.js",