@rolly-dev/witness-core 1.0.0 → 1.0.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
|
@@ -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,44 @@ 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
|
|
356
|
+
/**
|
|
357
|
+
* Open a crash-round auth lock for `user_id`: while set, `process_tx`
|
|
358
|
+
* rejects any nonce-bumping tx (`in_house_bet` / `withdrawal` / `transfer`
|
|
359
|
+
* / `key_register`) with `CrashRoundOpen`, so the account's pre-signed
|
|
360
|
+
* `crash_settle` auto-cashout keeps its bound nonce. Called by the crash
|
|
361
|
+
* game when a bet is placed. NON-consensus; idempotent.
|
|
362
|
+
*/
|
|
363
|
+
lockCrashRound(userId: number): void
|
|
364
|
+
/**
|
|
365
|
+
* Release a crash-round auth lock (the round settled or was abandoned).
|
|
366
|
+
* No-op when the user has none.
|
|
367
|
+
*/
|
|
368
|
+
unlockCrashRound(userId: number): void
|
|
369
|
+
/** Whether `user_id` currently has an open crash-round auth lock. */
|
|
370
|
+
isCrashRoundLocked(userId: number): boolean
|
|
320
371
|
getPkHash(userId: number): Buffer
|
|
321
372
|
getAddressHash(userId: number): Buffer
|
|
322
373
|
getLockedTotal(userId: number): bigint
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|