@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.js CHANGED
@@ -2845,6 +2845,7 @@ function createBaseMsgCreateGame() {
2845
2845
  startingStack: Long.UZERO,
2846
2846
  blindLevelDuration: 0,
2847
2847
  gameVariant: "",
2848
+ entryFee: Long.UZERO,
2848
2849
  };
2849
2850
  }
2850
2851
  const MsgCreateGame = {
@@ -2897,6 +2898,9 @@ const MsgCreateGame = {
2897
2898
  if (message.gameVariant !== "") {
2898
2899
  writer.uint32(130).string(message.gameVariant);
2899
2900
  }
2901
+ if (!message.entryFee.equals(Long.UZERO)) {
2902
+ writer.uint32(136).uint64(message.entryFee.toString());
2903
+ }
2900
2904
  return writer;
2901
2905
  },
2902
2906
  decode(input, length) {
@@ -3018,6 +3022,13 @@ const MsgCreateGame = {
3018
3022
  message.gameVariant = reader.string();
3019
3023
  continue;
3020
3024
  }
3025
+ case 17: {
3026
+ if (tag !== 136) {
3027
+ break;
3028
+ }
3029
+ message.entryFee = Long.fromString(reader.uint64().toString(), true);
3030
+ continue;
3031
+ }
3021
3032
  }
3022
3033
  if ((tag & 7) === 4 || tag === 0) {
3023
3034
  break;
@@ -3044,6 +3055,7 @@ const MsgCreateGame = {
3044
3055
  startingStack: isSet$2b(object.startingStack) ? Long.fromValue(object.startingStack) : Long.UZERO,
3045
3056
  blindLevelDuration: isSet$2b(object.blindLevelDuration) ? globalThis.Number(object.blindLevelDuration) : 0,
3046
3057
  gameVariant: isSet$2b(object.gameVariant) ? globalThis.String(object.gameVariant) : "",
3058
+ entryFee: isSet$2b(object.entryFee) ? Long.fromValue(object.entryFee) : Long.UZERO,
3047
3059
  };
3048
3060
  },
3049
3061
  toJSON(message) {
@@ -3096,6 +3108,9 @@ const MsgCreateGame = {
3096
3108
  if (message.gameVariant !== "") {
3097
3109
  obj.gameVariant = message.gameVariant;
3098
3110
  }
3111
+ if (!message.entryFee.equals(Long.UZERO)) {
3112
+ obj.entryFee = (message.entryFee || Long.UZERO).toString();
3113
+ }
3099
3114
  return obj;
3100
3115
  },
3101
3116
  create(base) {
@@ -3139,6 +3154,9 @@ const MsgCreateGame = {
3139
3154
  : Long.UZERO;
3140
3155
  message.blindLevelDuration = object.blindLevelDuration ?? 0;
3141
3156
  message.gameVariant = object.gameVariant ?? "";
3157
+ message.entryFee = (object.entryFee !== undefined && object.entryFee !== null)
3158
+ ? Long.fromValue(object.entryFee)
3159
+ : Long.UZERO;
3142
3160
  return message;
3143
3161
  },
3144
3162
  };
@@ -8812,6 +8830,76 @@ const WithdrawalRequest = {
8812
8830
  return message;
8813
8831
  },
8814
8832
  };
8833
+ function createBaseValidatorBond() {
8834
+ return { validator: "", bondedUsdc: Long.UZERO };
8835
+ }
8836
+ const ValidatorBond = {
8837
+ encode(message, writer = new BinaryWriter()) {
8838
+ if (message.validator !== "") {
8839
+ writer.uint32(10).string(message.validator);
8840
+ }
8841
+ if (!message.bondedUsdc.equals(Long.UZERO)) {
8842
+ writer.uint32(16).uint64(message.bondedUsdc.toString());
8843
+ }
8844
+ return writer;
8845
+ },
8846
+ decode(input, length) {
8847
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8848
+ const end = length === undefined ? reader.len : reader.pos + length;
8849
+ const message = createBaseValidatorBond();
8850
+ while (reader.pos < end) {
8851
+ const tag = reader.uint32();
8852
+ switch (tag >>> 3) {
8853
+ case 1: {
8854
+ if (tag !== 10) {
8855
+ break;
8856
+ }
8857
+ message.validator = reader.string();
8858
+ continue;
8859
+ }
8860
+ case 2: {
8861
+ if (tag !== 16) {
8862
+ break;
8863
+ }
8864
+ message.bondedUsdc = Long.fromString(reader.uint64().toString(), true);
8865
+ continue;
8866
+ }
8867
+ }
8868
+ if ((tag & 7) === 4 || tag === 0) {
8869
+ break;
8870
+ }
8871
+ reader.skip(tag & 7);
8872
+ }
8873
+ return message;
8874
+ },
8875
+ fromJSON(object) {
8876
+ return {
8877
+ validator: isSet$2a(object.validator) ? globalThis.String(object.validator) : "",
8878
+ bondedUsdc: isSet$2a(object.bondedUsdc) ? Long.fromValue(object.bondedUsdc) : Long.UZERO,
8879
+ };
8880
+ },
8881
+ toJSON(message) {
8882
+ const obj = {};
8883
+ if (message.validator !== "") {
8884
+ obj.validator = message.validator;
8885
+ }
8886
+ if (!message.bondedUsdc.equals(Long.UZERO)) {
8887
+ obj.bondedUsdc = (message.bondedUsdc || Long.UZERO).toString();
8888
+ }
8889
+ return obj;
8890
+ },
8891
+ create(base) {
8892
+ return ValidatorBond.fromPartial(base ?? {});
8893
+ },
8894
+ fromPartial(object) {
8895
+ const message = createBaseValidatorBond();
8896
+ message.validator = object.validator ?? "";
8897
+ message.bondedUsdc = (object.bondedUsdc !== undefined && object.bondedUsdc !== null)
8898
+ ? Long.fromValue(object.bondedUsdc)
8899
+ : Long.UZERO;
8900
+ return message;
8901
+ },
8902
+ };
8815
8903
  function bytesFromBase64$E(b64) {
8816
8904
  if (globalThis.Buffer) {
8817
8905
  return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
@@ -56106,6 +56194,12 @@ exports.PlayerStatus = void 0;
56106
56194
  // post the big blind via the normal ante flow. (#2139)
56107
56195
  PlayerStatus["WAITING_FOR_BIG_BLIND"] = "waiting-for-big-blind";
56108
56196
  PlayerStatus["SHOWING"] = "showing";
56197
+ // A player who declined to show a losing hand at showdown. Distinct from
56198
+ // FOLDED (folded during a betting round) so the UI/logs can tell them apart;
56199
+ // excluded from hand evaluation exactly like folded. The engine keeps the
56200
+ // internal status FOLDED and surfaces MUCKED only in the serialized DTO
56201
+ // (poker-vm#2140).
56202
+ PlayerStatus["MUCKED"] = "mucked";
56109
56203
  })(exports.PlayerStatus || (exports.PlayerStatus = {}));
56110
56204
  const SIT_IN_METHOD_NEXT_BB = "next-bb";
56111
56205
  const SIT_IN_METHOD_POST_NOW = "post-now";
@@ -61180,6 +61274,8 @@ class SigningCosmosClient extends CosmosClient {
61180
61274
  // SNG/Tournament configuration
61181
61275
  startingStack: sngConfig ? Long.fromString(sngConfig.startingStack.toString(), true) : Long.UZERO,
61182
61276
  blindLevelDuration: sngConfig?.blindLevelDuration ?? 0,
61277
+ // SNG flat entry fee (micro-units), skimmed to the creator at join time (poker-vm#2118)
61278
+ entryFee: sngConfig?.entryFee ? Long.fromString(sngConfig.entryFee.toString(), true) : Long.UZERO,
61183
61279
  });
61184
61280
  // Create the transaction message
61185
61281
  const msg = {
@@ -61207,7 +61303,8 @@ class SigningCosmosClient extends CosmosClient {
61207
61303
  }),
61208
61304
  ...(sngConfig && {
61209
61305
  startingStack: sngConfig.startingStack.toString(),
61210
- blindLevelDuration: sngConfig.blindLevelDuration
61306
+ blindLevelDuration: sngConfig.blindLevelDuration,
61307
+ entryFee: sngConfig.entryFee?.toString() ?? "0"
61211
61308
  })
61212
61309
  });
61213
61310
  try {
@@ -62131,6 +62228,7 @@ exports.SIT_IN_METHOD_POST_NOW = SIT_IN_METHOD_POST_NOW;
62131
62228
  exports.SIT_OUT_METHOD_NEXT_BB = SIT_OUT_METHOD_NEXT_BB;
62132
62229
  exports.SIT_OUT_METHOD_NEXT_HAND = SIT_OUT_METHOD_NEXT_HAND;
62133
62230
  exports.SigningCosmosClient = SigningCosmosClient;
62231
+ exports.ValidatorBond = ValidatorBond;
62134
62232
  exports.WithdrawalRequest = WithdrawalRequest;
62135
62233
  exports.createSigningClientFromMnemonic = createSigningClientFromMnemonic;
62136
62234
  exports.createWalletFromMnemonic = createWalletFromMnemonic;