@rolly-dev/witness-core 0.3.0 → 0.3.1

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/index.d.ts CHANGED
@@ -288,6 +288,23 @@ export declare class MerkleEngine {
288
288
  * all-zero 64-byte buffer when the user has no initialized seed yet.
289
289
  */
290
290
  getServerSeed(userId: number): Buffer
291
+ /**
292
+ * Pin `user_id`'s server seed for an open off-chain blackjack round. While
293
+ * reserved, any OTHER user-seed `in_house_bet` (dice/limbo/keno/plinko/
294
+ * coinflip) is rejected with `SeedReserved`; the blackjack settle IHB (and
295
+ * only it) is allowed through and clears the reservation. Crash is
296
+ * unaffected — it draws from the house account seed, not the user's.
297
+ * A HARD pin with no expiry: only the settle or `release_seed` lifts it.
298
+ * NON-consensus.
299
+ */
300
+ reserveSeed(userId: number): void
301
+ /**
302
+ * Release a seed reservation (blackjack round settled or rolled back).
303
+ * No-op when the user has none.
304
+ */
305
+ releaseSeed(userId: number): void
306
+ /** Whether `user_id` currently holds a live (non-expired) seed reservation. */
307
+ isSeedReserved(userId: number): boolean
291
308
  getPkHash(userId: number): Buffer
292
309
  getAddressHash(userId: number): Buffer
293
310
  getLockedTotal(userId: number): bigint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolly-dev/witness-core",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Authoritative native witness-state engine for Rolly ZK-Rollup (Node-API addon)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
Binary file
Binary file