@betorigami/games 1.2.1 → 1.3.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/index.d.ts +66 -37
- package/dist/index.mjs +755 -744
- package/package.json +1 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
import { KenoRiskLevel } from '@betorigami/calculations';
|
|
4
3
|
import { ContextProvider } from '@lit/context';
|
|
5
|
-
import
|
|
4
|
+
import Big$1 from 'big.js';
|
|
6
5
|
import { CSSResult, LitElement, PropertyValues, TemplateResult } from 'lit';
|
|
7
6
|
|
|
8
7
|
declare enum Currency {
|
|
@@ -3503,6 +3502,22 @@ declare class HapticController {
|
|
|
3503
3502
|
click(): void;
|
|
3504
3503
|
lightClick(): void;
|
|
3505
3504
|
}
|
|
3505
|
+
declare enum DiceDirection {
|
|
3506
|
+
ABOVE = "ABOVE",
|
|
3507
|
+
BELOW = "BELOW"
|
|
3508
|
+
}
|
|
3509
|
+
declare enum KenoRiskLevel {
|
|
3510
|
+
CLASSIC = "CLASSIC",
|
|
3511
|
+
LOW_RISK = "LOW_RISK",
|
|
3512
|
+
MEDIUM_RISK = "MEDIUM_RISK",
|
|
3513
|
+
HIGH_RISK = "HIGH_RISK"
|
|
3514
|
+
}
|
|
3515
|
+
declare const VALID_KENO_EDGES: readonly [
|
|
3516
|
+
1,
|
|
3517
|
+
2,
|
|
3518
|
+
3
|
|
3519
|
+
];
|
|
3520
|
+
export type KenoEdge = (typeof VALID_KENO_EDGES)[number];
|
|
3506
3521
|
declare enum OrigamiActionType {
|
|
3507
3522
|
START_BET = "START_BET",// bet started but not yet ended send to the /bet webhook
|
|
3508
3523
|
END_BET = "END_BET",// bet has been completed. Can be started and ended in 1 webhook or started in 1 and ended in another. send to the /bet webhook
|
|
@@ -3510,10 +3525,6 @@ declare enum OrigamiActionType {
|
|
|
3510
3525
|
INTERMEDIATE_BET_ACTION = "INTERMEDIATE_BET_ACTION",// bet amount was increased without game ending, such as doubling down in blackjack
|
|
3511
3526
|
INTERMEDIATE_NON_BET_ACTION = "INTERMEDIATE_NON_BET_ACTION"
|
|
3512
3527
|
}
|
|
3513
|
-
declare enum DiceDirection {
|
|
3514
|
-
ABOVE = "ABOVE",
|
|
3515
|
-
BELOW = "BELOW"
|
|
3516
|
-
}
|
|
3517
3528
|
export type DiceStartAction = {
|
|
3518
3529
|
direction: DiceDirection;
|
|
3519
3530
|
selectedValue: number;
|
|
@@ -3629,8 +3640,8 @@ declare class SoundController {
|
|
|
3629
3640
|
}
|
|
3630
3641
|
export type gameContextType = {
|
|
3631
3642
|
amount: string;
|
|
3632
|
-
updateBetAmount: (newAmount:
|
|
3633
|
-
updateBalance: (newAmount:
|
|
3643
|
+
updateBetAmount: (newAmount: Big$1) => void;
|
|
3644
|
+
updateBalance: (newAmount: Big$1) => void;
|
|
3634
3645
|
currency: Currency;
|
|
3635
3646
|
currencyDecimals: number;
|
|
3636
3647
|
showCurrencyAsText: boolean;
|
|
@@ -3656,9 +3667,10 @@ export type gameContextType = {
|
|
|
3656
3667
|
hapticController?: HapticController;
|
|
3657
3668
|
lobbyUrl: string;
|
|
3658
3669
|
depositUrl?: string;
|
|
3659
|
-
maxPayout: number;
|
|
3660
|
-
minBet: number;
|
|
3661
|
-
maxBet: number;
|
|
3670
|
+
maxPayout: number | null;
|
|
3671
|
+
minBet: number | null;
|
|
3672
|
+
maxBet: number | null;
|
|
3673
|
+
edge: number;
|
|
3662
3674
|
footerPosition: "ABOVE" | "BELOW";
|
|
3663
3675
|
logoUrl: string | null;
|
|
3664
3676
|
};
|
|
@@ -3675,9 +3687,10 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
3675
3687
|
origamiGame: OrigamiGame;
|
|
3676
3688
|
lobbyUrl: string;
|
|
3677
3689
|
depositUrl: string | undefined;
|
|
3678
|
-
maxPayout: number;
|
|
3679
|
-
minBet: number;
|
|
3680
|
-
maxBet: number;
|
|
3690
|
+
maxPayout: number | null;
|
|
3691
|
+
minBet: number | null;
|
|
3692
|
+
maxBet: number | null;
|
|
3693
|
+
edge: number;
|
|
3681
3694
|
footerPosition: "ABOVE" | "BELOW";
|
|
3682
3695
|
logoUrl: string | null;
|
|
3683
3696
|
private betAmount;
|
|
@@ -3709,8 +3722,8 @@ export declare class GameProviderWrapper extends OrigamiElement {
|
|
|
3709
3722
|
updateInstantBetEnabled(enabled: boolean): void;
|
|
3710
3723
|
updateAutobetNumberOfBets(numberOfBets: number): void;
|
|
3711
3724
|
updateMainWidth(width: number): void;
|
|
3712
|
-
updateBetAmount(newAmount:
|
|
3713
|
-
updateBalance(newAmount:
|
|
3725
|
+
updateBetAmount(newAmount: Big$1): void;
|
|
3726
|
+
updateBalance(newAmount: Big$1): void;
|
|
3714
3727
|
private _boundCalculateScale;
|
|
3715
3728
|
private setupResizeObserver;
|
|
3716
3729
|
private cleanupResizeObserver;
|
|
@@ -3753,7 +3766,7 @@ export interface MinesState {
|
|
|
3753
3766
|
numGemsFound: number;
|
|
3754
3767
|
numGemsRemaining: number;
|
|
3755
3768
|
state: MinesFlowState;
|
|
3756
|
-
betAmount:
|
|
3769
|
+
betAmount: Big$1;
|
|
3757
3770
|
}
|
|
3758
3771
|
export type AfterBetEffect = "Reset" | "Increase";
|
|
3759
3772
|
declare const defaultAutobetValues: {
|
|
@@ -3806,7 +3819,7 @@ export interface AutobetSettings {
|
|
|
3806
3819
|
autobetBets?: number;
|
|
3807
3820
|
}
|
|
3808
3821
|
export interface GameBetResult {
|
|
3809
|
-
pnl:
|
|
3822
|
+
pnl: Big$1;
|
|
3810
3823
|
gameOutcome: "Win" | "Loss" | "Draw";
|
|
3811
3824
|
hasError: boolean;
|
|
3812
3825
|
errorMessage?: string;
|
|
@@ -3833,7 +3846,7 @@ declare abstract class GameComponent extends OrigamiElement {
|
|
|
3833
3846
|
toggleAutobet(event: AutobetToggleEvent): Promise<void>;
|
|
3834
3847
|
protected abstract executeAutobet(_autobetSettings: AutobetSettings, _currentBetAmount: string): Promise<GameBetResult>;
|
|
3835
3848
|
protected adjustBetAmount(autobetSettings: AutobetSettings, gameOutcome: "Win" | "Loss" | "Draw", originalBetAmount: string, currentBetAmount: string): string;
|
|
3836
|
-
protected isPnLWithinLimits(autobetSettings: AutobetSettings, totalPnL:
|
|
3849
|
+
protected isPnLWithinLimits(autobetSettings: AutobetSettings, totalPnL: Big$1): boolean;
|
|
3837
3850
|
protected updateHistoryWithBet(betResult: BetResult): void;
|
|
3838
3851
|
protected showError(message: string): void;
|
|
3839
3852
|
}
|
|
@@ -3850,6 +3863,8 @@ declare class DiceApi {
|
|
|
3850
3863
|
private authToken;
|
|
3851
3864
|
private baseUrl;
|
|
3852
3865
|
static totalDiceValue: number;
|
|
3866
|
+
static minWinChance: number;
|
|
3867
|
+
static getMaxWinChance(edge: number): number;
|
|
3853
3868
|
constructor(authToken: string, baseUrl: string);
|
|
3854
3869
|
startBet(data: DiceStartArgs): Promise<{
|
|
3855
3870
|
success: true;
|
|
@@ -3860,20 +3875,24 @@ declare class DiceApi {
|
|
|
3860
3875
|
error: string;
|
|
3861
3876
|
data?: undefined;
|
|
3862
3877
|
}>;
|
|
3863
|
-
static getMultiplier(selectedValue: number, diceDirection: DiceDirection): string;
|
|
3878
|
+
static getMultiplier(edge: number, selectedValue: number, diceDirection: DiceDirection): string;
|
|
3864
3879
|
static getWinChance(selectedValue: number, diceDirection: DiceDirection): string;
|
|
3865
|
-
static getSelectedValueFromMultiplier(multiplier: number, diceDirection: DiceDirection): number;
|
|
3880
|
+
static getSelectedValueFromMultiplier(edge: number, multiplier: number, diceDirection: DiceDirection): number;
|
|
3866
3881
|
static getSelectedValueFromWinChance(winChancePercentage: number, diceDirection: DiceDirection): number;
|
|
3867
3882
|
static getSelectedValueFromRollOver(selectedValue: number): number;
|
|
3868
|
-
static
|
|
3869
|
-
static
|
|
3883
|
+
static getMinMultiplier(edge: number): string;
|
|
3884
|
+
static getMaxMultiplier(edge: number): string;
|
|
3885
|
+
static isValidMultiplier(edge: number, multiplier: string): boolean;
|
|
3886
|
+
static isValidWinChance(winChance: string, edge: number): boolean;
|
|
3870
3887
|
}
|
|
3871
3888
|
declare class MockDiceApi {
|
|
3872
|
-
private
|
|
3889
|
+
private readonly edge;
|
|
3890
|
+
constructor(edge: number);
|
|
3873
3891
|
startBet(data: DiceStartArgs): Promise<{
|
|
3874
3892
|
success: true;
|
|
3875
3893
|
data: BetResult;
|
|
3876
3894
|
}>;
|
|
3895
|
+
private static getRandomValueInRange;
|
|
3877
3896
|
}
|
|
3878
3897
|
export declare class DiceGame extends GameComponent {
|
|
3879
3898
|
static styles: import("lit").CSSResult[];
|
|
@@ -3929,12 +3948,14 @@ declare class KenoApi {
|
|
|
3929
3948
|
}>;
|
|
3930
3949
|
}
|
|
3931
3950
|
declare class MockKenoApi {
|
|
3932
|
-
private
|
|
3933
|
-
|
|
3934
|
-
startBet
|
|
3951
|
+
private readonly edge;
|
|
3952
|
+
constructor(edge: KenoEdge);
|
|
3953
|
+
startBet(data: KenoStartArgs): Promise<{
|
|
3935
3954
|
success: true;
|
|
3936
3955
|
data: BetResult;
|
|
3937
3956
|
}>;
|
|
3957
|
+
private static generateRandomTiles;
|
|
3958
|
+
private calculateMultiplier;
|
|
3938
3959
|
}
|
|
3939
3960
|
export declare class KenoGame extends GameComponent {
|
|
3940
3961
|
private isManualPlaying;
|
|
@@ -3986,6 +4007,10 @@ export type LimboStartArgs = {
|
|
|
3986
4007
|
declare class LimboApi {
|
|
3987
4008
|
private authToken;
|
|
3988
4009
|
private baseUrl;
|
|
4010
|
+
static minMultiplier: number;
|
|
4011
|
+
static maxMultiplier: number;
|
|
4012
|
+
static getMinWinChance(edge: number): string;
|
|
4013
|
+
static getMaxWinChance(edge: number): string;
|
|
3989
4014
|
constructor(authToken: string, baseUrl: string);
|
|
3990
4015
|
startBet: (data: LimboStartArgs) => Promise<{
|
|
3991
4016
|
success: true;
|
|
@@ -3996,18 +4021,20 @@ declare class LimboApi {
|
|
|
3996
4021
|
error: string;
|
|
3997
4022
|
data?: undefined;
|
|
3998
4023
|
}>;
|
|
3999
|
-
static calculateMultiplier(winChance: number): string;
|
|
4000
|
-
static calculateWinChance(targetMultiplier: number): string;
|
|
4024
|
+
static calculateMultiplier(winChance: number, edge: number): string;
|
|
4025
|
+
static calculateWinChance(targetMultiplier: number, edge: number): string;
|
|
4001
4026
|
static calculateProfitOnWin(amount: string, targetMultiplier: number): string;
|
|
4002
4027
|
static isValidMultiplier(multiplier: string): boolean;
|
|
4003
|
-
static isValidWinChance(winChance: string): boolean;
|
|
4028
|
+
static isValidWinChance(winChance: string, edge: number): boolean;
|
|
4004
4029
|
}
|
|
4005
4030
|
declare class MockLimboApi {
|
|
4006
|
-
private
|
|
4007
|
-
|
|
4031
|
+
private readonly edge;
|
|
4032
|
+
constructor(edge: number);
|
|
4033
|
+
startBet(data: LimboStartArgs): Promise<{
|
|
4008
4034
|
success: true;
|
|
4009
4035
|
data: BetResult;
|
|
4010
4036
|
}>;
|
|
4037
|
+
private getRandomMultiplier;
|
|
4011
4038
|
}
|
|
4012
4039
|
export declare class LimboGame extends GameComponent {
|
|
4013
4040
|
static styles: import("lit").CSSResult[];
|
|
@@ -4114,16 +4141,14 @@ declare class MinesApi {
|
|
|
4114
4141
|
};
|
|
4115
4142
|
static deriveOutcome: (bet?: BetResult) => MinesGameOutcome | null;
|
|
4116
4143
|
static deriveAutoOutcome: (bet?: BetResult | null) => MinesGameOutcome | null;
|
|
4117
|
-
static calculateMinesMultiplier: (gemsFound: number, mines: number) =>
|
|
4144
|
+
static calculateMinesMultiplier: (gemsFound: number, mines: number, edge: number) => Big$1;
|
|
4118
4145
|
static getState: (bet: BetResult) => MinesState;
|
|
4119
4146
|
}
|
|
4120
4147
|
declare class MockMinesApi {
|
|
4148
|
+
private readonly edge;
|
|
4121
4149
|
private static activeBet;
|
|
4122
4150
|
private static minePositions;
|
|
4123
|
-
|
|
4124
|
-
private static generateMinePositions;
|
|
4125
|
-
private static createBetAction;
|
|
4126
|
-
private static createMockBetResult;
|
|
4151
|
+
constructor(edge: number);
|
|
4127
4152
|
startManualBet(data: MinesManualStartArgs): Promise<{
|
|
4128
4153
|
success: true;
|
|
4129
4154
|
data: BetResult;
|
|
@@ -4159,6 +4184,10 @@ declare class MockMinesApi {
|
|
|
4159
4184
|
success: true;
|
|
4160
4185
|
data: BetResult;
|
|
4161
4186
|
}>;
|
|
4187
|
+
private static getRandomValueInRange;
|
|
4188
|
+
private static generateMinePositions;
|
|
4189
|
+
private static createBetAction;
|
|
4190
|
+
private createMockBetResult;
|
|
4162
4191
|
}
|
|
4163
4192
|
export declare class MinesGame extends GameComponent {
|
|
4164
4193
|
private minesCount;
|