@arkadiuminc/sdk 2.56.0 → 2.57.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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RpcProvider } from '../../core/rpc';
|
|
2
2
|
import { IHost } from '../host';
|
|
3
|
+
import { VirtualItemsApiProvider } from '../wallet';
|
|
3
4
|
|
|
4
5
|
export declare enum LifecycleEvent {
|
|
5
6
|
TEST_READY = 1,
|
|
@@ -29,11 +30,14 @@ export declare class GameLifecycleArena {
|
|
|
29
30
|
private rpcProvider;
|
|
30
31
|
private host;
|
|
31
32
|
private subscribers;
|
|
33
|
+
private virtualItemsApiProvider;
|
|
32
34
|
LifecycleEvent: typeof LifecycleEvent;
|
|
33
35
|
constructor(rpcProvider: RpcProvider, host: IHost);
|
|
36
|
+
setVirtualItemsApiProvider(provider: VirtualItemsApiProvider): void;
|
|
34
37
|
onEvent(event: LifecycleEvent, payload?: any): Promise<void>;
|
|
35
38
|
dispatchEvent(event: LifecycleEvent): Promise<void>;
|
|
36
39
|
subscribe(cb: LifecycleFn, override?: boolean): void;
|
|
40
|
+
onFtueEvent(eventId: string): Promise<boolean>;
|
|
37
41
|
OnTestReady(): Promise<void>;
|
|
38
42
|
OnGameStart(): Promise<void>;
|
|
39
43
|
OnInteract(): Promise<void>;
|
|
@@ -70,5 +74,6 @@ export declare class GameLifecycleGame {
|
|
|
70
74
|
onLevelStart(level: number): Promise<void>;
|
|
71
75
|
onLevelEnd(level: number): Promise<void>;
|
|
72
76
|
registerEventCallback(event: LifecycleEvent, callback: () => void): void;
|
|
77
|
+
onFtueEvent(eventId: string): Promise<boolean>;
|
|
73
78
|
}
|
|
74
79
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ApiEnv, Backend } from '../backend/backend.api';
|
|
2
|
+
import { ApiSet as VirtualItemApi } from '@arkadium/eagle-virtual-items-api-client';
|
|
2
3
|
import { GameLifecycleArena } from '../game-lifecycle/game-lifecycle.api';
|
|
3
4
|
import { RpcProvider } from '../../core/rpc';
|
|
4
5
|
|
|
@@ -7,7 +8,10 @@ export interface Wallet {
|
|
|
7
8
|
getGems(): Promise<number>;
|
|
8
9
|
consumeGems(amount: number): Promise<boolean>;
|
|
9
10
|
}
|
|
10
|
-
export
|
|
11
|
+
export interface VirtualItemsApiProvider {
|
|
12
|
+
getVirtualItemsApi(): VirtualItemApi;
|
|
13
|
+
}
|
|
14
|
+
export declare class WalletArena implements Wallet, VirtualItemsApiProvider {
|
|
11
15
|
private backendApi;
|
|
12
16
|
private lifecycle;
|
|
13
17
|
private virtualItemsApi;
|
|
@@ -16,6 +20,7 @@ export declare class WalletArena implements Wallet {
|
|
|
16
20
|
private isInited;
|
|
17
21
|
private _isGemsSupported;
|
|
18
22
|
constructor(backendApi: Backend, lifecycle: GameLifecycleArena, rpcProvider: RpcProvider);
|
|
23
|
+
getVirtualItemsApi(): VirtualItemApi;
|
|
19
24
|
init(env: ApiEnv): Promise<void>;
|
|
20
25
|
setGemsSupported(isSupported: boolean): void;
|
|
21
26
|
private isGemsSupported;
|