@kalamba/sdk 0.4.1 → 0.6.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/errors-66b5612a.cjs +5 -0
- package/dist/errors-96eb18f7.js +52 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +99 -24
- package/dist/index.js +193 -109
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.ts +39 -9
- package/dist/plugins.js +590 -499
- package/dist/wrapper.d.ts +38 -9
- package/package.json +2 -1
package/dist/wrapper.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ declare abstract class CasinoPlugin {
|
|
|
58
58
|
declare type ContractPlayPayload = {
|
|
59
59
|
[key: string]: any;
|
|
60
60
|
bet: Bet | null;
|
|
61
|
+
forceOutcome?: unknown;
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
declare type DeepPartial<T> = T extends object ? {
|
|
@@ -131,8 +132,24 @@ declare type MessageMap = DomainAllowedPayloadMap<'sdk'> & DomainAllowedPayloadM
|
|
|
131
132
|
declare type MessagePayload<M extends Message> = MessageMap[M];
|
|
132
133
|
|
|
133
134
|
declare type OpenGameError = {
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
type: 'timeout';
|
|
136
|
+
} | {
|
|
137
|
+
type: 'error';
|
|
138
|
+
data: {
|
|
139
|
+
code: keyof typeof OpenGameErrorCode;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
declare const OpenGameErrorCode: {
|
|
144
|
+
readonly CONNECTION_ERROR: "CONNECTION_ERROR";
|
|
145
|
+
readonly ALREADY_LOGGED_IN: "ALREADY_LOGGED_IN";
|
|
146
|
+
readonly DENIED: "DENIED";
|
|
147
|
+
readonly NOT_FOUND: "NOT_FOUND";
|
|
148
|
+
readonly BONUS_RESTRICTION: "BONUS_RESTRICTION";
|
|
149
|
+
readonly ERROR: "ERROR";
|
|
150
|
+
readonly GAME_UNAVAILABLE: "GAME_UNAVAILABLE";
|
|
151
|
+
readonly RECONNECT_DATA_MISMATCH: "RECONNECT_DATA_MISMATCH";
|
|
152
|
+
readonly TOO_MANY_OPEN_GAMES: "TOO_MANY_OPEN_GAMES";
|
|
136
153
|
};
|
|
137
154
|
|
|
138
155
|
declare type OpenGameRequest = {
|
|
@@ -145,10 +162,7 @@ declare type OpenGameResponse = {
|
|
|
145
162
|
contract: {
|
|
146
163
|
bet: {
|
|
147
164
|
available: Record<number, number[]>;
|
|
148
|
-
default:
|
|
149
|
-
base: number;
|
|
150
|
-
multiplier: number;
|
|
151
|
-
};
|
|
165
|
+
default: Bet;
|
|
152
166
|
max: number;
|
|
153
167
|
last: Bet | null;
|
|
154
168
|
lastPaid: Bet | null;
|
|
@@ -170,6 +184,7 @@ declare type OpenGameResponse = {
|
|
|
170
184
|
}[];
|
|
171
185
|
version: string;
|
|
172
186
|
};
|
|
187
|
+
roundId?: string;
|
|
173
188
|
serverTime: number;
|
|
174
189
|
sessionId: string;
|
|
175
190
|
stateType: {
|
|
@@ -186,8 +201,22 @@ declare type OpenGameResponse = {
|
|
|
186
201
|
};
|
|
187
202
|
|
|
188
203
|
declare type PlayError = {
|
|
189
|
-
|
|
190
|
-
|
|
204
|
+
type: 'timeout';
|
|
205
|
+
} | {
|
|
206
|
+
type: 'error';
|
|
207
|
+
data: {
|
|
208
|
+
code: keyof typeof PlayErrorCode;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
declare const PlayErrorCode: {
|
|
213
|
+
readonly ERROR: "ERROR";
|
|
214
|
+
readonly GAMING_LIMITS_REACHED: "GAMING_LIMITS_REACHED";
|
|
215
|
+
readonly INVALID_CURRENCY: "INVALID_CURRENCY";
|
|
216
|
+
readonly INVALID_SESSION: "INVALID_SESSION";
|
|
217
|
+
readonly OUT_OF_MONEY: "OUT_OF_MONEY";
|
|
218
|
+
readonly UNFINISHED_ROUND_IN_PROGRESS: "UNFINISHED_ROUND_IN_PROGRESS";
|
|
219
|
+
readonly WALLET_ERROR: "WALLET_ERROR";
|
|
191
220
|
};
|
|
192
221
|
|
|
193
222
|
declare type PlayRequest = {
|
|
@@ -206,8 +235,8 @@ declare type PlayResponse = {
|
|
|
206
235
|
coins: number;
|
|
207
236
|
version: number;
|
|
208
237
|
};
|
|
209
|
-
serverTime: number;
|
|
210
238
|
roundId: string;
|
|
239
|
+
serverTime: number;
|
|
211
240
|
stateType: {
|
|
212
241
|
thisRound: string;
|
|
213
242
|
nextRound: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kalamba/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"license": "BSD-3-Clause",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"casino"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
+
"date-fns": "3.6.0",
|
|
48
49
|
"ua-parser-js": "2.0.0-beta.2",
|
|
49
50
|
"uuid": "9.0.1"
|
|
50
51
|
},
|