@rolly-dev/witness-core 1.4.0 → 2.0.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
|
@@ -181,6 +181,13 @@ export interface ProcessTxResult {
|
|
|
181
181
|
* key-registration signature must carry.
|
|
182
182
|
*/
|
|
183
183
|
newAccountNonce: string
|
|
184
|
+
/**
|
|
185
|
+
* Post-tx provider allowance (62-bit, decimal): the remaining cap on
|
|
186
|
+
* operator-authorized provider bets. `amount` after a
|
|
187
|
+
* `set_provider_allowance` (tx 13), decremented by a provider `bet` (2),
|
|
188
|
+
* unchanged otherwise (a provider `win` does NOT restore it).
|
|
189
|
+
*/
|
|
190
|
+
newProviderAllowance: string
|
|
184
191
|
winAmount: string
|
|
185
192
|
random?: string
|
|
186
193
|
nextSeedHash?: string
|
|
@@ -329,6 +336,17 @@ export declare class MerkleEngine {
|
|
|
329
336
|
* withdrawal signed against it stays valid while the user keeps playing.
|
|
330
337
|
*/
|
|
331
338
|
getAccountNonce(userId: number): bigint
|
|
339
|
+
/**
|
|
340
|
+
* Provider allowance committed in the leaf (62-bit): the remaining amount
|
|
341
|
+
* game providers may debit through operator-authorized provider bets
|
|
342
|
+
* (tx 2). Set by the owner-signed `set_provider_allowance` (tx 13),
|
|
343
|
+
* decremented by each provider bet, never restored by a provider win. `0`
|
|
344
|
+
* for accounts that never granted one — every provider bet against such an
|
|
345
|
+
* account is rejected with `ProviderAllowanceExceeded`. The backend serves
|
|
346
|
+
* this to the client and clamps the provider `balance` callback to
|
|
347
|
+
* `min(balance, allowance)`.
|
|
348
|
+
*/
|
|
349
|
+
getProviderAllowance(userId: number): bigint
|
|
332
350
|
/** Spendable balance minus all frozen buckets (withdrawal + game locks). */
|
|
333
351
|
getAvailable(userId: number): bigint
|
|
334
352
|
getSeedHash(userId: number): Buffer
|
|
@@ -385,8 +403,8 @@ export declare class MerkleEngine {
|
|
|
385
403
|
hasInitSeedReservation(userId: number): boolean
|
|
386
404
|
/**
|
|
387
405
|
* Open a crash-round auth lock for `user_id`: while set, `process_tx`
|
|
388
|
-
* rejects a game-lane tx (`in_house_bet`) or a
|
|
389
|
-
* (`key_register`) with `CrashRoundOpen`, so the account's pre-signed
|
|
406
|
+
* rejects a game-lane tx (`in_house_bet`, `set_provider_allowance`) or a
|
|
407
|
+
* key rotation (`key_register`) with `CrashRoundOpen`, so the account's pre-signed
|
|
390
408
|
* `crash_settle` auto-cashout keeps its bound game-lane nonce and signing
|
|
391
409
|
* key. Account-lane withdrawal / transfer are NOT blocked — they move a
|
|
392
410
|
* counter the cashout never signed. Called by the crash game when a bet is
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|