@betorigami/games 0.7.28 → 0.7.30

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 -84
  2. package/dist/index.mjs +1630 -2098
  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: {
@@ -3369,7 +3433,6 @@ export interface BetResult {
3369
3433
  randomValue: string;
3370
3434
  proof: string | null;
3371
3435
  nonce: number;
3372
- completedAt: string | null;
3373
3436
  betActions: Action[];
3374
3437
  }
3375
3438
  export interface HistoryItem {
@@ -3464,12 +3527,6 @@ export type gameContextType = {
3464
3527
  declare const gameContext: {
3465
3528
  __context__: gameContextType;
3466
3529
  };
3467
- declare enum OrigamiGame {
3468
- DICE = "DICE",
3469
- MINES = "MINES",
3470
- KENO = "KENO",
3471
- LIMBO = "LIMBO"
3472
- }
3473
3530
  export declare class GameProviderWrapper extends OrigamiElement {
3474
3531
  currency: Currency;
3475
3532
  showCurrencyAsText: boolean;
@@ -3514,7 +3571,6 @@ export declare class BetDetailsComponent extends OrigamiElement {
3514
3571
  baseUrl: string;
3515
3572
  betId: string;
3516
3573
  private _betDetails;
3517
- private _isMobile;
3518
3574
  private get _gameName();
3519
3575
  private get _roundId();
3520
3576
  private get _timestamp();
@@ -3524,8 +3580,6 @@ export declare class BetDetailsComponent extends OrigamiElement {
3524
3580
  private get _payout();
3525
3581
  render(): TemplateResult<1>;
3526
3582
  connectedCallback(): Promise<void>;
3527
- disconnectedCallback(): void;
3528
- private _resizeHandler;
3529
3583
  private handleShare;
3530
3584
  private fetchBetDetails;
3531
3585
  }
@@ -3615,6 +3669,7 @@ declare abstract class GameComponent extends OrigamiElement {
3615
3669
  static styles: import("lit").CSSResult[];
3616
3670
  private gameConsumer;
3617
3671
  get gameData(): gameContextType;
3672
+ get isDemoMode(): boolean;
3618
3673
  get isToggleDisabled(): boolean;
3619
3674
  get areInputsDisabled(): boolean;
3620
3675
  protected getDelay(normalDelay: number): number;
@@ -3788,6 +3843,8 @@ declare class LimboApi {
3788
3843
  static calculateMultiplier(winChance: number): string;
3789
3844
  static calculateWinChance(targetMultiplier: number): string;
3790
3845
  static calculateProfitOnWin(amount: string, targetMultiplier: number): string;
3846
+ static isValidMultiplier(multiplier: string): boolean;
3847
+ static isValidWinChance(winChance: string): boolean;
3791
3848
  }
3792
3849
  declare class MockLimboApi {
3793
3850
  private static getRandomMultiplier;
@@ -3824,53 +3881,14 @@ export declare class LimboGame extends GameComponent {
3824
3881
  multiplierAnimationEnd: (e: LimboMultiplierAnimationEndEvent) => void;
3825
3882
  render(): import("lit-html").TemplateResult<1>;
3826
3883
  }
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
3884
  export type MinesManualStartArgs = {
3865
3885
  currency: Currency;
3866
3886
  amount: string;
3867
- windowId?: string;
3868
- usdAmount?: number;
3869
3887
  minesCount: number;
3870
3888
  };
3871
3889
  export type MinesNextArgs = {
3872
- betId: string;
3873
- selected: number[];
3890
+ betId?: string;
3891
+ selectedTiles: number[];
3874
3892
  };
3875
3893
  export type MinesAutoArgs = {
3876
3894
  currency: Currency;
@@ -3878,7 +3896,7 @@ export type MinesAutoArgs = {
3878
3896
  windowId?: string;
3879
3897
  usdAmount?: number;
3880
3898
  minesCount?: number;
3881
- selected: number[];
3899
+ selectedTiles: number[];
3882
3900
  };
3883
3901
  declare class MinesApi {
3884
3902
  private authToken;
@@ -3886,7 +3904,7 @@ declare class MinesApi {
3886
3904
  constructor(authToken: string, baseUrl: string);
3887
3905
  startManualBet(data: MinesManualStartArgs): Promise<{
3888
3906
  success: true;
3889
- data: BetResult$1;
3907
+ data: BetResult;
3890
3908
  error?: undefined;
3891
3909
  } | {
3892
3910
  success: false;
@@ -3899,12 +3917,12 @@ declare class MinesApi {
3899
3917
  data?: undefined;
3900
3918
  } | {
3901
3919
  success: true;
3902
- data: BetResult$1;
3920
+ data: BetResult;
3903
3921
  error?: undefined;
3904
3922
  }>;
3905
3923
  selectTile(minesNextArgs: MinesNextArgs): Promise<{
3906
3924
  success: true;
3907
- data: BetResult$1;
3925
+ data: BetResult;
3908
3926
  error?: undefined;
3909
3927
  } | {
3910
3928
  success: false;
@@ -3913,7 +3931,7 @@ declare class MinesApi {
3913
3931
  }>;
3914
3932
  cashout(): Promise<{
3915
3933
  success: true;
3916
- data: BetResult$1;
3934
+ data: BetResult;
3917
3935
  error?: undefined;
3918
3936
  } | {
3919
3937
  success: false;
@@ -3922,7 +3940,7 @@ declare class MinesApi {
3922
3940
  }>;
3923
3941
  autobetPlay(data: MinesAutoArgs): Promise<{
3924
3942
  success: true;
3925
- data: BetResult$1;
3943
+ data: BetResult;
3926
3944
  error?: undefined;
3927
3945
  } | {
3928
3946
  success: false;
@@ -3930,16 +3948,16 @@ declare class MinesApi {
3930
3948
  data?: undefined;
3931
3949
  }>;
3932
3950
  static getInitialState: () => MinesState;
3933
- static deriveSelectedTiles: (actions?: Array<MinesAction> | null) => number[];
3934
- static deriveMineLocations: (actions?: Array<MinesAction> | null) => number[];
3935
- static getMinesBetInfo: (actions: MinesAction[]) => {
3951
+ static deriveSelectedTiles: (betActions?: Action[] | null) => number[];
3952
+ static deriveMineLocations: (betActions?: Action[] | null) => number[];
3953
+ static getMinesBetInfo: (betActions: Action[]) => {
3936
3954
  selected: number[];
3937
3955
  mines: number[];
3938
3956
  };
3939
- static deriveOutcome: (bet?: BetResult$1) => MinesGameOutcome | null;
3940
- static deriveAutoOutcome: (bet?: BetResult$1 | null) => MinesGameOutcome | null;
3957
+ static deriveOutcome: (bet?: BetResult) => MinesGameOutcome | null;
3958
+ static deriveAutoOutcome: (bet?: BetResult | null) => MinesGameOutcome | null;
3941
3959
  static calculateMinesMultiplier: (gemsFound: number, mines: number) => BigNumber;
3942
- static getState: (bet: BetResult$1) => MinesState;
3960
+ static getState: (bet: BetResult) => MinesState;
3943
3961
  }
3944
3962
  export interface MockMinesSettings {
3945
3963
  shouldWin: boolean;
@@ -3956,7 +3974,7 @@ declare class MockMinesApi {
3956
3974
  private static updateBetResult;
3957
3975
  startManualBet(data: MinesManualStartArgs): Promise<{
3958
3976
  success: true;
3959
- data: BetResult$1;
3977
+ data: BetResult;
3960
3978
  }>;
3961
3979
  getActiveBet(): Promise<{
3962
3980
  success: false;
@@ -3964,7 +3982,7 @@ declare class MockMinesApi {
3964
3982
  data?: undefined;
3965
3983
  } | {
3966
3984
  success: true;
3967
- data: BetResult$1;
3985
+ data: BetResult;
3968
3986
  error?: undefined;
3969
3987
  }>;
3970
3988
  selectTile(data: MinesNextArgs): Promise<{
@@ -3973,7 +3991,7 @@ declare class MockMinesApi {
3973
3991
  data?: undefined;
3974
3992
  } | {
3975
3993
  success: true;
3976
- data: BetResult$1;
3994
+ data: BetResult;
3977
3995
  error?: undefined;
3978
3996
  }>;
3979
3997
  cashout(): Promise<{
@@ -3982,12 +4000,12 @@ declare class MockMinesApi {
3982
4000
  data?: undefined;
3983
4001
  } | {
3984
4002
  success: true;
3985
- data: BetResult$1;
4003
+ data: BetResult;
3986
4004
  error?: undefined;
3987
4005
  }>;
3988
4006
  autobetPlay(data: MinesAutoArgs): Promise<{
3989
4007
  success: true;
3990
- data: BetResult$1;
4008
+ data: BetResult;
3991
4009
  }>;
3992
4010
  }
3993
4011
  export declare class MinesGame extends GameComponent {