@block52/poker-vm-sdk 1.0.2 → 1.0.3
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 +12 -1
- package/dist/index.esm.js +12 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/signingClient.d.ts +10 -1
- package/dist/signingClient.d.ts.map +1 -1
- package/dist/types/game.d.ts +4 -0
- package/dist/types/game.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -45147,6 +45147,8 @@ type GameOptions = {
|
|
|
45147
45147
|
type: GameType;
|
|
45148
45148
|
rake?: RakeConfig$1;
|
|
45149
45149
|
owner?: string;
|
|
45150
|
+
startingStack?: bigint;
|
|
45151
|
+
blindLevelDuration?: number;
|
|
45150
45152
|
otherOptions?: Record<string, any>;
|
|
45151
45153
|
};
|
|
45152
45154
|
type GameOptionsDTO = {
|
|
@@ -45160,6 +45162,8 @@ type GameOptionsDTO = {
|
|
|
45160
45162
|
type?: GameType;
|
|
45161
45163
|
rake?: RakeConfigDTO;
|
|
45162
45164
|
owner?: string;
|
|
45165
|
+
startingStack?: string;
|
|
45166
|
+
blindLevelDuration?: number;
|
|
45163
45167
|
otherOptions?: Record<string, any>;
|
|
45164
45168
|
};
|
|
45165
45169
|
type ActionDTO = {
|
|
@@ -45990,6 +45994,13 @@ interface RakeConfig {
|
|
|
45990
45994
|
rakeCap: bigint;
|
|
45991
45995
|
owner: string;
|
|
45992
45996
|
}
|
|
45997
|
+
/**
|
|
45998
|
+
* SNG/Tournament specific configuration
|
|
45999
|
+
*/
|
|
46000
|
+
interface SNGConfig {
|
|
46001
|
+
startingStack: bigint;
|
|
46002
|
+
blindLevelDuration?: number;
|
|
46003
|
+
}
|
|
45993
46004
|
/**
|
|
45994
46005
|
* Signing Cosmos Client that extends the read-only CosmosClient with transaction capabilities
|
|
45995
46006
|
*/
|
|
@@ -46017,7 +46028,7 @@ declare class SigningCosmosClient extends CosmosClient {
|
|
|
46017
46028
|
/**
|
|
46018
46029
|
* Create a new poker game
|
|
46019
46030
|
*/
|
|
46020
|
-
createGame(gameType: string, minPlayers: number, maxPlayers: number, minBuyInB52USDC: bigint, maxBuyInB52USDC: bigint, smallBlindB52USDC: bigint, bigBlindB52USDC: bigint, timeout: number, rakeConfig?: RakeConfig): Promise<string>;
|
|
46031
|
+
createGame(gameType: string, minPlayers: number, maxPlayers: number, minBuyInB52USDC: bigint, maxBuyInB52USDC: bigint, smallBlindB52USDC: bigint, bigBlindB52USDC: bigint, timeout: number, rakeConfig?: RakeConfig, sngConfig?: SNGConfig): Promise<string>;
|
|
46021
46032
|
/**
|
|
46022
46033
|
* Join a poker game
|
|
46023
46034
|
*/
|
package/dist/index.esm.js
CHANGED
|
@@ -57148,7 +57148,7 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
57148
57148
|
/**
|
|
57149
57149
|
* Create a new poker game
|
|
57150
57150
|
*/
|
|
57151
|
-
async createGame(gameType, minPlayers, maxPlayers, minBuyInB52USDC, maxBuyInB52USDC, smallBlindB52USDC, bigBlindB52USDC, timeout, rakeConfig) {
|
|
57151
|
+
async createGame(gameType, minPlayers, maxPlayers, minBuyInB52USDC, maxBuyInB52USDC, smallBlindB52USDC, bigBlindB52USDC, timeout, rakeConfig, sngConfig) {
|
|
57152
57152
|
await this.initializeSigningClient();
|
|
57153
57153
|
if (!this.signingClient || !this.wallet) {
|
|
57154
57154
|
throw new Error("Signing client not initialized");
|
|
@@ -57174,6 +57174,13 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
57174
57174
|
msgCreateGame.rakeCap = rakeConfig.rakeCap.toString();
|
|
57175
57175
|
msgCreateGame.owner = rakeConfig.owner;
|
|
57176
57176
|
}
|
|
57177
|
+
// Add SNG/Tournament configuration if provided
|
|
57178
|
+
if (sngConfig) {
|
|
57179
|
+
msgCreateGame.startingStack = sngConfig.startingStack.toString();
|
|
57180
|
+
if (sngConfig.blindLevelDuration !== undefined) {
|
|
57181
|
+
msgCreateGame.blindLevelDuration = sngConfig.blindLevelDuration;
|
|
57182
|
+
}
|
|
57183
|
+
}
|
|
57177
57184
|
// Create the transaction message
|
|
57178
57185
|
const msg = {
|
|
57179
57186
|
typeUrl: "/pokerchain.poker.v1.MsgCreateGame",
|
|
@@ -57196,6 +57203,10 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
57196
57203
|
rakePercentage: rakeConfig.rakePercentage,
|
|
57197
57204
|
rakeCap: rakeConfig.rakeCap.toString(),
|
|
57198
57205
|
owner: rakeConfig.owner
|
|
57206
|
+
}),
|
|
57207
|
+
...(sngConfig && {
|
|
57208
|
+
startingStack: sngConfig.startingStack.toString(),
|
|
57209
|
+
blindLevelDuration: sngConfig.blindLevelDuration
|
|
57199
57210
|
})
|
|
57200
57211
|
});
|
|
57201
57212
|
try {
|