@block52/poker-vm-sdk 1.14.0 → 1.15.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 +5 -3
- package/dist/index.esm.js +10 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/signingClient.d.ts +5 -3
- package/dist/signingClient.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46895,7 +46895,8 @@ declare class SigningCosmosClient extends CosmosClient {
|
|
|
46895
46895
|
* `bettingLimit` is the table's betting structure (block52/pokerchain#407).
|
|
46896
46896
|
* Omit it for the variant's default: pot-limit for omaha (PLO), no-limit for
|
|
46897
46897
|
* texas-holdem. Omitted, the field is not encoded at all, so a chain without
|
|
46898
|
-
* it accepts the tx unchanged. Fixed-limit is
|
|
46898
|
+
* it accepts the tx unchanged. Fixed-limit is texas-holdem only (poker-vm#2654,
|
|
46899
|
+
* block52/pokerchain#439).
|
|
46899
46900
|
*/
|
|
46900
46901
|
createGame(gameFormat: string, gameVariant: string, minPlayers: number, maxPlayers: number, minBuyInB52USDC: bigint, maxBuyInB52USDC: bigint, smallBlindB52USDC: bigint, bigBlindB52USDC: bigint, timeout: number, rakeConfig?: RakeConfig, sngConfig?: SNGConfig, name?: string, bettingLimit?: BettingLimit): Promise<string>;
|
|
46901
46902
|
/**
|
|
@@ -47142,9 +47143,10 @@ declare class SigningCosmosClient extends CosmosClient {
|
|
|
47142
47143
|
declare function createSigningClientFromMnemonic(config: CosmosConfig, mnemonic: string): Promise<SigningCosmosClient>;
|
|
47143
47144
|
/**
|
|
47144
47145
|
* Throws for a betting limit a table cannot be created with (block52/pokerchain#407).
|
|
47145
|
-
* Undefined is allowed: the chain applies the variant's default.
|
|
47146
|
+
* Undefined is allowed: the chain applies the variant's default. Fixed-limit is
|
|
47147
|
+
* texas-holdem only, as the chain decides (block52/pokerchain#439, poker-vm#2654).
|
|
47146
47148
|
*/
|
|
47147
|
-
declare function assertCreatableBettingLimit(bettingLimit
|
|
47149
|
+
declare function assertCreatableBettingLimit(bettingLimit: BettingLimit | undefined, gameVariant: string): void;
|
|
47148
47150
|
|
|
47149
47151
|
/**
|
|
47150
47152
|
* The part of a broadcast result this module reads. Structurally a subset of
|
package/dist/index.esm.js
CHANGED
|
@@ -71796,7 +71796,8 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
71796
71796
|
* `bettingLimit` is the table's betting structure (block52/pokerchain#407).
|
|
71797
71797
|
* Omit it for the variant's default: pot-limit for omaha (PLO), no-limit for
|
|
71798
71798
|
* texas-holdem. Omitted, the field is not encoded at all, so a chain without
|
|
71799
|
-
* it accepts the tx unchanged. Fixed-limit is
|
|
71799
|
+
* it accepts the tx unchanged. Fixed-limit is texas-holdem only (poker-vm#2654,
|
|
71800
|
+
* block52/pokerchain#439).
|
|
71800
71801
|
*/
|
|
71801
71802
|
async createGame(gameFormat, gameVariant, minPlayers, maxPlayers, minBuyInB52USDC, maxBuyInB52USDC, smallBlindB52USDC, bigBlindB52USDC, timeout, rakeConfig, sngConfig, name, bettingLimit) {
|
|
71802
71803
|
// Validate SNG/Tournament config BEFORE any network work — fail fast.
|
|
@@ -71819,7 +71820,7 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
71819
71820
|
}
|
|
71820
71821
|
assertCreatableSngField(minPlayers, maxPlayers, sngConfig);
|
|
71821
71822
|
}
|
|
71822
|
-
assertCreatableBettingLimit(bettingLimit);
|
|
71823
|
+
assertCreatableBettingLimit(bettingLimit, gameVariant);
|
|
71823
71824
|
await this.initializeSigningClient();
|
|
71824
71825
|
if (!this.signingClient || !this.wallet) {
|
|
71825
71826
|
throw new Error("Signing client not initialized");
|
|
@@ -72762,14 +72763,18 @@ async function createSigningClientFromMnemonic(config, mnemonic) {
|
|
|
72762
72763
|
}
|
|
72763
72764
|
/**
|
|
72764
72765
|
* Throws for a betting limit a table cannot be created with (block52/pokerchain#407).
|
|
72765
|
-
* Undefined is allowed: the chain applies the variant's default.
|
|
72766
|
+
* Undefined is allowed: the chain applies the variant's default. Fixed-limit is
|
|
72767
|
+
* texas-holdem only, as the chain decides (block52/pokerchain#439, poker-vm#2654).
|
|
72766
72768
|
*/
|
|
72767
|
-
function assertCreatableBettingLimit(bettingLimit) {
|
|
72769
|
+
function assertCreatableBettingLimit(bettingLimit, gameVariant) {
|
|
72768
72770
|
if (bettingLimit === undefined) {
|
|
72769
72771
|
return;
|
|
72770
72772
|
}
|
|
72771
72773
|
if (bettingLimit === BettingLimit.FIXED_LIMIT) {
|
|
72772
|
-
|
|
72774
|
+
if (gameVariant !== GameVariant.TEXAS_HOLDEM) {
|
|
72775
|
+
throw new Error(`Betting limit fixed-limit is only available for texas-holdem; got ${gameVariant}.`);
|
|
72776
|
+
}
|
|
72777
|
+
return;
|
|
72773
72778
|
}
|
|
72774
72779
|
if (bettingLimit !== BettingLimit.NO_LIMIT && bettingLimit !== BettingLimit.POT_LIMIT) {
|
|
72775
72780
|
throw new Error(`Invalid betting limit: ${bettingLimit}.`);
|