@rolly-dev/witness-core 0.2.1 → 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
|
Binary file
|
|
Binary file
|