@rolly-dev/witness-core 1.0.1 → 1.1.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/index.d.ts CHANGED
@@ -47,6 +47,19 @@ export interface FlushResult {
47
47
  deltasJson: string
48
48
  addressRecordsJson: string
49
49
  pkHashRecordsJson: string
50
+ /**
51
+ * Per-block signed transactions (`SchnorrProveEntry[]` JSON) in slot order,
52
+ * decoded from each authenticated slot's opaque `signature` blob. `"[]"`
53
+ * when the block has no signed txs. Node stores it on the pipeline block
54
+ * doc as `signed_entries`; the auth-orchestrator batches it into the
55
+ * Schnorr side-circuit.
56
+ */
57
+ signedEntriesJson: string
58
+ /**
59
+ * Per-block `key_register` transactions (`RegistrationProveEntry[]` JSON) in
60
+ * slot order. `"[]"` when none. Stored as `registration_entries`.
61
+ */
62
+ registrationEntriesJson: string
50
63
  }
51
64
  /**
52
65
  * Result of [`MerkleEngine::verify_root`], surfaced to Node for the post-load
@@ -317,6 +330,29 @@ export declare class MerkleEngine {
317
330
  releaseSeed(userId: number): void
318
331
  /** Whether `user_id` currently holds a live (non-expired) seed reservation. */
319
332
  isSeedReserved(userId: number): boolean
333
+ /**
334
+ * Key-registration handshake: reserve the account's initial server seed for
335
+ * a first-time `key_register` and return its truncated 3-limb hash
336
+ * (`init_seed_hash`, 24 little-endian bytes). The client folds this hash
337
+ * into the EIP-712 KeyRegistration payload it signs; `process_key_register`
338
+ * then installs THIS reserved seed so the leaf's `new_seed` hash matches
339
+ * the signed value the RegistrationBatch side-circuit's `reg_elem` verifies
340
+ * (drawing a fresh seed here would desync the two). Idempotent: repeated
341
+ * calls before the registration lands return the SAME reserved seed hash,
342
+ * so a client re-fetching the handshake keeps signing a consistent value.
343
+ * Draws a fresh seed only on the first call for the account. NON-consensus.
344
+ */
345
+ reserveInitSeed(userId: number): Buffer
346
+ /**
347
+ * Drop a first-registration seed reservation without registering (the
348
+ * handshake was abandoned). No-op when the user has none. NON-consensus.
349
+ */
350
+ releaseInitSeed(userId: number): void
351
+ /**
352
+ * Whether `user_id` currently holds a reserved (not-yet-installed) initial
353
+ * registration seed.
354
+ */
355
+ hasInitSeedReservation(userId: number): boolean
320
356
  /**
321
357
  * Open a crash-round auth lock for `user_id`: while set, `process_tx`
322
358
  * rejects any nonce-bumping tx (`in_house_bet` / `withdrawal` / `transfer`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolly-dev/witness-core",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
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