@block52/poker-vm-sdk 1.3.3 → 1.3.5
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 +25 -2
- package/dist/index.esm.js +99 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +99 -1
- package/dist/index.js.map +1 -1
- package/dist/pokerchain.poker.v1/types/pokerchain/poker/v1/genesis.d.ts +15 -0
- package/dist/pokerchain.poker.v1/types/pokerchain/poker/v1/genesis.d.ts.map +1 -1
- package/dist/pokerchain.poker.v1/types/pokerchain/poker/v1/tx.d.ts +2 -0
- package/dist/pokerchain.poker.v1/types/pokerchain/poker/v1/tx.d.ts.map +1 -1
- package/dist/pokerchain.poker.v1/types.d.ts +2 -1
- package/dist/pokerchain.poker.v1/types.d.ts.map +1 -1
- package/dist/signingClient.d.ts +1 -0
- package/dist/signingClient.d.ts.map +1 -1
- package/dist/types/game.d.ts +6 -1
- package/dist/types/game.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -44006,6 +44006,21 @@ interface WithdrawalRequest {
|
|
|
44006
44006
|
completedAt: Long;
|
|
44007
44007
|
}
|
|
44008
44008
|
declare const WithdrawalRequest: MessageFns$2<WithdrawalRequest>;
|
|
44009
|
+
/**
|
|
44010
|
+
* ValidatorBond mirrors a validator's bonded USDC from Vault.sol (Ethereum) into
|
|
44011
|
+
* poker-module state. Used to split the SNG protocol fee (poker-vm#2592) across
|
|
44012
|
+
* validators proportionally to true bonded USDC (NOT consensus power).
|
|
44013
|
+
* NOTE: bondedUsdc is mirrored from Vault.sol via the SyncEthereum EndBlock path,
|
|
44014
|
+
* so it is only as fresh as the last sync — a join between syncs splits on slightly
|
|
44015
|
+
* stale weights. Acceptable, as bonds change rarely.
|
|
44016
|
+
*/
|
|
44017
|
+
interface ValidatorBond {
|
|
44018
|
+
/** Validator address (bond owner) */
|
|
44019
|
+
validator: string;
|
|
44020
|
+
/** Bonded USDC in microunits (6 decimals), mirrored from Vault.sol */
|
|
44021
|
+
bondedUsdc: Long;
|
|
44022
|
+
}
|
|
44023
|
+
declare const ValidatorBond: MessageFns$2<ValidatorBond>;
|
|
44009
44024
|
type Builtin$2 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
44010
44025
|
type DeepPartial$2<T> = T extends Builtin$2 ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$2<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$2<U>> : T extends {} ? {
|
|
44011
44026
|
[K in keyof T]?: DeepPartial$2<T[K]>;
|
|
@@ -44924,6 +44939,8 @@ interface MsgCreateGame {
|
|
|
44924
44939
|
blindLevelDuration: number;
|
|
44925
44940
|
/** Poker variant (texas-holdem/omaha) */
|
|
44926
44941
|
gameVariant: string;
|
|
44942
|
+
/** SNG flat entry fee in micro-units, skimmed to the creator (poker-vm#2118) */
|
|
44943
|
+
entryFee: Long;
|
|
44927
44944
|
}
|
|
44928
44945
|
declare const MsgCreateGame: MessageFns<MsgCreateGame>;
|
|
44929
44946
|
/** MsgJoinGame defines the MsgJoinGame message. */
|
|
@@ -45299,7 +45316,8 @@ declare enum PlayerStatus {
|
|
|
45299
45316
|
SITTING_OUT = "sitting-out",
|
|
45300
45317
|
SITTING_IN = "sitting-in",
|
|
45301
45318
|
WAITING_FOR_BIG_BLIND = "waiting-for-big-blind",
|
|
45302
|
-
SHOWING = "showing"
|
|
45319
|
+
SHOWING = "showing",
|
|
45320
|
+
MUCKED = "mucked"
|
|
45303
45321
|
}
|
|
45304
45322
|
type SitInMethod = "next-bb" | "post-now";
|
|
45305
45323
|
declare const SIT_IN_METHOD_NEXT_BB: SitInMethod;
|
|
@@ -45341,6 +45359,8 @@ type GameOptions = {
|
|
|
45341
45359
|
timeout: number;
|
|
45342
45360
|
rake?: RakeConfig$1;
|
|
45343
45361
|
startingStack?: bigint;
|
|
45362
|
+
entryFee?: bigint;
|
|
45363
|
+
protocolFeeBps?: number;
|
|
45344
45364
|
blindLevelDuration?: number;
|
|
45345
45365
|
blindLevel?: number;
|
|
45346
45366
|
sngStartTime?: number;
|
|
@@ -45370,6 +45390,8 @@ type GameOptionsDTO = {
|
|
|
45370
45390
|
timeout: number;
|
|
45371
45391
|
rake?: RakeConfigDTO;
|
|
45372
45392
|
startingStack?: string;
|
|
45393
|
+
entryFee?: string;
|
|
45394
|
+
protocolFeeBps?: number;
|
|
45373
45395
|
blindLevelDuration?: number;
|
|
45374
45396
|
blindLevel?: number;
|
|
45375
45397
|
nextSmallBlind?: string;
|
|
@@ -46507,6 +46529,7 @@ interface RakeConfig {
|
|
|
46507
46529
|
interface SNGConfig {
|
|
46508
46530
|
startingStack: bigint;
|
|
46509
46531
|
blindLevelDuration: number;
|
|
46532
|
+
entryFee?: bigint;
|
|
46510
46533
|
}
|
|
46511
46534
|
/**
|
|
46512
46535
|
* Signing Cosmos Client that extends the read-only CosmosClient with transaction capabilities
|
|
@@ -47023,5 +47046,5 @@ declare const Client: typeof IgniteClient & Constructor<{
|
|
|
47023
47046
|
}>;
|
|
47024
47047
|
declare const registry: Registry;
|
|
47025
47048
|
|
|
47026
|
-
export { AllPlayerActions, BLOCK52_HD_PATH, Board, COSMOS_CONSTANTS, Client, CosmosClient, Deck, GameFormat, GameStatus, GameVariant, HandType, KEYS, MissingWalletError, NonPlayerActionType, Params, PlayerActionType, PlayerStatus, PokerGameIntegration, PokerSolver, RPCMethods, SIT_IN_METHOD_NEXT_BB, SIT_IN_METHOD_POST_NOW, SIT_OUT_METHOD_NEXT_BB, SIT_OUT_METHOD_NEXT_HAND, SUIT, SigningCosmosClient, TexasHoldemRound, WithdrawalRequest, createSigningClientFromMnemonic, createWalletFromMnemonic, formatGameFormatDisplay, formatGameVariantDisplay, generateWallet, getActionByType, getAddressFromMnemonic, getDefaultCosmosConfig, getGameFormat, getGameFormatForCosmos, getGameFormatFromObject, getGameVariant, hasAction, isCashFormat, isEmptyAddress, isSitAndGoFormat, isTournamentFormat, isValidMnemonic, isValidPlayerAddress, parseGameFormat, parseGameVariant, registry };
|
|
47049
|
+
export { AllPlayerActions, BLOCK52_HD_PATH, Board, COSMOS_CONSTANTS, Client, CosmosClient, Deck, GameFormat, GameStatus, GameVariant, HandType, KEYS, MissingWalletError, NonPlayerActionType, Params, PlayerActionType, PlayerStatus, PokerGameIntegration, PokerSolver, RPCMethods, SIT_IN_METHOD_NEXT_BB, SIT_IN_METHOD_POST_NOW, SIT_OUT_METHOD_NEXT_BB, SIT_OUT_METHOD_NEXT_HAND, SUIT, SigningCosmosClient, TexasHoldemRound, ValidatorBond, WithdrawalRequest, createSigningClientFromMnemonic, createWalletFromMnemonic, formatGameFormatDisplay, formatGameVariantDisplay, generateWallet, getActionByType, getAddressFromMnemonic, getDefaultCosmosConfig, getGameFormat, getGameFormatForCosmos, getGameFormatFromObject, getGameVariant, hasAction, isCashFormat, isEmptyAddress, isSitAndGoFormat, isTournamentFormat, isValidMnemonic, isValidPlayerAddress, parseGameFormat, parseGameVariant, registry };
|
|
47027
47050
|
export type { AccountDTO, ActionDTO, Block, BlockDTO, BlockHeader, BlockHeaderDTO, BlockID, BlockResponse, BurnResponseDTO, Card, EquityHand, EquityRequest, EquityResponse, EquityResult, GameListItem, GameOptions, GameOptionsDTO, GameOptionsResponse, GameStateResponse, GameStateResponseDTO, HandEvaluation, ISignedResponse, LegalActionDTO, PayoutPlaceDTO, PerformActionResponse, PlayerDTO, RPCRequest, RPCRequestParams, RPCResponse, RakeConfig, RakeConfigDTO, ResultDTO, SitInMethod, SitOutMethod, TexasHoldemGameState, TexasHoldemStateDTO, TransactionDTO, TransactionResponse, WalletInfo, WinnerDTO, WithdrawResponseDTO };
|
package/dist/index.esm.js
CHANGED
|
@@ -2843,6 +2843,7 @@ function createBaseMsgCreateGame() {
|
|
|
2843
2843
|
startingStack: Long.UZERO,
|
|
2844
2844
|
blindLevelDuration: 0,
|
|
2845
2845
|
gameVariant: "",
|
|
2846
|
+
entryFee: Long.UZERO,
|
|
2846
2847
|
};
|
|
2847
2848
|
}
|
|
2848
2849
|
const MsgCreateGame = {
|
|
@@ -2895,6 +2896,9 @@ const MsgCreateGame = {
|
|
|
2895
2896
|
if (message.gameVariant !== "") {
|
|
2896
2897
|
writer.uint32(130).string(message.gameVariant);
|
|
2897
2898
|
}
|
|
2899
|
+
if (!message.entryFee.equals(Long.UZERO)) {
|
|
2900
|
+
writer.uint32(136).uint64(message.entryFee.toString());
|
|
2901
|
+
}
|
|
2898
2902
|
return writer;
|
|
2899
2903
|
},
|
|
2900
2904
|
decode(input, length) {
|
|
@@ -3016,6 +3020,13 @@ const MsgCreateGame = {
|
|
|
3016
3020
|
message.gameVariant = reader.string();
|
|
3017
3021
|
continue;
|
|
3018
3022
|
}
|
|
3023
|
+
case 17: {
|
|
3024
|
+
if (tag !== 136) {
|
|
3025
|
+
break;
|
|
3026
|
+
}
|
|
3027
|
+
message.entryFee = Long.fromString(reader.uint64().toString(), true);
|
|
3028
|
+
continue;
|
|
3029
|
+
}
|
|
3019
3030
|
}
|
|
3020
3031
|
if ((tag & 7) === 4 || tag === 0) {
|
|
3021
3032
|
break;
|
|
@@ -3042,6 +3053,7 @@ const MsgCreateGame = {
|
|
|
3042
3053
|
startingStack: isSet$2b(object.startingStack) ? Long.fromValue(object.startingStack) : Long.UZERO,
|
|
3043
3054
|
blindLevelDuration: isSet$2b(object.blindLevelDuration) ? globalThis.Number(object.blindLevelDuration) : 0,
|
|
3044
3055
|
gameVariant: isSet$2b(object.gameVariant) ? globalThis.String(object.gameVariant) : "",
|
|
3056
|
+
entryFee: isSet$2b(object.entryFee) ? Long.fromValue(object.entryFee) : Long.UZERO,
|
|
3045
3057
|
};
|
|
3046
3058
|
},
|
|
3047
3059
|
toJSON(message) {
|
|
@@ -3094,6 +3106,9 @@ const MsgCreateGame = {
|
|
|
3094
3106
|
if (message.gameVariant !== "") {
|
|
3095
3107
|
obj.gameVariant = message.gameVariant;
|
|
3096
3108
|
}
|
|
3109
|
+
if (!message.entryFee.equals(Long.UZERO)) {
|
|
3110
|
+
obj.entryFee = (message.entryFee || Long.UZERO).toString();
|
|
3111
|
+
}
|
|
3097
3112
|
return obj;
|
|
3098
3113
|
},
|
|
3099
3114
|
create(base) {
|
|
@@ -3137,6 +3152,9 @@ const MsgCreateGame = {
|
|
|
3137
3152
|
: Long.UZERO;
|
|
3138
3153
|
message.blindLevelDuration = object.blindLevelDuration ?? 0;
|
|
3139
3154
|
message.gameVariant = object.gameVariant ?? "";
|
|
3155
|
+
message.entryFee = (object.entryFee !== undefined && object.entryFee !== null)
|
|
3156
|
+
? Long.fromValue(object.entryFee)
|
|
3157
|
+
: Long.UZERO;
|
|
3140
3158
|
return message;
|
|
3141
3159
|
},
|
|
3142
3160
|
};
|
|
@@ -8810,6 +8828,76 @@ const WithdrawalRequest = {
|
|
|
8810
8828
|
return message;
|
|
8811
8829
|
},
|
|
8812
8830
|
};
|
|
8831
|
+
function createBaseValidatorBond() {
|
|
8832
|
+
return { validator: "", bondedUsdc: Long.UZERO };
|
|
8833
|
+
}
|
|
8834
|
+
const ValidatorBond = {
|
|
8835
|
+
encode(message, writer = new BinaryWriter()) {
|
|
8836
|
+
if (message.validator !== "") {
|
|
8837
|
+
writer.uint32(10).string(message.validator);
|
|
8838
|
+
}
|
|
8839
|
+
if (!message.bondedUsdc.equals(Long.UZERO)) {
|
|
8840
|
+
writer.uint32(16).uint64(message.bondedUsdc.toString());
|
|
8841
|
+
}
|
|
8842
|
+
return writer;
|
|
8843
|
+
},
|
|
8844
|
+
decode(input, length) {
|
|
8845
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
8846
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
8847
|
+
const message = createBaseValidatorBond();
|
|
8848
|
+
while (reader.pos < end) {
|
|
8849
|
+
const tag = reader.uint32();
|
|
8850
|
+
switch (tag >>> 3) {
|
|
8851
|
+
case 1: {
|
|
8852
|
+
if (tag !== 10) {
|
|
8853
|
+
break;
|
|
8854
|
+
}
|
|
8855
|
+
message.validator = reader.string();
|
|
8856
|
+
continue;
|
|
8857
|
+
}
|
|
8858
|
+
case 2: {
|
|
8859
|
+
if (tag !== 16) {
|
|
8860
|
+
break;
|
|
8861
|
+
}
|
|
8862
|
+
message.bondedUsdc = Long.fromString(reader.uint64().toString(), true);
|
|
8863
|
+
continue;
|
|
8864
|
+
}
|
|
8865
|
+
}
|
|
8866
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
8867
|
+
break;
|
|
8868
|
+
}
|
|
8869
|
+
reader.skip(tag & 7);
|
|
8870
|
+
}
|
|
8871
|
+
return message;
|
|
8872
|
+
},
|
|
8873
|
+
fromJSON(object) {
|
|
8874
|
+
return {
|
|
8875
|
+
validator: isSet$2a(object.validator) ? globalThis.String(object.validator) : "",
|
|
8876
|
+
bondedUsdc: isSet$2a(object.bondedUsdc) ? Long.fromValue(object.bondedUsdc) : Long.UZERO,
|
|
8877
|
+
};
|
|
8878
|
+
},
|
|
8879
|
+
toJSON(message) {
|
|
8880
|
+
const obj = {};
|
|
8881
|
+
if (message.validator !== "") {
|
|
8882
|
+
obj.validator = message.validator;
|
|
8883
|
+
}
|
|
8884
|
+
if (!message.bondedUsdc.equals(Long.UZERO)) {
|
|
8885
|
+
obj.bondedUsdc = (message.bondedUsdc || Long.UZERO).toString();
|
|
8886
|
+
}
|
|
8887
|
+
return obj;
|
|
8888
|
+
},
|
|
8889
|
+
create(base) {
|
|
8890
|
+
return ValidatorBond.fromPartial(base ?? {});
|
|
8891
|
+
},
|
|
8892
|
+
fromPartial(object) {
|
|
8893
|
+
const message = createBaseValidatorBond();
|
|
8894
|
+
message.validator = object.validator ?? "";
|
|
8895
|
+
message.bondedUsdc = (object.bondedUsdc !== undefined && object.bondedUsdc !== null)
|
|
8896
|
+
? Long.fromValue(object.bondedUsdc)
|
|
8897
|
+
: Long.UZERO;
|
|
8898
|
+
return message;
|
|
8899
|
+
},
|
|
8900
|
+
};
|
|
8813
8901
|
function bytesFromBase64$E(b64) {
|
|
8814
8902
|
if (globalThis.Buffer) {
|
|
8815
8903
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
@@ -56104,6 +56192,12 @@ var PlayerStatus;
|
|
|
56104
56192
|
// post the big blind via the normal ante flow. (#2139)
|
|
56105
56193
|
PlayerStatus["WAITING_FOR_BIG_BLIND"] = "waiting-for-big-blind";
|
|
56106
56194
|
PlayerStatus["SHOWING"] = "showing";
|
|
56195
|
+
// A player who declined to show a losing hand at showdown. Distinct from
|
|
56196
|
+
// FOLDED (folded during a betting round) so the UI/logs can tell them apart;
|
|
56197
|
+
// excluded from hand evaluation exactly like folded. The engine keeps the
|
|
56198
|
+
// internal status FOLDED and surfaces MUCKED only in the serialized DTO
|
|
56199
|
+
// (poker-vm#2140).
|
|
56200
|
+
PlayerStatus["MUCKED"] = "mucked";
|
|
56107
56201
|
})(PlayerStatus || (PlayerStatus = {}));
|
|
56108
56202
|
const SIT_IN_METHOD_NEXT_BB = "next-bb";
|
|
56109
56203
|
const SIT_IN_METHOD_POST_NOW = "post-now";
|
|
@@ -61178,6 +61272,8 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
61178
61272
|
// SNG/Tournament configuration
|
|
61179
61273
|
startingStack: sngConfig ? Long.fromString(sngConfig.startingStack.toString(), true) : Long.UZERO,
|
|
61180
61274
|
blindLevelDuration: sngConfig?.blindLevelDuration ?? 0,
|
|
61275
|
+
// SNG flat entry fee (micro-units), skimmed to the creator at join time (poker-vm#2118)
|
|
61276
|
+
entryFee: sngConfig?.entryFee ? Long.fromString(sngConfig.entryFee.toString(), true) : Long.UZERO,
|
|
61181
61277
|
});
|
|
61182
61278
|
// Create the transaction message
|
|
61183
61279
|
const msg = {
|
|
@@ -61205,7 +61301,8 @@ class SigningCosmosClient extends CosmosClient {
|
|
|
61205
61301
|
}),
|
|
61206
61302
|
...(sngConfig && {
|
|
61207
61303
|
startingStack: sngConfig.startingStack.toString(),
|
|
61208
|
-
blindLevelDuration: sngConfig.blindLevelDuration
|
|
61304
|
+
blindLevelDuration: sngConfig.blindLevelDuration,
|
|
61305
|
+
entryFee: sngConfig.entryFee?.toString() ?? "0"
|
|
61209
61306
|
})
|
|
61210
61307
|
});
|
|
61211
61308
|
try {
|
|
@@ -62112,5 +62209,5 @@ const registry = new Registry([
|
|
|
62112
62209
|
...msgTypes,
|
|
62113
62210
|
]);
|
|
62114
62211
|
|
|
62115
|
-
export { AllPlayerActions, BLOCK52_HD_PATH, Board, COSMOS_CONSTANTS, Client, CosmosClient, Deck, GameFormat, GameStatus, GameVariant, HandType, KEYS, MissingWalletError, NonPlayerActionType, Params$c as Params, PlayerActionType, PlayerStatus, PokerGameIntegration, PokerSolver, RPCMethods, SIT_IN_METHOD_NEXT_BB, SIT_IN_METHOD_POST_NOW, SIT_OUT_METHOD_NEXT_BB, SIT_OUT_METHOD_NEXT_HAND, SUIT, SigningCosmosClient, TexasHoldemRound, WithdrawalRequest, createSigningClientFromMnemonic, createWalletFromMnemonic, formatGameFormatDisplay, formatGameVariantDisplay, generateWallet, getActionByType, getAddressFromMnemonic, getDefaultCosmosConfig, getGameFormat, getGameFormatForCosmos, getGameFormatFromObject, getGameVariant, hasAction, isCashFormat, isEmptyAddress, isSitAndGoFormat, isTournamentFormat, isValidMnemonic, isValidPlayerAddress, parseGameFormat, parseGameVariant, registry };
|
|
62212
|
+
export { AllPlayerActions, BLOCK52_HD_PATH, Board, COSMOS_CONSTANTS, Client, CosmosClient, Deck, GameFormat, GameStatus, GameVariant, HandType, KEYS, MissingWalletError, NonPlayerActionType, Params$c as Params, PlayerActionType, PlayerStatus, PokerGameIntegration, PokerSolver, RPCMethods, SIT_IN_METHOD_NEXT_BB, SIT_IN_METHOD_POST_NOW, SIT_OUT_METHOD_NEXT_BB, SIT_OUT_METHOD_NEXT_HAND, SUIT, SigningCosmosClient, TexasHoldemRound, ValidatorBond, WithdrawalRequest, createSigningClientFromMnemonic, createWalletFromMnemonic, formatGameFormatDisplay, formatGameVariantDisplay, generateWallet, getActionByType, getAddressFromMnemonic, getDefaultCosmosConfig, getGameFormat, getGameFormatForCosmos, getGameFormatFromObject, getGameVariant, hasAction, isCashFormat, isEmptyAddress, isSitAndGoFormat, isTournamentFormat, isValidMnemonic, isValidPlayerAddress, parseGameFormat, parseGameVariant, registry };
|
|
62116
62213
|
//# sourceMappingURL=index.esm.js.map
|