@betorigami/game-calculations 0.0.0-sha-54481c8-20251028042938

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.
@@ -0,0 +1,1598 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import Big$1 from 'big.js';
4
+ import { Big as Big$1 } from 'big.js';
5
+
6
+ export type Proof = {
7
+ proofHash: string;
8
+ proofString: string;
9
+ };
10
+ export type SingleRandomValue = {
11
+ value: number;
12
+ min: number;
13
+ max: number;
14
+ } & Proof;
15
+ export type MultipleRandomValues = {
16
+ values: number[];
17
+ count: number;
18
+ min: number;
19
+ max: number;
20
+ } & Proof;
21
+ export interface RandomNumberGenerator {
22
+ getRandomInt({ min, max }: {
23
+ min: number;
24
+ max: number;
25
+ }): SingleRandomValue;
26
+ getUniqueRandomInts({ min, max, count }: {
27
+ min: number;
28
+ max: number;
29
+ count: number;
30
+ }): MultipleRandomValues;
31
+ getRandomIntsWithReplacement({ min, max, count }: {
32
+ min: number;
33
+ max: number;
34
+ count: number;
35
+ }): MultipleRandomValues;
36
+ }
37
+ export declare enum OrigamiGame {
38
+ DICE = "DICE",
39
+ MINES = "MINES",
40
+ KENO = "KENO",
41
+ LIMBO = "LIMBO",
42
+ ADVANCED_DICE = "ADVANCED_DICE",
43
+ BACCARAT = "BACCARAT",
44
+ DIAMONDS = "DIAMONDS",
45
+ PLINKO = "PLINKO",
46
+ ROULETTE = "ROULETTE",
47
+ WHEEL = "WHEEL"
48
+ }
49
+ export interface GetGameResultRequest<TGameInputs> {
50
+ generator: RandomNumberGenerator;
51
+ edge: number;
52
+ gameInputs: TGameInputs;
53
+ }
54
+ export interface GameResult<TGameOutputs = {}> {
55
+ isFinished: boolean;
56
+ payoutMultiplier: Big$1;
57
+ outputs: TGameOutputs;
58
+ randomValues: SingleRandomValue | MultipleRandomValues;
59
+ }
60
+ export declare abstract class Game<TGameInputs, TGameOutputs = {}> {
61
+ readonly gameId: OrigamiGame;
62
+ protected constructor(gameId: OrigamiGame);
63
+ getGameResult(request: GetGameResultRequest<TGameInputs>): GameResult<TGameOutputs>;
64
+ protected abstract determineGameResult(request: GetGameResultRequest<TGameInputs>): GameResult<TGameOutputs>;
65
+ }
66
+ export type Bounds = {
67
+ lower: number;
68
+ upper: number;
69
+ };
70
+ export type RollBetween = {
71
+ mode: "roll-between";
72
+ bounds: Bounds;
73
+ };
74
+ export type RollOutside = {
75
+ mode: "roll-outside";
76
+ bounds: Bounds;
77
+ };
78
+ export type RollBetweenTwo = {
79
+ mode: "roll-between-two";
80
+ firstBounds: Bounds;
81
+ secondBounds: Bounds;
82
+ };
83
+ export type AdvancedDiceInputs = RollBetween | RollOutside | RollBetweenTwo;
84
+ export declare class AdvancedDice extends Game<AdvancedDiceInputs> {
85
+ constructor();
86
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<AdvancedDiceInputs>): GameResult;
87
+ private calculateRollBetweenPayoutMultiplier;
88
+ private calculateRollOutsidePayoutMultiplier;
89
+ private calculateRollBetweenTwoPayoutMultiplier;
90
+ }
91
+ export interface PlayerBet {
92
+ amount: Big$1;
93
+ }
94
+ export interface TieBet {
95
+ amount: Big$1;
96
+ }
97
+ export interface BankerBet {
98
+ amount: Big$1;
99
+ }
100
+ export interface BaccaratGameInputs {
101
+ playerBets: PlayerBet[];
102
+ tieBets: TieBet[];
103
+ bankerBets: BankerBet[];
104
+ }
105
+ export declare const VALID_SUITS: readonly [
106
+ "Clubs",
107
+ "Diamonds",
108
+ "Hearts",
109
+ "Spades"
110
+ ];
111
+ export declare const VALID_RANKS: readonly [
112
+ "Ace",
113
+ "2",
114
+ "3",
115
+ "4",
116
+ "5",
117
+ "6",
118
+ "7",
119
+ "8",
120
+ "9",
121
+ "10",
122
+ "Jack",
123
+ "Queen",
124
+ "King"
125
+ ];
126
+ export type Suit = (typeof VALID_SUITS)[number];
127
+ export type Rank = (typeof VALID_RANKS)[number];
128
+ export interface Card {
129
+ suit: Suit;
130
+ rank: Rank;
131
+ }
132
+ export declare enum BaccaratOutcome {
133
+ PLAYER_WIN = "PLAYER_WIN",
134
+ TIE = "TIE",
135
+ BANKER_WIN = "BANKER_WIN"
136
+ }
137
+ export interface BaccaratGameOutputs {
138
+ playerCards: Card[];
139
+ playerHandValue: number;
140
+ bankerCards: Card[];
141
+ bankerHandValue: number;
142
+ gameOutcome: BaccaratOutcome;
143
+ }
144
+ export declare class Baccarat extends Game<BaccaratGameInputs, BaccaratGameOutputs> {
145
+ constructor();
146
+ protected determineGameResult({ generator, gameInputs, edge }: GetGameResultRequest<BaccaratGameInputs>): GameResult<BaccaratGameOutputs>;
147
+ private validateGameInputs;
148
+ private mapRandomValueToCard;
149
+ private isNaturalWin;
150
+ private mapRandomValueToCardValue;
151
+ private shouldDrawThirdPlayerCard;
152
+ private shouldDrawThirdBankerCard;
153
+ }
154
+ export interface DiamondsGameInputs {
155
+ }
156
+ export declare enum DiamondsResultType {
157
+ PAIR = "PAIR",
158
+ TWO_PAIR = "TWO_PAIR",
159
+ THREE_OF_A_KIND = "THREE_OF_A_KIND",
160
+ FULL_HOUSE = "FULL_HOUSE",
161
+ FOUR_OF_A_KIND = "FOUR_OF_A_KIND",
162
+ FIVE_OF_A_KIND = "FIVE_OF_A_KIND"
163
+ }
164
+ export type DiamondsMultipliers = Record<keyof typeof DiamondsResultType, number>;
165
+ export declare class Diamonds extends Game<DiamondsGameInputs> {
166
+ readonly multiplierOverrides?: DiamondsMultipliers | undefined;
167
+ private get multipliers();
168
+ constructor(multiplierOverrides?: DiamondsMultipliers | undefined);
169
+ protected determineGameResult({ generator, edge }: GetGameResultRequest<DiamondsGameInputs>): GameResult;
170
+ private calculatePayoutMultiplier;
171
+ private classifyResult;
172
+ }
173
+ export declare enum DiceDirection {
174
+ ABOVE = "ABOVE",
175
+ BELOW = "BELOW"
176
+ }
177
+ export interface DiceGameInputs {
178
+ direction: DiceDirection;
179
+ selectedValue: number;
180
+ }
181
+ export declare class Dice extends Game<DiceGameInputs> {
182
+ constructor();
183
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<DiceGameInputs>): GameResult;
184
+ }
185
+ export declare enum KenoRiskLevel {
186
+ CLASSIC = "CLASSIC",
187
+ LOW_RISK = "LOW_RISK",
188
+ MEDIUM_RISK = "MEDIUM_RISK",
189
+ HIGH_RISK = "HIGH_RISK"
190
+ }
191
+ export interface KenoGameInputs {
192
+ riskLevel: KenoRiskLevel;
193
+ selectedNumbers: number[];
194
+ }
195
+ export type TileCount = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
196
+ export type KenoMultipliers = Record<TileCount, Record<KenoRiskLevel, number[]>>;
197
+ export declare class Keno extends Game<KenoGameInputs> {
198
+ readonly multiplierOverrides?: KenoMultipliers | undefined;
199
+ private get multipliers();
200
+ constructor(multiplierOverrides?: KenoMultipliers | undefined);
201
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<KenoGameInputs>): GameResult;
202
+ private validateMultiplierOverrides;
203
+ }
204
+ export interface LimboGameInputs {
205
+ targetMultiplier: number;
206
+ }
207
+ export interface LimboGameOutputs {
208
+ randomMultiplier: Big$1;
209
+ }
210
+ export declare class Limbo extends Game<LimboGameInputs, LimboGameOutputs> {
211
+ constructor();
212
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<LimboGameInputs>): GameResult<LimboGameOutputs>;
213
+ }
214
+ export interface MinesGameInputs {
215
+ minesCount: number;
216
+ selectedTiles: number[];
217
+ hasCashedOut: boolean;
218
+ }
219
+ export declare class Mines extends Game<MinesGameInputs> {
220
+ constructor();
221
+ protected determineGameResult({ generator, edge, gameInputs }: GetGameResultRequest<MinesGameInputs>): GameResult;
222
+ }
223
+ export declare enum PlinkoRiskLevel {
224
+ LOW_RISK = "LOW_RISK",
225
+ MEDIUM_RISK = "MEDIUM_RISK",
226
+ HIGH_RISK = "HIGH_RISK"
227
+ }
228
+ export interface PlinkoGameInputs {
229
+ numberOfRows: number;
230
+ riskLevel: PlinkoRiskLevel;
231
+ }
232
+ export interface PlinkoMultipliers {
233
+ rows: number;
234
+ payout: Record<PlinkoRiskLevel, number[]>;
235
+ }
236
+ export declare class Plinko extends Game<PlinkoGameInputs> {
237
+ readonly multiplierOverrides?: PlinkoMultipliers[] | undefined;
238
+ private get multipliers();
239
+ constructor(multiplierOverrides?: PlinkoMultipliers[] | undefined);
240
+ protected determineGameResult({ generator, gameInputs, edge }: GetGameResultRequest<PlinkoGameInputs>): GameResult;
241
+ private validateMultiplierOverrides;
242
+ }
243
+ export declare const VALID_EUROPEAN_STRAIGHTS: readonly [
244
+ 0,
245
+ 1,
246
+ 2,
247
+ 3,
248
+ 4,
249
+ 5,
250
+ 6,
251
+ 7,
252
+ 8,
253
+ 9,
254
+ 10,
255
+ 11,
256
+ 12,
257
+ 13,
258
+ 14,
259
+ 15,
260
+ 16,
261
+ 17,
262
+ 18,
263
+ 19,
264
+ 20,
265
+ 21,
266
+ 22,
267
+ 23,
268
+ 24,
269
+ 25,
270
+ 26,
271
+ 27,
272
+ 28,
273
+ 29,
274
+ 30,
275
+ 31,
276
+ 32,
277
+ 33,
278
+ 34,
279
+ 35,
280
+ 36
281
+ ];
282
+ export type EuropeanStraight = (typeof VALID_EUROPEAN_STRAIGHTS)[number];
283
+ export declare const VALID_AMERICAN_STRAIGHTS: readonly [
284
+ 37,
285
+ 0,
286
+ 1,
287
+ 2,
288
+ 3,
289
+ 4,
290
+ 5,
291
+ 6,
292
+ 7,
293
+ 8,
294
+ 9,
295
+ 10,
296
+ 11,
297
+ 12,
298
+ 13,
299
+ 14,
300
+ 15,
301
+ 16,
302
+ 17,
303
+ 18,
304
+ 19,
305
+ 20,
306
+ 21,
307
+ 22,
308
+ 23,
309
+ 24,
310
+ 25,
311
+ 26,
312
+ 27,
313
+ 28,
314
+ 29,
315
+ 30,
316
+ 31,
317
+ 32,
318
+ 33,
319
+ 34,
320
+ 35,
321
+ 36
322
+ ];
323
+ export type AmericanStraight = (typeof VALID_AMERICAN_STRAIGHTS)[number];
324
+ export interface EuropeanStraightBet {
325
+ amount: Big$1.Big;
326
+ value: EuropeanStraight;
327
+ }
328
+ export interface AmericanStraightBet {
329
+ amount: Big$1.Big;
330
+ value: AmericanStraight;
331
+ }
332
+ export declare const VALID_EUROPEAN_SPLITS: readonly [
333
+ readonly [
334
+ 0,
335
+ 1
336
+ ],
337
+ readonly [
338
+ 0,
339
+ 2
340
+ ],
341
+ readonly [
342
+ 0,
343
+ 3
344
+ ],
345
+ readonly [
346
+ 1,
347
+ 2
348
+ ],
349
+ readonly [
350
+ 1,
351
+ 4
352
+ ],
353
+ readonly [
354
+ 2,
355
+ 3
356
+ ],
357
+ readonly [
358
+ 2,
359
+ 5
360
+ ],
361
+ readonly [
362
+ 3,
363
+ 6
364
+ ],
365
+ readonly [
366
+ 4,
367
+ 5
368
+ ],
369
+ readonly [
370
+ 4,
371
+ 7
372
+ ],
373
+ readonly [
374
+ 5,
375
+ 6
376
+ ],
377
+ readonly [
378
+ 5,
379
+ 8
380
+ ],
381
+ readonly [
382
+ 6,
383
+ 9
384
+ ],
385
+ readonly [
386
+ 7,
387
+ 8
388
+ ],
389
+ readonly [
390
+ 7,
391
+ 10
392
+ ],
393
+ readonly [
394
+ 8,
395
+ 9
396
+ ],
397
+ readonly [
398
+ 8,
399
+ 11
400
+ ],
401
+ readonly [
402
+ 9,
403
+ 12
404
+ ],
405
+ readonly [
406
+ 10,
407
+ 11
408
+ ],
409
+ readonly [
410
+ 10,
411
+ 13
412
+ ],
413
+ readonly [
414
+ 11,
415
+ 12
416
+ ],
417
+ readonly [
418
+ 11,
419
+ 14
420
+ ],
421
+ readonly [
422
+ 12,
423
+ 15
424
+ ],
425
+ readonly [
426
+ 13,
427
+ 14
428
+ ],
429
+ readonly [
430
+ 13,
431
+ 16
432
+ ],
433
+ readonly [
434
+ 14,
435
+ 15
436
+ ],
437
+ readonly [
438
+ 14,
439
+ 17
440
+ ],
441
+ readonly [
442
+ 15,
443
+ 18
444
+ ],
445
+ readonly [
446
+ 16,
447
+ 17
448
+ ],
449
+ readonly [
450
+ 16,
451
+ 19
452
+ ],
453
+ readonly [
454
+ 17,
455
+ 18
456
+ ],
457
+ readonly [
458
+ 17,
459
+ 20
460
+ ],
461
+ readonly [
462
+ 18,
463
+ 21
464
+ ],
465
+ readonly [
466
+ 19,
467
+ 20
468
+ ],
469
+ readonly [
470
+ 19,
471
+ 22
472
+ ],
473
+ readonly [
474
+ 20,
475
+ 21
476
+ ],
477
+ readonly [
478
+ 20,
479
+ 23
480
+ ],
481
+ readonly [
482
+ 21,
483
+ 24
484
+ ],
485
+ readonly [
486
+ 22,
487
+ 23
488
+ ],
489
+ readonly [
490
+ 22,
491
+ 25
492
+ ],
493
+ readonly [
494
+ 23,
495
+ 24
496
+ ],
497
+ readonly [
498
+ 23,
499
+ 26
500
+ ],
501
+ readonly [
502
+ 24,
503
+ 27
504
+ ],
505
+ readonly [
506
+ 25,
507
+ 26
508
+ ],
509
+ readonly [
510
+ 25,
511
+ 28
512
+ ],
513
+ readonly [
514
+ 26,
515
+ 27
516
+ ],
517
+ readonly [
518
+ 26,
519
+ 29
520
+ ],
521
+ readonly [
522
+ 27,
523
+ 30
524
+ ],
525
+ readonly [
526
+ 28,
527
+ 29
528
+ ],
529
+ readonly [
530
+ 28,
531
+ 31
532
+ ],
533
+ readonly [
534
+ 29,
535
+ 30
536
+ ],
537
+ readonly [
538
+ 29,
539
+ 32
540
+ ],
541
+ readonly [
542
+ 30,
543
+ 33
544
+ ],
545
+ readonly [
546
+ 31,
547
+ 32
548
+ ],
549
+ readonly [
550
+ 31,
551
+ 34
552
+ ],
553
+ readonly [
554
+ 32,
555
+ 33
556
+ ],
557
+ readonly [
558
+ 32,
559
+ 35
560
+ ],
561
+ readonly [
562
+ 33,
563
+ 36
564
+ ],
565
+ readonly [
566
+ 34,
567
+ 35
568
+ ],
569
+ readonly [
570
+ 35,
571
+ 36
572
+ ]
573
+ ];
574
+ export type EuropeanSplit = (typeof VALID_EUROPEAN_SPLITS)[number];
575
+ export interface EuropeanSplitBet {
576
+ amount: Big$1.Big;
577
+ values: EuropeanSplit;
578
+ }
579
+ export declare const VALID_AMERICAN_SPLITS: readonly [
580
+ readonly [
581
+ 0,
582
+ 1
583
+ ],
584
+ readonly [
585
+ 0,
586
+ 3
587
+ ],
588
+ readonly [
589
+ 0,
590
+ 37
591
+ ],
592
+ readonly [
593
+ 1,
594
+ 2
595
+ ],
596
+ readonly [
597
+ 1,
598
+ 4
599
+ ],
600
+ readonly [
601
+ 2,
602
+ 3
603
+ ],
604
+ readonly [
605
+ 2,
606
+ 5
607
+ ],
608
+ readonly [
609
+ 3,
610
+ 6
611
+ ],
612
+ readonly [
613
+ 4,
614
+ 5
615
+ ],
616
+ readonly [
617
+ 4,
618
+ 7
619
+ ],
620
+ readonly [
621
+ 5,
622
+ 6
623
+ ],
624
+ readonly [
625
+ 5,
626
+ 8
627
+ ],
628
+ readonly [
629
+ 6,
630
+ 9
631
+ ],
632
+ readonly [
633
+ 7,
634
+ 8
635
+ ],
636
+ readonly [
637
+ 7,
638
+ 10
639
+ ],
640
+ readonly [
641
+ 8,
642
+ 9
643
+ ],
644
+ readonly [
645
+ 8,
646
+ 11
647
+ ],
648
+ readonly [
649
+ 9,
650
+ 12
651
+ ],
652
+ readonly [
653
+ 10,
654
+ 11
655
+ ],
656
+ readonly [
657
+ 10,
658
+ 13
659
+ ],
660
+ readonly [
661
+ 11,
662
+ 12
663
+ ],
664
+ readonly [
665
+ 11,
666
+ 14
667
+ ],
668
+ readonly [
669
+ 12,
670
+ 15
671
+ ],
672
+ readonly [
673
+ 13,
674
+ 14
675
+ ],
676
+ readonly [
677
+ 13,
678
+ 16
679
+ ],
680
+ readonly [
681
+ 14,
682
+ 15
683
+ ],
684
+ readonly [
685
+ 14,
686
+ 17
687
+ ],
688
+ readonly [
689
+ 15,
690
+ 18
691
+ ],
692
+ readonly [
693
+ 16,
694
+ 17
695
+ ],
696
+ readonly [
697
+ 16,
698
+ 19
699
+ ],
700
+ readonly [
701
+ 17,
702
+ 18
703
+ ],
704
+ readonly [
705
+ 17,
706
+ 20
707
+ ],
708
+ readonly [
709
+ 18,
710
+ 21
711
+ ],
712
+ readonly [
713
+ 19,
714
+ 20
715
+ ],
716
+ readonly [
717
+ 19,
718
+ 22
719
+ ],
720
+ readonly [
721
+ 20,
722
+ 21
723
+ ],
724
+ readonly [
725
+ 20,
726
+ 23
727
+ ],
728
+ readonly [
729
+ 21,
730
+ 24
731
+ ],
732
+ readonly [
733
+ 22,
734
+ 23
735
+ ],
736
+ readonly [
737
+ 22,
738
+ 25
739
+ ],
740
+ readonly [
741
+ 23,
742
+ 24
743
+ ],
744
+ readonly [
745
+ 23,
746
+ 26
747
+ ],
748
+ readonly [
749
+ 24,
750
+ 27
751
+ ],
752
+ readonly [
753
+ 25,
754
+ 26
755
+ ],
756
+ readonly [
757
+ 25,
758
+ 28
759
+ ],
760
+ readonly [
761
+ 26,
762
+ 27
763
+ ],
764
+ readonly [
765
+ 26,
766
+ 29
767
+ ],
768
+ readonly [
769
+ 27,
770
+ 30
771
+ ],
772
+ readonly [
773
+ 28,
774
+ 29
775
+ ],
776
+ readonly [
777
+ 28,
778
+ 31
779
+ ],
780
+ readonly [
781
+ 29,
782
+ 30
783
+ ],
784
+ readonly [
785
+ 29,
786
+ 32
787
+ ],
788
+ readonly [
789
+ 30,
790
+ 33
791
+ ],
792
+ readonly [
793
+ 31,
794
+ 32
795
+ ],
796
+ readonly [
797
+ 31,
798
+ 34
799
+ ],
800
+ readonly [
801
+ 32,
802
+ 33
803
+ ],
804
+ readonly [
805
+ 32,
806
+ 35
807
+ ],
808
+ readonly [
809
+ 33,
810
+ 36
811
+ ],
812
+ readonly [
813
+ 34,
814
+ 35
815
+ ],
816
+ readonly [
817
+ 35,
818
+ 36
819
+ ]
820
+ ];
821
+ export type AmericanSplit = (typeof VALID_AMERICAN_SPLITS)[number];
822
+ export interface AmericanSplitBet {
823
+ amount: Big$1.Big;
824
+ values: AmericanSplit;
825
+ }
826
+ export declare const VALID_EUROPEAN_STREETS: readonly [
827
+ readonly [
828
+ 0,
829
+ 1,
830
+ 2
831
+ ],
832
+ readonly [
833
+ 0,
834
+ 2,
835
+ 3
836
+ ],
837
+ readonly [
838
+ 1,
839
+ 2,
840
+ 3
841
+ ],
842
+ readonly [
843
+ 4,
844
+ 5,
845
+ 6
846
+ ],
847
+ readonly [
848
+ 7,
849
+ 8,
850
+ 9
851
+ ],
852
+ readonly [
853
+ 10,
854
+ 11,
855
+ 12
856
+ ],
857
+ readonly [
858
+ 13,
859
+ 14,
860
+ 15
861
+ ],
862
+ readonly [
863
+ 16,
864
+ 17,
865
+ 18
866
+ ],
867
+ readonly [
868
+ 19,
869
+ 20,
870
+ 21
871
+ ],
872
+ readonly [
873
+ 22,
874
+ 23,
875
+ 24
876
+ ],
877
+ readonly [
878
+ 25,
879
+ 26,
880
+ 27
881
+ ],
882
+ readonly [
883
+ 28,
884
+ 29,
885
+ 30
886
+ ],
887
+ readonly [
888
+ 31,
889
+ 32,
890
+ 33
891
+ ],
892
+ readonly [
893
+ 34,
894
+ 35,
895
+ 36
896
+ ]
897
+ ];
898
+ export type EuropeanStreet = (typeof VALID_EUROPEAN_STREETS)[number];
899
+ export interface EuropeanStreetBet {
900
+ amount: Big$1.Big;
901
+ values: EuropeanStreet;
902
+ }
903
+ export declare const VALID_AMERICAN_STREETS: readonly [
904
+ readonly [
905
+ 0,
906
+ 1,
907
+ 2
908
+ ],
909
+ readonly [
910
+ 0,
911
+ 2,
912
+ 37
913
+ ],
914
+ readonly [
915
+ 1,
916
+ 2,
917
+ 3
918
+ ],
919
+ readonly [
920
+ 2,
921
+ 3,
922
+ 37
923
+ ],
924
+ readonly [
925
+ 4,
926
+ 5,
927
+ 6
928
+ ],
929
+ readonly [
930
+ 7,
931
+ 8,
932
+ 9
933
+ ],
934
+ readonly [
935
+ 10,
936
+ 11,
937
+ 12
938
+ ],
939
+ readonly [
940
+ 13,
941
+ 14,
942
+ 15
943
+ ],
944
+ readonly [
945
+ 16,
946
+ 17,
947
+ 18
948
+ ],
949
+ readonly [
950
+ 19,
951
+ 20,
952
+ 21
953
+ ],
954
+ readonly [
955
+ 22,
956
+ 23,
957
+ 24
958
+ ],
959
+ readonly [
960
+ 25,
961
+ 26,
962
+ 27
963
+ ],
964
+ readonly [
965
+ 28,
966
+ 29,
967
+ 30
968
+ ],
969
+ readonly [
970
+ 31,
971
+ 32,
972
+ 33
973
+ ],
974
+ readonly [
975
+ 34,
976
+ 35,
977
+ 36
978
+ ]
979
+ ];
980
+ export type AmericanStreet = (typeof VALID_AMERICAN_STREETS)[number];
981
+ export interface AmericanStreetBet {
982
+ amount: Big$1.Big;
983
+ values: AmericanStreet;
984
+ }
985
+ export declare const VALID_EUROPEAN_CORNERS: readonly [
986
+ readonly [
987
+ 0,
988
+ 1,
989
+ 2,
990
+ 3
991
+ ],
992
+ readonly [
993
+ 1,
994
+ 2,
995
+ 4,
996
+ 5
997
+ ],
998
+ readonly [
999
+ 2,
1000
+ 3,
1001
+ 5,
1002
+ 6
1003
+ ],
1004
+ readonly [
1005
+ 4,
1006
+ 5,
1007
+ 7,
1008
+ 8
1009
+ ],
1010
+ readonly [
1011
+ 5,
1012
+ 6,
1013
+ 8,
1014
+ 9
1015
+ ],
1016
+ readonly [
1017
+ 7,
1018
+ 8,
1019
+ 10,
1020
+ 11
1021
+ ],
1022
+ readonly [
1023
+ 8,
1024
+ 9,
1025
+ 11,
1026
+ 12
1027
+ ],
1028
+ readonly [
1029
+ 10,
1030
+ 11,
1031
+ 13,
1032
+ 14
1033
+ ],
1034
+ readonly [
1035
+ 11,
1036
+ 12,
1037
+ 14,
1038
+ 15
1039
+ ],
1040
+ readonly [
1041
+ 13,
1042
+ 14,
1043
+ 16,
1044
+ 17
1045
+ ],
1046
+ readonly [
1047
+ 14,
1048
+ 15,
1049
+ 17,
1050
+ 18
1051
+ ],
1052
+ readonly [
1053
+ 16,
1054
+ 17,
1055
+ 19,
1056
+ 20
1057
+ ],
1058
+ readonly [
1059
+ 17,
1060
+ 18,
1061
+ 20,
1062
+ 21
1063
+ ],
1064
+ readonly [
1065
+ 19,
1066
+ 20,
1067
+ 22,
1068
+ 23
1069
+ ],
1070
+ readonly [
1071
+ 20,
1072
+ 21,
1073
+ 23,
1074
+ 24
1075
+ ],
1076
+ readonly [
1077
+ 22,
1078
+ 23,
1079
+ 25,
1080
+ 26
1081
+ ],
1082
+ readonly [
1083
+ 23,
1084
+ 24,
1085
+ 26,
1086
+ 27
1087
+ ],
1088
+ readonly [
1089
+ 25,
1090
+ 26,
1091
+ 28,
1092
+ 29
1093
+ ],
1094
+ readonly [
1095
+ 26,
1096
+ 27,
1097
+ 29,
1098
+ 30
1099
+ ],
1100
+ readonly [
1101
+ 28,
1102
+ 29,
1103
+ 31,
1104
+ 32
1105
+ ],
1106
+ readonly [
1107
+ 29,
1108
+ 30,
1109
+ 32,
1110
+ 33
1111
+ ],
1112
+ readonly [
1113
+ 31,
1114
+ 32,
1115
+ 34,
1116
+ 35
1117
+ ],
1118
+ readonly [
1119
+ 32,
1120
+ 33,
1121
+ 35,
1122
+ 36
1123
+ ]
1124
+ ];
1125
+ export type EuropeanCorner = (typeof VALID_EUROPEAN_CORNERS)[number];
1126
+ export interface EuropeanCornerBet {
1127
+ amount: Big$1.Big;
1128
+ values: EuropeanCorner;
1129
+ }
1130
+ export declare const VALID_AMERICAN_CORNERS: readonly [
1131
+ readonly [
1132
+ 1,
1133
+ 2,
1134
+ 4,
1135
+ 5
1136
+ ],
1137
+ readonly [
1138
+ 2,
1139
+ 3,
1140
+ 5,
1141
+ 6
1142
+ ],
1143
+ readonly [
1144
+ 4,
1145
+ 5,
1146
+ 7,
1147
+ 8
1148
+ ],
1149
+ readonly [
1150
+ 5,
1151
+ 6,
1152
+ 8,
1153
+ 9
1154
+ ],
1155
+ readonly [
1156
+ 7,
1157
+ 8,
1158
+ 10,
1159
+ 11
1160
+ ],
1161
+ readonly [
1162
+ 8,
1163
+ 9,
1164
+ 11,
1165
+ 12
1166
+ ],
1167
+ readonly [
1168
+ 10,
1169
+ 11,
1170
+ 13,
1171
+ 14
1172
+ ],
1173
+ readonly [
1174
+ 11,
1175
+ 12,
1176
+ 14,
1177
+ 15
1178
+ ],
1179
+ readonly [
1180
+ 13,
1181
+ 14,
1182
+ 16,
1183
+ 17
1184
+ ],
1185
+ readonly [
1186
+ 14,
1187
+ 15,
1188
+ 17,
1189
+ 18
1190
+ ],
1191
+ readonly [
1192
+ 16,
1193
+ 17,
1194
+ 19,
1195
+ 20
1196
+ ],
1197
+ readonly [
1198
+ 17,
1199
+ 18,
1200
+ 20,
1201
+ 21
1202
+ ],
1203
+ readonly [
1204
+ 19,
1205
+ 20,
1206
+ 22,
1207
+ 23
1208
+ ],
1209
+ readonly [
1210
+ 20,
1211
+ 21,
1212
+ 23,
1213
+ 24
1214
+ ],
1215
+ readonly [
1216
+ 22,
1217
+ 23,
1218
+ 25,
1219
+ 26
1220
+ ],
1221
+ readonly [
1222
+ 23,
1223
+ 24,
1224
+ 26,
1225
+ 27
1226
+ ],
1227
+ readonly [
1228
+ 25,
1229
+ 26,
1230
+ 28,
1231
+ 29
1232
+ ],
1233
+ readonly [
1234
+ 26,
1235
+ 27,
1236
+ 29,
1237
+ 30
1238
+ ],
1239
+ readonly [
1240
+ 28,
1241
+ 29,
1242
+ 31,
1243
+ 32
1244
+ ],
1245
+ readonly [
1246
+ 29,
1247
+ 30,
1248
+ 32,
1249
+ 33
1250
+ ],
1251
+ readonly [
1252
+ 31,
1253
+ 32,
1254
+ 34,
1255
+ 35
1256
+ ],
1257
+ readonly [
1258
+ 32,
1259
+ 33,
1260
+ 35,
1261
+ 36
1262
+ ]
1263
+ ];
1264
+ export type AmericanCorner = (typeof VALID_AMERICAN_CORNERS)[number];
1265
+ export interface AmericanCornerBet {
1266
+ amount: Big$1.Big;
1267
+ values: AmericanCorner;
1268
+ }
1269
+ export declare const AMERICAN_BASKET: readonly [
1270
+ 0,
1271
+ 1,
1272
+ 2,
1273
+ 3,
1274
+ 37
1275
+ ];
1276
+ export interface AmericanBasketBet {
1277
+ amount: Big$1.Big;
1278
+ }
1279
+ export declare const VALID_EUROPEAN_DOUBLE_STREETS: readonly [
1280
+ readonly [
1281
+ 1,
1282
+ 2,
1283
+ 3,
1284
+ 4,
1285
+ 5,
1286
+ 6
1287
+ ],
1288
+ readonly [
1289
+ 4,
1290
+ 5,
1291
+ 6,
1292
+ 7,
1293
+ 8,
1294
+ 9
1295
+ ],
1296
+ readonly [
1297
+ 7,
1298
+ 8,
1299
+ 9,
1300
+ 10,
1301
+ 11,
1302
+ 12
1303
+ ],
1304
+ readonly [
1305
+ 10,
1306
+ 11,
1307
+ 12,
1308
+ 13,
1309
+ 14,
1310
+ 15
1311
+ ],
1312
+ readonly [
1313
+ 13,
1314
+ 14,
1315
+ 15,
1316
+ 16,
1317
+ 17,
1318
+ 18
1319
+ ],
1320
+ readonly [
1321
+ 16,
1322
+ 17,
1323
+ 18,
1324
+ 19,
1325
+ 20,
1326
+ 21
1327
+ ],
1328
+ readonly [
1329
+ 19,
1330
+ 20,
1331
+ 21,
1332
+ 22,
1333
+ 23,
1334
+ 24
1335
+ ],
1336
+ readonly [
1337
+ 22,
1338
+ 23,
1339
+ 24,
1340
+ 25,
1341
+ 26,
1342
+ 27
1343
+ ],
1344
+ readonly [
1345
+ 25,
1346
+ 26,
1347
+ 27,
1348
+ 28,
1349
+ 29,
1350
+ 30
1351
+ ],
1352
+ readonly [
1353
+ 28,
1354
+ 29,
1355
+ 30,
1356
+ 31,
1357
+ 32,
1358
+ 33
1359
+ ],
1360
+ readonly [
1361
+ 31,
1362
+ 32,
1363
+ 33,
1364
+ 34,
1365
+ 35,
1366
+ 36
1367
+ ]
1368
+ ];
1369
+ export type EuropeanDoubleStreet = (typeof VALID_EUROPEAN_DOUBLE_STREETS)[number];
1370
+ export interface EuropeanDoubleStreetBet {
1371
+ amount: Big$1.Big;
1372
+ values: EuropeanDoubleStreet;
1373
+ }
1374
+ export declare const VALID_AMERICAN_DOUBLE_STREETS: readonly [
1375
+ readonly [
1376
+ 1,
1377
+ 2,
1378
+ 3,
1379
+ 4,
1380
+ 5,
1381
+ 6
1382
+ ],
1383
+ readonly [
1384
+ 4,
1385
+ 5,
1386
+ 6,
1387
+ 7,
1388
+ 8,
1389
+ 9
1390
+ ],
1391
+ readonly [
1392
+ 7,
1393
+ 8,
1394
+ 9,
1395
+ 10,
1396
+ 11,
1397
+ 12
1398
+ ],
1399
+ readonly [
1400
+ 10,
1401
+ 11,
1402
+ 12,
1403
+ 13,
1404
+ 14,
1405
+ 15
1406
+ ],
1407
+ readonly [
1408
+ 13,
1409
+ 14,
1410
+ 15,
1411
+ 16,
1412
+ 17,
1413
+ 18
1414
+ ],
1415
+ readonly [
1416
+ 16,
1417
+ 17,
1418
+ 18,
1419
+ 19,
1420
+ 20,
1421
+ 21
1422
+ ],
1423
+ readonly [
1424
+ 19,
1425
+ 20,
1426
+ 21,
1427
+ 22,
1428
+ 23,
1429
+ 24
1430
+ ],
1431
+ readonly [
1432
+ 22,
1433
+ 23,
1434
+ 24,
1435
+ 25,
1436
+ 26,
1437
+ 27
1438
+ ],
1439
+ readonly [
1440
+ 25,
1441
+ 26,
1442
+ 27,
1443
+ 28,
1444
+ 29,
1445
+ 30
1446
+ ],
1447
+ readonly [
1448
+ 28,
1449
+ 29,
1450
+ 30,
1451
+ 31,
1452
+ 32,
1453
+ 33
1454
+ ],
1455
+ readonly [
1456
+ 31,
1457
+ 32,
1458
+ 33,
1459
+ 34,
1460
+ 35,
1461
+ 36
1462
+ ]
1463
+ ];
1464
+ export type AmericanDoubleStreet = (typeof VALID_AMERICAN_DOUBLE_STREETS)[number];
1465
+ export interface AmericanDoubleStreetBet {
1466
+ amount: Big$1.Big;
1467
+ values: AmericanDoubleStreet;
1468
+ }
1469
+ export declare enum Parity {
1470
+ EVEN = "EVEN",
1471
+ ODD = "ODD"
1472
+ }
1473
+ export interface ParityBet {
1474
+ amount: Big$1.Big;
1475
+ parity: Parity;
1476
+ }
1477
+ export declare enum Color {
1478
+ RED = "RED",
1479
+ BLACK = "BLACK"
1480
+ }
1481
+ export interface ColorBet {
1482
+ amount: Big$1.Big;
1483
+ color: Color;
1484
+ }
1485
+ export declare enum Half {
1486
+ LOW = "LOW",
1487
+ HIGH = "HIGH"
1488
+ }
1489
+ export interface HalfBet {
1490
+ amount: Big$1.Big;
1491
+ half: Half;
1492
+ }
1493
+ export declare enum Column {
1494
+ TOP = "TOP",
1495
+ MIDDLE = "MIDDLE",
1496
+ BOTTOM = "BOTTOM"
1497
+ }
1498
+ export interface ColumnBet {
1499
+ amount: Big$1.Big;
1500
+ column: Column;
1501
+ }
1502
+ export declare enum Dozen {
1503
+ FIRST = "FIRST",
1504
+ SECOND = "SECOND",
1505
+ THIRD = "THIRD"
1506
+ }
1507
+ export interface DozenBet {
1508
+ amount: Big$1.Big;
1509
+ dozen: Dozen;
1510
+ }
1511
+ export interface EuropeanRouletteGameInputs {
1512
+ straightBets: EuropeanStraightBet[];
1513
+ splitBets: EuropeanSplitBet[];
1514
+ streetBets: EuropeanStreetBet[];
1515
+ cornerBets: EuropeanCornerBet[];
1516
+ doubleStreetBets: EuropeanDoubleStreetBet[];
1517
+ parityBets: ParityBet[];
1518
+ colorBets: ColorBet[];
1519
+ halfBets: HalfBet[];
1520
+ columnBets: ColumnBet[];
1521
+ dozenBets: DozenBet[];
1522
+ }
1523
+ export interface AmericanRouletteGameInputs {
1524
+ straightBets: AmericanStraightBet[];
1525
+ splitBets: AmericanSplitBet[];
1526
+ streetBets: AmericanStreetBet[];
1527
+ cornerBets: AmericanCornerBet[];
1528
+ basketBets: AmericanBasketBet[];
1529
+ doubleStreetBets: AmericanDoubleStreetBet[];
1530
+ parityBets: ParityBet[];
1531
+ colorBets: ColorBet[];
1532
+ halfBets: HalfBet[];
1533
+ columnBets: ColumnBet[];
1534
+ dozenBets: DozenBet[];
1535
+ }
1536
+ export type RouletteGameInputs = {
1537
+ type: "european";
1538
+ inputs: EuropeanRouletteGameInputs;
1539
+ } | {
1540
+ type: "american";
1541
+ inputs: AmericanRouletteGameInputs;
1542
+ };
1543
+ export interface EuropeanRouletteBetOutcomes {
1544
+ winningBets: EuropeanRouletteGameInputs;
1545
+ losingBets: EuropeanRouletteGameInputs;
1546
+ }
1547
+ export interface AmericanRouletteBetOutcomes {
1548
+ winningBets: AmericanRouletteGameInputs;
1549
+ losingBets: AmericanRouletteGameInputs;
1550
+ }
1551
+ export interface EuropeanRouletteGameOutputs {
1552
+ betOutcomes: EuropeanRouletteBetOutcomes;
1553
+ }
1554
+ export interface AmericanRouletteGameOutputs {
1555
+ betOutcomes: AmericanRouletteBetOutcomes;
1556
+ }
1557
+ export type RouletteGameOutputs = {
1558
+ type: "european";
1559
+ betOutcomes: EuropeanRouletteBetOutcomes;
1560
+ } | {
1561
+ type: "american";
1562
+ betOutcomes: AmericanRouletteBetOutcomes;
1563
+ };
1564
+ export declare class Roulette extends Game<RouletteGameInputs, RouletteGameOutputs> {
1565
+ private readonly europeanGame;
1566
+ private readonly americanGame;
1567
+ constructor();
1568
+ protected determineGameResult(request: GetGameResultRequest<RouletteGameInputs>): GameResult<RouletteGameOutputs>;
1569
+ }
1570
+ export declare enum WheelRiskLevel {
1571
+ LOW_RISK = "LOW_RISK",
1572
+ MEDIUM_RISK = "MEDIUM_RISK",
1573
+ HIGH_RISK = "HIGH_RISK"
1574
+ }
1575
+ export declare enum WheelSegments {
1576
+ TEN = 10,
1577
+ TWENTY = 20,
1578
+ THIRTY = 30,
1579
+ FORTY = 40,
1580
+ FIFTY = 50
1581
+ }
1582
+ export interface WheelGameInputs {
1583
+ segments: WheelSegments;
1584
+ riskLevel: WheelRiskLevel;
1585
+ }
1586
+ export interface WheelMultipliers {
1587
+ segments: WheelSegments;
1588
+ payout: Record<WheelRiskLevel, number[]>;
1589
+ }
1590
+ export declare class Wheel extends Game<WheelGameInputs> {
1591
+ readonly multiplierOverrides?: WheelMultipliers[] | undefined;
1592
+ private get multipliers();
1593
+ constructor(multiplierOverrides?: WheelMultipliers[] | undefined);
1594
+ protected determineGameResult({ generator, gameInputs, edge }: GetGameResultRequest<WheelGameInputs>): GameResult;
1595
+ private validateMultiplierOverrides;
1596
+ }
1597
+
1598
+ export {};