@betorigami/games 0.7.27 → 0.7.29

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 (3) hide show
  1. package/dist/index.d.ts +102 -83
  2. package/dist/index.mjs +1663 -2071
  3. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -22,6 +22,12 @@ declare enum Currency {
22
22
  RUB = "RUB",
23
23
  TRY = "TRY"
24
24
  }
25
+ declare enum OrigamiGame {
26
+ DICE = "DICE",
27
+ MINES = "MINES",
28
+ KENO = "KENO",
29
+ LIMBO = "LIMBO"
30
+ }
25
31
  export type EventTypeRequiresDetail<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? never : Partial<GlobalEventHandlersEventMap[T]["detail"]> extends GlobalEventHandlersEventMap[T]["detail"] ? never : T : never : never;
26
32
  export type EventTypeDoesNotRequireDetail<T> = T extends keyof GlobalEventHandlersEventMap ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, unknown>> ? GlobalEventHandlersEventMap[T] extends CustomEvent<Record<PropertyKey, never>> ? T : Partial<GlobalEventHandlersEventMap[T]["detail"]> extends GlobalEventHandlersEventMap[T]["detail"] ? T : never : T : T;
27
33
  export type EventTypesWithRequiredDetail = {
@@ -510,6 +516,9 @@ export declare const translations: {
510
516
  thisFieldIsRequired: string;
511
517
  toggleSwitch: string;
512
518
  rangeSlider: string;
519
+ gameInfo: string;
520
+ copied: string;
521
+ infoIntro: string;
513
522
  };
514
523
  games: {
515
524
  dice: {
@@ -541,6 +550,8 @@ export declare const translations: {
541
550
  crashed: string;
542
551
  cashout: string;
543
552
  targetMultiplier: string;
553
+ multiplierError: string;
554
+ winChanceError: string;
544
555
  };
545
556
  mines: {
546
557
  title: string;
@@ -584,6 +595,7 @@ export declare const translations: {
584
595
  fairnessAndHistory: string;
585
596
  gameArea: string;
586
597
  gameControls: string;
598
+ gameInfo: string;
587
599
  };
588
600
  alerts: {
589
601
  betPlaced: string;
@@ -616,6 +628,15 @@ export declare const translations: {
616
628
  enterProof: string;
617
629
  enterRandomness: string;
618
630
  outcomeCalculationInfo: string;
631
+ learnMore: string;
632
+ info: {
633
+ p1: string;
634
+ p2: string;
635
+ p3: string;
636
+ p4: string;
637
+ moreInfo: string;
638
+ };
639
+ newClientSeed: string;
619
640
  pendingInputs: string;
620
641
  provableFairnessVerified: string;
621
642
  provableFairnessUnverified: string;
@@ -625,11 +646,6 @@ export declare const translations: {
625
646
  outcomeNotVerified: string;
626
647
  verified: string;
627
648
  };
628
- outcomes: {
629
- draw: string;
630
- win: string;
631
- loss: string;
632
- };
633
649
  share: {
634
650
  betResultTitle: string;
635
651
  betResultText: string;
@@ -639,18 +655,62 @@ export declare const translations: {
639
655
  multiplierRange: string;
640
656
  winChanceRange: string;
641
657
  };
642
- limbo: {
643
- multiplierRange: string;
644
- winChanceRange: string;
645
- };
646
- insufficientBalance: string;
647
- connection: string;
648
- game: string;
649
658
  };
650
659
  accessibility: {
651
- gameInProgress: string;
652
- betPlacedAnnouncement: string;
653
- languageChanged: string;
660
+ sliderValue: string;
661
+ };
662
+ gameInfo: {
663
+ howItWorks: string;
664
+ tutorial: string;
665
+ payouts: string;
666
+ tips: string;
667
+ strategyTitle: string;
668
+ dice: {
669
+ title: string;
670
+ overview: string;
671
+ how1: string;
672
+ how2: string;
673
+ how3: string;
674
+ how4: string;
675
+ how5: string;
676
+ how6: string;
677
+ strategyTip: string;
678
+ provablyFair: string;
679
+ };
680
+ keno: {
681
+ title: string;
682
+ overview: string;
683
+ how1: string;
684
+ how2: string;
685
+ how3: string;
686
+ how4: string;
687
+ how5: string;
688
+ strategyTip: string;
689
+ provablyFair: string;
690
+ };
691
+ mines: {
692
+ title: string;
693
+ overview: string;
694
+ how1: string;
695
+ how2: string;
696
+ how3: string;
697
+ how4: string;
698
+ how5: string;
699
+ how6: string;
700
+ strategyTip: string;
701
+ provablyFair: string;
702
+ };
703
+ limbo: {
704
+ title: string;
705
+ overview: string;
706
+ how1: string;
707
+ how2: string;
708
+ how3: string;
709
+ how4: string;
710
+ how5: string;
711
+ strategyTip: string;
712
+ provablyFair: string;
713
+ };
654
714
  };
655
715
  };
656
716
  readonly es: {
@@ -3334,7 +3394,11 @@ export type LimboEndAction = {
3334
3394
  result: number[];
3335
3395
  randomMultiplier: string;
3336
3396
  };
3337
- export type MinesStartAction = {};
3397
+ export type MinesStartAction = {
3398
+ minesCount: number;
3399
+ selectedTiles: number[];
3400
+ hasCashedOut: boolean;
3401
+ };
3338
3402
  export interface Action {
3339
3403
  id: string;
3340
3404
  data: {
@@ -3464,12 +3528,6 @@ export type gameContextType = {
3464
3528
  declare const gameContext: {
3465
3529
  __context__: gameContextType;
3466
3530
  };
3467
- declare enum OrigamiGame {
3468
- DICE = "DICE",
3469
- MINES = "MINES",
3470
- KENO = "KENO",
3471
- LIMBO = "LIMBO"
3472
- }
3473
3531
  export declare class GameProviderWrapper extends OrigamiElement {
3474
3532
  currency: Currency;
3475
3533
  showCurrencyAsText: boolean;
@@ -3514,7 +3572,6 @@ export declare class BetDetailsComponent extends OrigamiElement {
3514
3572
  baseUrl: string;
3515
3573
  betId: string;
3516
3574
  private _betDetails;
3517
- private _isMobile;
3518
3575
  private get _gameName();
3519
3576
  private get _roundId();
3520
3577
  private get _timestamp();
@@ -3524,8 +3581,6 @@ export declare class BetDetailsComponent extends OrigamiElement {
3524
3581
  private get _payout();
3525
3582
  render(): TemplateResult<1>;
3526
3583
  connectedCallback(): Promise<void>;
3527
- disconnectedCallback(): void;
3528
- private _resizeHandler;
3529
3584
  private handleShare;
3530
3585
  private fetchBetDetails;
3531
3586
  }
@@ -3615,6 +3670,7 @@ declare abstract class GameComponent extends OrigamiElement {
3615
3670
  static styles: import("lit").CSSResult[];
3616
3671
  private gameConsumer;
3617
3672
  get gameData(): gameContextType;
3673
+ get isDemoMode(): boolean;
3618
3674
  get isToggleDisabled(): boolean;
3619
3675
  get areInputsDisabled(): boolean;
3620
3676
  protected getDelay(normalDelay: number): number;
@@ -3788,6 +3844,8 @@ declare class LimboApi {
3788
3844
  static calculateMultiplier(winChance: number): string;
3789
3845
  static calculateWinChance(targetMultiplier: number): string;
3790
3846
  static calculateProfitOnWin(amount: string, targetMultiplier: number): string;
3847
+ static isValidMultiplier(multiplier: string): boolean;
3848
+ static isValidWinChance(winChance: string): boolean;
3791
3849
  }
3792
3850
  declare class MockLimboApi {
3793
3851
  private static getRandomMultiplier;
@@ -3824,53 +3882,14 @@ export declare class LimboGame extends GameComponent {
3824
3882
  multiplierAnimationEnd: (e: LimboMultiplierAnimationEndEvent) => void;
3825
3883
  render(): import("lit-html").TemplateResult<1>;
3826
3884
  }
3827
- export interface MinesData {
3828
- minesResult: number[];
3829
- minesCount: number;
3830
- winMultiplier: string;
3831
- selected: number[];
3832
- }
3833
- export interface MinesAction {
3834
- id: string;
3835
- data: {
3836
- mines: MinesData;
3837
- };
3838
- type: OrigamiActionType;
3839
- actionIndex: number;
3840
- originalActionId: string | null;
3841
- betAmount: string;
3842
- payoutAmount: string;
3843
- }
3844
- interface BetResult$1 {
3845
- id: string;
3846
- tenantId: string;
3847
- userId: string;
3848
- usdRate: number;
3849
- gameId: string;
3850
- currency: Currency;
3851
- edge: number;
3852
- amount: string;
3853
- payout: string;
3854
- afterBalance: string;
3855
- maxPayoutReached: boolean;
3856
- multiplier: number;
3857
- clientSeed: string;
3858
- randomValue: string;
3859
- proof: string | null;
3860
- nonce: string | null;
3861
- completedAt: string | null;
3862
- actions: MinesAction[];
3863
- }
3864
3885
  export type MinesManualStartArgs = {
3865
3886
  currency: Currency;
3866
3887
  amount: string;
3867
- windowId?: string;
3868
- usdAmount?: number;
3869
3888
  minesCount: number;
3870
3889
  };
3871
3890
  export type MinesNextArgs = {
3872
- betId: string;
3873
- selected: number[];
3891
+ betId?: string;
3892
+ selectedTiles: number[];
3874
3893
  };
3875
3894
  export type MinesAutoArgs = {
3876
3895
  currency: Currency;
@@ -3878,7 +3897,7 @@ export type MinesAutoArgs = {
3878
3897
  windowId?: string;
3879
3898
  usdAmount?: number;
3880
3899
  minesCount?: number;
3881
- selected: number[];
3900
+ selectedTiles: number[];
3882
3901
  };
3883
3902
  declare class MinesApi {
3884
3903
  private authToken;
@@ -3886,7 +3905,7 @@ declare class MinesApi {
3886
3905
  constructor(authToken: string, baseUrl: string);
3887
3906
  startManualBet(data: MinesManualStartArgs): Promise<{
3888
3907
  success: true;
3889
- data: BetResult$1;
3908
+ data: BetResult;
3890
3909
  error?: undefined;
3891
3910
  } | {
3892
3911
  success: false;
@@ -3899,12 +3918,12 @@ declare class MinesApi {
3899
3918
  data?: undefined;
3900
3919
  } | {
3901
3920
  success: true;
3902
- data: BetResult$1;
3921
+ data: BetResult;
3903
3922
  error?: undefined;
3904
3923
  }>;
3905
3924
  selectTile(minesNextArgs: MinesNextArgs): Promise<{
3906
3925
  success: true;
3907
- data: BetResult$1;
3926
+ data: BetResult;
3908
3927
  error?: undefined;
3909
3928
  } | {
3910
3929
  success: false;
@@ -3913,7 +3932,7 @@ declare class MinesApi {
3913
3932
  }>;
3914
3933
  cashout(): Promise<{
3915
3934
  success: true;
3916
- data: BetResult$1;
3935
+ data: BetResult;
3917
3936
  error?: undefined;
3918
3937
  } | {
3919
3938
  success: false;
@@ -3922,7 +3941,7 @@ declare class MinesApi {
3922
3941
  }>;
3923
3942
  autobetPlay(data: MinesAutoArgs): Promise<{
3924
3943
  success: true;
3925
- data: BetResult$1;
3944
+ data: BetResult;
3926
3945
  error?: undefined;
3927
3946
  } | {
3928
3947
  success: false;
@@ -3930,16 +3949,16 @@ declare class MinesApi {
3930
3949
  data?: undefined;
3931
3950
  }>;
3932
3951
  static getInitialState: () => MinesState;
3933
- static deriveSelectedTiles: (actions?: Array<MinesAction> | null) => number[];
3934
- static deriveMineLocations: (actions?: Array<MinesAction> | null) => number[];
3935
- static getMinesBetInfo: (actions: MinesAction[]) => {
3952
+ static deriveSelectedTiles: (betActions?: Action[] | null) => number[];
3953
+ static deriveMineLocations: (betActions?: Action[] | null) => number[];
3954
+ static getMinesBetInfo: (betActions: Action[]) => {
3936
3955
  selected: number[];
3937
3956
  mines: number[];
3938
3957
  };
3939
- static deriveOutcome: (bet?: BetResult$1) => MinesGameOutcome | null;
3940
- static deriveAutoOutcome: (bet?: BetResult$1 | null) => MinesGameOutcome | null;
3958
+ static deriveOutcome: (bet?: BetResult) => MinesGameOutcome | null;
3959
+ static deriveAutoOutcome: (bet?: BetResult | null) => MinesGameOutcome | null;
3941
3960
  static calculateMinesMultiplier: (gemsFound: number, mines: number) => BigNumber;
3942
- static getState: (bet: BetResult$1) => MinesState;
3961
+ static getState: (bet: BetResult) => MinesState;
3943
3962
  }
3944
3963
  export interface MockMinesSettings {
3945
3964
  shouldWin: boolean;
@@ -3956,7 +3975,7 @@ declare class MockMinesApi {
3956
3975
  private static updateBetResult;
3957
3976
  startManualBet(data: MinesManualStartArgs): Promise<{
3958
3977
  success: true;
3959
- data: BetResult$1;
3978
+ data: BetResult;
3960
3979
  }>;
3961
3980
  getActiveBet(): Promise<{
3962
3981
  success: false;
@@ -3964,7 +3983,7 @@ declare class MockMinesApi {
3964
3983
  data?: undefined;
3965
3984
  } | {
3966
3985
  success: true;
3967
- data: BetResult$1;
3986
+ data: BetResult;
3968
3987
  error?: undefined;
3969
3988
  }>;
3970
3989
  selectTile(data: MinesNextArgs): Promise<{
@@ -3973,7 +3992,7 @@ declare class MockMinesApi {
3973
3992
  data?: undefined;
3974
3993
  } | {
3975
3994
  success: true;
3976
- data: BetResult$1;
3995
+ data: BetResult;
3977
3996
  error?: undefined;
3978
3997
  }>;
3979
3998
  cashout(): Promise<{
@@ -3982,12 +4001,12 @@ declare class MockMinesApi {
3982
4001
  data?: undefined;
3983
4002
  } | {
3984
4003
  success: true;
3985
- data: BetResult$1;
4004
+ data: BetResult;
3986
4005
  error?: undefined;
3987
4006
  }>;
3988
4007
  autobetPlay(data: MinesAutoArgs): Promise<{
3989
4008
  success: true;
3990
- data: BetResult$1;
4009
+ data: BetResult;
3991
4010
  }>;
3992
4011
  }
3993
4012
  export declare class MinesGame extends GameComponent {