@betorigami/game-ui-shared 1.1.1 → 1.2.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.
- package/dist/components/shared/FairnessDetails/FairnessContent.d.ts +6 -4
- package/dist/components/shared/FairnessDetails/FairnessDetails.d.ts +0 -1
- package/dist/components/shared/GameComponent.d.ts +4 -0
- package/dist/components/shared/GameLayout/GameLayout.d.ts +1 -0
- package/dist/components/shared/GameProviderWrapper.d.ts +2 -0
- package/dist/components/shared/SessionLock/SessionLock.d.ts +10 -0
- package/dist/components/shared/SessionLock/SessionLock.styles.d.ts +1 -0
- package/dist/components/shared/context/game.context.d.ts +1 -0
- package/dist/controllers/history.controller.d.ts +15 -1
- package/dist/controllers/hotkey.controller.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +2398 -2121
- package/dist/shared/bet.types.d.ts +2 -0
- package/dist/shared/event-map.d.ts +1 -0
- package/dist/shared/provider-api/error-codes.d.ts +1 -0
- package/dist/translations/ar.json.d.ts +6 -0
- package/dist/translations/de.json.d.ts +6 -0
- package/dist/translations/en-soc.json.d.ts +6 -0
- package/dist/translations/en.json.d.ts +7 -0
- package/dist/translations/es.json.d.ts +6 -0
- package/dist/translations/fi.json.d.ts +6 -0
- package/dist/translations/fr.json.d.ts +6 -0
- package/dist/translations/hi.json.d.ts +6 -0
- package/dist/translations/id.json.d.ts +6 -0
- package/dist/translations/index.d.ts +103 -0
- package/dist/translations/ja.json.d.ts +6 -0
- package/dist/translations/ko.json.d.ts +6 -0
- package/dist/translations/pl.json.d.ts +6 -0
- package/dist/translations/pt.json.d.ts +6 -0
- package/dist/translations/ru.json.d.ts +6 -0
- package/dist/translations/tr.json.d.ts +6 -0
- package/dist/translations/vi.json.d.ts +6 -0
- package/dist/translations/zh.json.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement } from 'lit';
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
2
|
import { VerifierGameOptions } from '../../../shared/provably-fair-verifier';
|
|
3
3
|
export interface ProvablyFairData {
|
|
4
4
|
publicKey: string;
|
|
@@ -16,21 +16,22 @@ export declare class FairnessContent extends LitElement {
|
|
|
16
16
|
showBackButton: boolean;
|
|
17
17
|
private _copiedFields;
|
|
18
18
|
private _copyTimeouts;
|
|
19
|
-
baseUrl: string;
|
|
20
19
|
private activeClientSeed;
|
|
20
|
+
private currentNonce;
|
|
21
21
|
private _isLoadingClientSeed;
|
|
22
22
|
private _hasClientSeedChanged;
|
|
23
23
|
private newClientSeed;
|
|
24
24
|
private _isSavingClientSeed;
|
|
25
|
-
private authToken;
|
|
26
25
|
private _showProvablyFairInfo;
|
|
27
26
|
private _onAccordionClick;
|
|
28
27
|
private gameConsumer;
|
|
29
28
|
private _clientSeedChangedHandler;
|
|
29
|
+
private _nonceChangedHandler;
|
|
30
30
|
private _previousHistoryController?;
|
|
31
31
|
connectedCallback(): void;
|
|
32
32
|
disconnectedCallback(): void;
|
|
33
|
-
updated(changedProperties:
|
|
33
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
34
|
+
private _trackClientSeedLoading;
|
|
34
35
|
private _setupHistoryController;
|
|
35
36
|
private _cleanupHistoryController;
|
|
36
37
|
changeClientSeed(): Promise<void>;
|
|
@@ -43,6 +44,7 @@ export declare class FairnessContent extends LitElement {
|
|
|
43
44
|
private _renderClientSeedInputs;
|
|
44
45
|
private get _resolvedPublicKey();
|
|
45
46
|
private _renderVerificationInputs;
|
|
47
|
+
private _renderNonceInput;
|
|
46
48
|
render(): import('lit').TemplateResult<1>;
|
|
47
49
|
private _renderProvablyFairInfo;
|
|
48
50
|
}
|
|
@@ -3,7 +3,6 @@ import { ProvablyFairData } from './FairnessContent';
|
|
|
3
3
|
export type FairnessDetailsTab = 'Fairness' | 'History';
|
|
4
4
|
export declare class FairnessDetails extends LitElement {
|
|
5
5
|
static styles: import('lit').CSSResult[];
|
|
6
|
-
private gameConsumer;
|
|
7
6
|
provablyFairData: ProvablyFairData;
|
|
8
7
|
activeTab: FairnessDetailsTab;
|
|
9
8
|
showExtendedFields: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AutobetToggleEvent } from '../../shared/event-map';
|
|
2
2
|
import { default as OrigamiElement } from '../../shared/origami-element';
|
|
3
|
+
import { ErrorCode } from '../../shared/provider-api/error-codes';
|
|
3
4
|
import { BetMode } from './GameSidebar/GameSidebar';
|
|
4
5
|
import { AutobetEventPayload } from './GenericAutobet/GenericAutobet';
|
|
5
6
|
import { default as Big } from 'big.js';
|
|
@@ -14,6 +15,7 @@ export interface GameBetResult {
|
|
|
14
15
|
pnl: Big;
|
|
15
16
|
gameOutcome: 'Win' | 'Loss' | 'Draw';
|
|
16
17
|
hasError: boolean;
|
|
18
|
+
errorCode?: ErrorCode;
|
|
17
19
|
errorMessage?: string;
|
|
18
20
|
}
|
|
19
21
|
export declare abstract class GameComponent extends OrigamiElement {
|
|
@@ -72,6 +74,8 @@ export declare abstract class GameComponent extends OrigamiElement {
|
|
|
72
74
|
protected adjustBetAmount(autobetSettings: AutobetSettingsWithId, gameOutcome: 'Win' | 'Loss' | 'Draw', originalBetAmount: string, currentBetAmount: string): string;
|
|
73
75
|
protected isPnLWithinLimits(autobetSettings: AutobetSettingsWithId, totalPnL: Big): boolean;
|
|
74
76
|
protected updateHistoryWithBet(betResult: NewBetItem): void;
|
|
77
|
+
protected setActiveBetNonce(nonce: number): void;
|
|
78
|
+
protected checkSessionExpired: (errorCode: ErrorCode) => void;
|
|
75
79
|
protected showError(message: string): void;
|
|
76
80
|
protected playWinFeedback(): void;
|
|
77
81
|
}
|
|
@@ -19,6 +19,7 @@ export declare class GameLayout extends OrigamiElement {
|
|
|
19
19
|
private navigateToModal;
|
|
20
20
|
private historyHasNextPage;
|
|
21
21
|
private isLoadingMoreHistory;
|
|
22
|
+
private get sessionLocked();
|
|
22
23
|
private get gameFooterPosition();
|
|
23
24
|
get isDemoMode(): boolean;
|
|
24
25
|
private getCustomBackgroundUrl;
|
|
@@ -21,6 +21,7 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
21
21
|
maxBet: number | null;
|
|
22
22
|
edge: 8 | 2 | 1 | 3 | 4;
|
|
23
23
|
showCurrencyAsText: boolean;
|
|
24
|
+
sessionLocked: boolean;
|
|
24
25
|
footerPosition: 'ABOVE' | 'BELOW';
|
|
25
26
|
logoUrl: string | null;
|
|
26
27
|
alwaysEnableMaxBetButton: boolean;
|
|
@@ -82,6 +83,7 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
82
83
|
private _resizeObserver;
|
|
83
84
|
private hasLoadedBalance;
|
|
84
85
|
protected _gameProvider: ContextProvider<typeof gameContext>;
|
|
86
|
+
private handleSessionExpired;
|
|
85
87
|
connectedCallback(): void;
|
|
86
88
|
firstUpdated(_changed: PropertyValues): Promise<void>;
|
|
87
89
|
disconnectedCallback(): void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as OrigamiElement } from '../../../shared/origami-element';
|
|
2
|
+
import { gameContextType } from '../context/game.context';
|
|
3
|
+
export declare class SessionLock extends OrigamiElement {
|
|
4
|
+
static styles: import('lit').CSSResult[];
|
|
5
|
+
gameData: gameContextType;
|
|
6
|
+
private lobbyButton?;
|
|
7
|
+
protected firstUpdated(): Promise<void>;
|
|
8
|
+
private handleLobby;
|
|
9
|
+
render(): import('lit').TemplateResult<1>;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sessionLockStyles: import('lit').CSSResult;
|
|
@@ -20,6 +20,10 @@ export type NewBetItem = {
|
|
|
20
20
|
export type NewHistoryItem = NewBetItem & {
|
|
21
21
|
readonly currency: Currency;
|
|
22
22
|
};
|
|
23
|
+
export declare class NonceChangedEvent extends Event {
|
|
24
|
+
readonly nonce: number | null;
|
|
25
|
+
constructor(nonce: number | null);
|
|
26
|
+
}
|
|
23
27
|
export declare class HistoryController extends EventTarget {
|
|
24
28
|
private host;
|
|
25
29
|
private _historyData;
|
|
@@ -29,16 +33,21 @@ export declare class HistoryController extends EventTarget {
|
|
|
29
33
|
private _initialLoadSize;
|
|
30
34
|
private _hasLoadedMore;
|
|
31
35
|
private _clientSeed;
|
|
36
|
+
private _highestKnownNonce;
|
|
37
|
+
private _activeBetNonce;
|
|
32
38
|
private _hasLoadedClientSeed;
|
|
39
|
+
private _provablyFairInfoAbortController;
|
|
33
40
|
constructor(host: GameHost);
|
|
34
41
|
get historyData(): HistoryItem[];
|
|
35
42
|
get hasData(): boolean | null;
|
|
36
43
|
get isInitialized(): boolean;
|
|
37
44
|
get hasNextPage(): boolean;
|
|
38
45
|
get clientSeed(): string | null;
|
|
46
|
+
get nonce(): number | null;
|
|
39
47
|
get hasLoadedClientSeed(): boolean;
|
|
40
48
|
private notifyDataChanged;
|
|
41
49
|
private notifyClientSeedChanged;
|
|
50
|
+
private notifyNonceChanged;
|
|
42
51
|
private preloadHistory;
|
|
43
52
|
fetchHistory(beforeId?: string, numberToFetch?: number): Promise<{
|
|
44
53
|
historyData: HistoryItem[];
|
|
@@ -50,7 +59,12 @@ export declare class HistoryController extends EventTarget {
|
|
|
50
59
|
hasNextPage: boolean;
|
|
51
60
|
}>;
|
|
52
61
|
addNewBet(betResult: NewHistoryItem): void;
|
|
62
|
+
setActiveBetNonce(nonce: number): void;
|
|
63
|
+
private clearActiveBetNonce;
|
|
64
|
+
private recordNonce;
|
|
53
65
|
loadClientSeed(): Promise<void>;
|
|
54
|
-
|
|
66
|
+
refreshProvablyFairInfo(): Promise<void>;
|
|
67
|
+
saveClientSeed(clientSeed: string): Promise<void>;
|
|
68
|
+
private fetchProvablyFairInfo;
|
|
55
69
|
}
|
|
56
70
|
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -182,6 +182,8 @@ export * from './utils/game-layout-style';
|
|
|
182
182
|
export * from './utils/scroll';
|
|
183
183
|
export * from './utils/slot.controller';
|
|
184
184
|
export * from './utils/tabbable';
|
|
185
|
+
export * from './components/shared/SessionLock/SessionLock.styles';
|
|
186
|
+
export * from './components/shared/SessionLock/SessionLock';
|
|
185
187
|
export * from './components/shared/GameProviderWrapper';
|
|
186
188
|
export * from './components/shared/GameProviderWrapper.styles';
|
|
187
189
|
export * from './components/shared/BetDetailsComponent/BetDetailsComponent';
|