@block52/poker-vm-sdk 1.0.2 → 1.0.4

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 CHANGED
@@ -45099,6 +45099,11 @@ declare enum GameType {
45099
45099
  SIT_AND_GO = "sit-and-go",
45100
45100
  TOURNAMENT = "tournament"
45101
45101
  }
45102
+ declare enum GameFormat {
45103
+ CASH = "cash",
45104
+ SIT_AND_GO = "sit-and-go",
45105
+ TOURNAMENT = "tournament"
45106
+ }
45102
45107
  declare enum GameStatus {
45103
45108
  WAITING_FOR_PLAYERS = "waiting-for-players",
45104
45109
  REGISTRATION = "registration",
@@ -45144,9 +45149,11 @@ type GameOptions = {
45144
45149
  smallBlind: bigint;
45145
45150
  bigBlind: bigint;
45146
45151
  timeout: number;
45147
- type: GameType;
45152
+ format: GameFormat;
45148
45153
  rake?: RakeConfig$1;
45149
45154
  owner?: string;
45155
+ startingStack?: bigint;
45156
+ blindLevelDuration?: number;
45150
45157
  otherOptions?: Record<string, any>;
45151
45158
  };
45152
45159
  type GameOptionsDTO = {
@@ -45157,9 +45164,11 @@ type GameOptionsDTO = {
45157
45164
  smallBlind?: string;
45158
45165
  bigBlind?: string;
45159
45166
  timeout?: number;
45160
- type?: GameType;
45167
+ format?: GameFormat;
45161
45168
  rake?: RakeConfigDTO;
45162
45169
  owner?: string;
45170
+ startingStack?: string;
45171
+ blindLevelDuration?: number;
45163
45172
  otherOptions?: Record<string, any>;
45164
45173
  };
45165
45174
  type ActionDTO = {
@@ -45227,7 +45236,7 @@ type TexasHoldemGameState = {
45227
45236
  signature: string;
45228
45237
  };
45229
45238
  type TexasHoldemStateDTO = {
45230
- type: GameType;
45239
+ gameFormat: GameFormat;
45231
45240
  address: string;
45232
45241
  gameOptions: GameOptionsDTO;
45233
45242
  smallBlindPosition?: number;
@@ -45990,6 +45999,13 @@ interface RakeConfig {
45990
45999
  rakeCap: bigint;
45991
46000
  owner: string;
45992
46001
  }
46002
+ /**
46003
+ * SNG/Tournament specific configuration
46004
+ */
46005
+ interface SNGConfig {
46006
+ startingStack: bigint;
46007
+ blindLevelDuration?: number;
46008
+ }
45993
46009
  /**
45994
46010
  * Signing Cosmos Client that extends the read-only CosmosClient with transaction capabilities
45995
46011
  */
@@ -46017,7 +46033,7 @@ declare class SigningCosmosClient extends CosmosClient {
46017
46033
  /**
46018
46034
  * Create a new poker game
46019
46035
  */
46020
- createGame(gameType: string, minPlayers: number, maxPlayers: number, minBuyInB52USDC: bigint, maxBuyInB52USDC: bigint, smallBlindB52USDC: bigint, bigBlindB52USDC: bigint, timeout: number, rakeConfig?: RakeConfig): Promise<string>;
46036
+ createGame(gameType: string, minPlayers: number, maxPlayers: number, minBuyInB52USDC: bigint, maxBuyInB52USDC: bigint, smallBlindB52USDC: bigint, bigBlindB52USDC: bigint, timeout: number, rakeConfig?: RakeConfig, sngConfig?: SNGConfig): Promise<string>;
46021
46037
  /**
46022
46038
  * Join a poker game
46023
46039
  */
@@ -46345,5 +46361,5 @@ declare const Client: typeof IgniteClient & Constructor<{
46345
46361
  }>;
46346
46362
  declare const registry: Registry;
46347
46363
 
46348
- export { AllPlayerActions, BLOCK52_HD_PATH, COSMOS_CONSTANTS, Client, CosmosClient, Deck, GameStatus, GameType, HandType, KEYS, MissingWalletError, NonPlayerActionType, Params, PlayerActionType, PlayerStatus, PokerGameIntegration, PokerSolver, RPCMethods, SUIT, SigningCosmosClient, TexasHoldemRound, WithdrawalRequest, createSigningClientFromMnemonic, createWalletFromMnemonic, generateWallet, getAddressFromMnemonic, getDefaultCosmosConfig, isValidMnemonic, registry };
46364
+ export { AllPlayerActions, BLOCK52_HD_PATH, COSMOS_CONSTANTS, Client, CosmosClient, Deck, GameFormat, GameStatus, GameType, HandType, KEYS, MissingWalletError, NonPlayerActionType, Params, PlayerActionType, PlayerStatus, PokerGameIntegration, PokerSolver, RPCMethods, SUIT, SigningCosmosClient, TexasHoldemRound, WithdrawalRequest, createSigningClientFromMnemonic, createWalletFromMnemonic, generateWallet, getAddressFromMnemonic, getDefaultCosmosConfig, isValidMnemonic, registry };
46349
46365
  export type { AccountDTO, ActionDTO, Block, BlockDTO, BlockHeader, BlockHeaderDTO, BlockID, BlockResponse, BurnResponseDTO, Card, EquityHand, EquityRequest, EquityResponse, EquityResult, GameListItem, GameOptions, GameOptionsDTO, GameOptionsResponse, GameStateResponse, HandEvaluation, ISignedResponse, LegalActionDTO, PerformActionResponse, PlayerDTO, RPCRequest, RPCRequestParams, RPCResponse, RakeConfig, RakeConfigDTO, ResultDTO, TexasHoldemGameState, TexasHoldemStateDTO, TransactionDTO, TransactionResponse, WalletInfo, WinnerDTO, WithdrawResponseDTO };
package/dist/index.esm.js CHANGED
@@ -55502,6 +55502,13 @@ var GameType;
55502
55502
  GameType["SIT_AND_GO"] = "sit-and-go";
55503
55503
  GameType["TOURNAMENT"] = "tournament";
55504
55504
  })(GameType || (GameType = {}));
55505
+ // GameFormat represents the game structure/format (preferred over GameType for new code)
55506
+ var GameFormat;
55507
+ (function (GameFormat) {
55508
+ GameFormat["CASH"] = "cash";
55509
+ GameFormat["SIT_AND_GO"] = "sit-and-go";
55510
+ GameFormat["TOURNAMENT"] = "tournament";
55511
+ })(GameFormat || (GameFormat = {}));
55505
55512
  var GameStatus;
55506
55513
  (function (GameStatus) {
55507
55514
  GameStatus["WAITING_FOR_PLAYERS"] = "waiting-for-players";
@@ -57148,7 +57155,7 @@ class SigningCosmosClient extends CosmosClient {
57148
57155
  /**
57149
57156
  * Create a new poker game
57150
57157
  */
57151
- async createGame(gameType, minPlayers, maxPlayers, minBuyInB52USDC, maxBuyInB52USDC, smallBlindB52USDC, bigBlindB52USDC, timeout, rakeConfig) {
57158
+ async createGame(gameType, minPlayers, maxPlayers, minBuyInB52USDC, maxBuyInB52USDC, smallBlindB52USDC, bigBlindB52USDC, timeout, rakeConfig, sngConfig) {
57152
57159
  await this.initializeSigningClient();
57153
57160
  if (!this.signingClient || !this.wallet) {
57154
57161
  throw new Error("Signing client not initialized");
@@ -57174,6 +57181,13 @@ class SigningCosmosClient extends CosmosClient {
57174
57181
  msgCreateGame.rakeCap = rakeConfig.rakeCap.toString();
57175
57182
  msgCreateGame.owner = rakeConfig.owner;
57176
57183
  }
57184
+ // Add SNG/Tournament configuration if provided
57185
+ if (sngConfig) {
57186
+ msgCreateGame.startingStack = sngConfig.startingStack.toString();
57187
+ if (sngConfig.blindLevelDuration !== undefined) {
57188
+ msgCreateGame.blindLevelDuration = sngConfig.blindLevelDuration;
57189
+ }
57190
+ }
57177
57191
  // Create the transaction message
57178
57192
  const msg = {
57179
57193
  typeUrl: "/pokerchain.poker.v1.MsgCreateGame",
@@ -57196,6 +57210,10 @@ class SigningCosmosClient extends CosmosClient {
57196
57210
  rakePercentage: rakeConfig.rakePercentage,
57197
57211
  rakeCap: rakeConfig.rakeCap.toString(),
57198
57212
  owner: rakeConfig.owner
57213
+ }),
57214
+ ...(sngConfig && {
57215
+ startingStack: sngConfig.startingStack.toString(),
57216
+ blindLevelDuration: sngConfig.blindLevelDuration
57199
57217
  })
57200
57218
  });
57201
57219
  try {
@@ -57657,5 +57675,5 @@ const registry = new Registry([
57657
57675
  ...msgTypes,
57658
57676
  ]);
57659
57677
 
57660
- export { AllPlayerActions, BLOCK52_HD_PATH, COSMOS_CONSTANTS, Client, CosmosClient, Deck, GameStatus, GameType, HandType, KEYS, MissingWalletError, NonPlayerActionType, Params$c as Params, PlayerActionType, PlayerStatus, PokerGameIntegration, PokerSolver, RPCMethods, SUIT, SigningCosmosClient, TexasHoldemRound, WithdrawalRequest, createSigningClientFromMnemonic, createWalletFromMnemonic, generateWallet, getAddressFromMnemonic, getDefaultCosmosConfig, isValidMnemonic, registry };
57678
+ export { AllPlayerActions, BLOCK52_HD_PATH, COSMOS_CONSTANTS, Client, CosmosClient, Deck, GameFormat, GameStatus, GameType, HandType, KEYS, MissingWalletError, NonPlayerActionType, Params$c as Params, PlayerActionType, PlayerStatus, PokerGameIntegration, PokerSolver, RPCMethods, SUIT, SigningCosmosClient, TexasHoldemRound, WithdrawalRequest, createSigningClientFromMnemonic, createWalletFromMnemonic, generateWallet, getAddressFromMnemonic, getDefaultCosmosConfig, isValidMnemonic, registry };
57661
57679
  //# sourceMappingURL=index.esm.js.map