@rolly-dev/witness-core 0.2.0 → 0.2.2

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
@@ -233,6 +233,21 @@ export declare class MerkleEngine {
233
233
  * marked dirty — the loaded value already matches the store.
234
234
  */
235
235
  loadServerSeed(userId: number, seed: Buffer): void
236
+ /**
237
+ * Recovery-only: enqueue the next server seeds `next_server_seed` returns
238
+ * (FIFO) instead of drawing from the CSPRNG. Lets the offline block
239
+ * reconstruction tool deterministically replay already-committed blocks
240
+ * from their recorded next-seed chain. No effect on normal operation — the
241
+ * queue is empty unless this is called. Each buffer is 64 LE bytes (8 limbs).
242
+ */
243
+ forceNextSeeds(seeds: Array<Buffer>): void
244
+ /**
245
+ * Recovery-only: recompute one user's leaf hash from its loaded raw balance
246
+ * leaf + pk / address hashes. Call after overwriting those via the `load_*`
247
+ * setters to an earlier state, then `rebuild_nodes_from_leaves`, to roll a
248
+ * touched leaf back without re-running its txs.
249
+ */
250
+ recomputeLeaf(userId: number): void
236
251
  /**
237
252
  * Adopt the persisted block-meta root after the full tree is loaded. The
238
253
  * loaded leaves/nodes must reproduce it — verify with [`Self::verify_root`].
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolly-dev/witness-core",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
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",
@@ -27,8 +27,6 @@
27
27
  "build": "napi build --platform --release",
28
28
  "build:debug": "napi build --platform",
29
29
  "build:linux-x64": "napi build --platform --release --target x86_64-unknown-linux-gnu",
30
- "artifacts": "napi artifacts",
31
- "prepublishOnly": "napi prepublish -t npm",
32
30
  "test": "node test.js"
33
31
  },
34
32
  "devDependencies": {
@@ -41,9 +39,5 @@
41
39
  "witness",
42
40
  "merkle",
43
41
  "rolly"
44
- ],
45
- "optionalDependencies": {
46
- "@rolly-dev/witness-core-linux-x64-gnu": "0.2.0",
47
- "@rolly-dev/witness-core-darwin-arm64": "0.2.0"
48
- }
49
- }
42
+ ]
43
+ }
Binary file
Binary file