@block52/poker-vm-sdk 1.19.0 → 1.22.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.js CHANGED
@@ -2851,6 +2851,7 @@ function createBaseMsgCreateGame() {
2851
2851
  startTime: Long.ZERO,
2852
2852
  blindStructure: "",
2853
2853
  lateRegistrationLevels: 0,
2854
+ waitForStartTime: false,
2854
2855
  };
2855
2856
  }
2856
2857
  const MsgCreateGame = {
@@ -2921,6 +2922,9 @@ const MsgCreateGame = {
2921
2922
  if (message.lateRegistrationLevels !== 0) {
2922
2923
  writer.uint32(184).uint32(message.lateRegistrationLevels);
2923
2924
  }
2925
+ if (message.waitForStartTime !== false) {
2926
+ writer.uint32(192).bool(message.waitForStartTime);
2927
+ }
2924
2928
  return writer;
2925
2929
  },
2926
2930
  decode(input, length) {
@@ -3084,6 +3088,13 @@ const MsgCreateGame = {
3084
3088
  message.lateRegistrationLevels = reader.uint32();
3085
3089
  continue;
3086
3090
  }
3091
+ case 24: {
3092
+ if (tag !== 192) {
3093
+ break;
3094
+ }
3095
+ message.waitForStartTime = reader.bool();
3096
+ continue;
3097
+ }
3087
3098
  }
3088
3099
  if ((tag & 7) === 4 || tag === 0) {
3089
3100
  break;
@@ -3116,6 +3127,7 @@ const MsgCreateGame = {
3116
3127
  startTime: isSet$2b(object.startTime) ? Long.fromValue(object.startTime) : Long.ZERO,
3117
3128
  blindStructure: isSet$2b(object.blindStructure) ? globalThis.String(object.blindStructure) : "",
3118
3129
  lateRegistrationLevels: isSet$2b(object.lateRegistrationLevels) ? globalThis.Number(object.lateRegistrationLevels) : 0,
3130
+ waitForStartTime: isSet$2b(object.waitForStartTime) ? globalThis.Boolean(object.waitForStartTime) : false,
3119
3131
  };
3120
3132
  },
3121
3133
  toJSON(message) {
@@ -3186,6 +3198,9 @@ const MsgCreateGame = {
3186
3198
  if (message.lateRegistrationLevels !== 0) {
3187
3199
  obj.lateRegistrationLevels = Math.round(message.lateRegistrationLevels);
3188
3200
  }
3201
+ if (message.waitForStartTime !== false) {
3202
+ obj.waitForStartTime = message.waitForStartTime;
3203
+ }
3189
3204
  return obj;
3190
3205
  },
3191
3206
  create(base) {
@@ -3236,6 +3251,7 @@ const MsgCreateGame = {
3236
3251
  : Long.ZERO;
3237
3252
  message.blindStructure = object.blindStructure ?? "";
3238
3253
  message.lateRegistrationLevels = object.lateRegistrationLevels ?? 0;
3254
+ message.waitForStartTime = object.waitForStartTime ?? false;
3239
3255
  message.entryFee = (object.entryFee !== undefined && object.entryFee !== null)
3240
3256
  ? Long.fromValue(object.entryFee)
3241
3257
  : Long.UZERO;
@@ -71862,6 +71878,9 @@ function assertCreatableSngField(minPlayers, maxPlayers, sngConfig, nowSeconds =
71862
71878
  throw new Error("sngConfig.lateRegistrationLevels needs sngConfig.startTime (late registration is for a scheduled sit-and-go).");
71863
71879
  }
71864
71880
  }
71881
+ if (sngConfig?.waitForStartTime && !startTime) {
71882
+ throw new Error("sngConfig.waitForStartTime needs sngConfig.startTime (it holds a scheduled sit-and-go until its start time).");
71883
+ }
71865
71884
  }
71866
71885
  /**
71867
71886
  * Signing Cosmos Client that extends the read-only CosmosClient with transaction capabilities
@@ -72040,6 +72059,9 @@ class SigningCosmosClient extends CosmosClient {
72040
72059
  // an empty proto3 string is not encoded at all.
72041
72060
  blindStructure: sngConfig?.blindStructure ? JSON.stringify(sngConfig.blindStructure) : "",
72042
72061
  lateRegistrationLevels: sngConfig?.lateRegistrationLevels ?? 0,
72062
+ // Hold a full table until the start time (poker-vm#2760). false is
72063
+ // not encoded, so chains without the field accept the message.
72064
+ waitForStartTime: sngConfig?.waitForStartTime ?? false,
72043
72065
  });
72044
72066
  // Create the transaction message
72045
72067
  const msg = {
@@ -72071,7 +72093,8 @@ class SigningCosmosClient extends CosmosClient {
72071
72093
  blindLevelDuration: sngConfig.blindLevelDuration,
72072
72094
  entryFee: sngConfig.entryFee?.toString() ?? "0",
72073
72095
  ...(sngConfig.blindStructure && { blindStructure: sngConfig.blindStructure }),
72074
- ...(sngConfig.lateRegistrationLevels && { lateRegistrationLevels: sngConfig.lateRegistrationLevels })
72096
+ ...(sngConfig.lateRegistrationLevels && { lateRegistrationLevels: sngConfig.lateRegistrationLevels }),
72097
+ ...(sngConfig.waitForStartTime && { waitForStartTime: true })
72075
72098
  })
72076
72099
  });
72077
72100
  try {