@rolly-dev/wasm-signer 1.13.0 → 1.14.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.
@@ -12,6 +12,16 @@
12
12
  */
13
13
  export function amount_split(amount: bigint): Uint32Array;
14
14
 
15
+ /**
16
+ * CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
17
+ */
18
+ export function coinflip_multiplier_x10000(): number;
19
+
20
+ /**
21
+ * CoinFlip RTP percent (99). Canonical source for backend/frontend.
22
+ */
23
+ export function coinflip_rtp_percent(): number;
24
+
15
25
  /**
16
26
  * Compute address_hash = Poseidon2(addr_byte_0, ..., addr_byte_19).
17
27
  * Takes a hex address string (with or without 0x prefix), returns [u64; 4].
@@ -193,6 +203,11 @@ export function compute_user_seed_binding(game_id: number, bet: bigint, pred_has
193
203
  */
194
204
  export function derive_session_key(sig_bytes: Uint8Array): BigUint64Array;
195
205
 
206
+ /**
207
+ * Dice RTP percent (99). Canonical source for backend/frontend.
208
+ */
209
+ export function dice_rtp_percent(): number;
210
+
196
211
  /**
197
212
  * Generate a cryptographically random user secret — 4 Goldilocks field elements.
198
213
  *
@@ -261,6 +276,11 @@ export function goldilocks_reduce(value: bigint): bigint;
261
276
  */
262
277
  export function hash_balance_leaf(raw: BigUint64Array): BigUint64Array;
263
278
 
279
+ /**
280
+ * Limbo RTP percent (99). Canonical source for backend/frontend.
281
+ */
282
+ export function limbo_rtp_percent(): number;
283
+
264
284
  /**
265
285
  * Build a main Merkle tree leaf from balance_hash, pk_hash, and address_hash.
266
286
  *
@@ -26,6 +26,26 @@ function amount_split(amount) {
26
26
  }
27
27
  exports.amount_split = amount_split;
28
28
 
29
+ /**
30
+ * CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
31
+ * @returns {number}
32
+ */
33
+ function coinflip_multiplier_x10000() {
34
+ const ret = wasm.coinflip_multiplier_x10000();
35
+ return ret >>> 0;
36
+ }
37
+ exports.coinflip_multiplier_x10000 = coinflip_multiplier_x10000;
38
+
39
+ /**
40
+ * CoinFlip RTP percent (99). Canonical source for backend/frontend.
41
+ * @returns {number}
42
+ */
43
+ function coinflip_rtp_percent() {
44
+ const ret = wasm.coinflip_rtp_percent();
45
+ return ret >>> 0;
46
+ }
47
+ exports.coinflip_rtp_percent = coinflip_rtp_percent;
48
+
29
49
  /**
30
50
  * Compute address_hash = Poseidon2(addr_byte_0, ..., addr_byte_19).
31
51
  * Takes a hex address string (with or without 0x prefix), returns [u64; 4].
@@ -476,6 +496,16 @@ function derive_session_key(sig_bytes) {
476
496
  }
477
497
  exports.derive_session_key = derive_session_key;
478
498
 
499
+ /**
500
+ * Dice RTP percent (99). Canonical source for backend/frontend.
501
+ * @returns {number}
502
+ */
503
+ function dice_rtp_percent() {
504
+ const ret = wasm.coinflip_rtp_percent();
505
+ return ret >>> 0;
506
+ }
507
+ exports.dice_rtp_percent = dice_rtp_percent;
508
+
479
509
  /**
480
510
  * Generate a cryptographically random user secret — 4 Goldilocks field elements.
481
511
  *
@@ -623,6 +653,16 @@ function hash_balance_leaf(raw) {
623
653
  }
624
654
  exports.hash_balance_leaf = hash_balance_leaf;
625
655
 
656
+ /**
657
+ * Limbo RTP percent (99). Canonical source for backend/frontend.
658
+ * @returns {number}
659
+ */
660
+ function limbo_rtp_percent() {
661
+ const ret = wasm.coinflip_rtp_percent();
662
+ return ret >>> 0;
663
+ }
664
+ exports.limbo_rtp_percent = limbo_rtp_percent;
665
+
626
666
  /**
627
667
  * Build a main Merkle tree leaf from balance_hash, pk_hash, and address_hash.
628
668
  *
Binary file
@@ -2,6 +2,8 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const amount_split: (a: number, b: bigint) => void;
5
+ export const coinflip_multiplier_x10000: () => number;
6
+ export const coinflip_rtp_percent: () => number;
5
7
  export const compute_address_hash: (a: number, b: number, c: number) => void;
6
8
  export const compute_drawn_keno: (a: number, b: number, c: number) => void;
7
9
  export const compute_multi_dice: (a: number) => bigint;
@@ -31,6 +33,8 @@ export const seed_hash_truncated: (a: number, b: number, c: number) => void;
31
33
  export const session_public_key: (a: number, b: number, c: number, d: bigint) => void;
32
34
  export const string_to_user_seed: (a: number, b: number, c: number) => void;
33
35
  export const string_to_user_seed_hex: (a: number, b: number, c: number) => void;
36
+ export const dice_rtp_percent: () => number;
37
+ export const limbo_rtp_percent: () => number;
34
38
  export const goldilocks_modulus: () => bigint;
35
39
  export const __wbindgen_export: (a: number) => void;
36
40
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
@@ -12,6 +12,16 @@
12
12
  */
13
13
  export function amount_split(amount: bigint): Uint32Array;
14
14
 
15
+ /**
16
+ * CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
17
+ */
18
+ export function coinflip_multiplier_x10000(): number;
19
+
20
+ /**
21
+ * CoinFlip RTP percent (99). Canonical source for backend/frontend.
22
+ */
23
+ export function coinflip_rtp_percent(): number;
24
+
15
25
  /**
16
26
  * Compute address_hash = Poseidon2(addr_byte_0, ..., addr_byte_19).
17
27
  * Takes a hex address string (with or without 0x prefix), returns [u64; 4].
@@ -193,6 +203,11 @@ export function compute_user_seed_binding(game_id: number, bet: bigint, pred_has
193
203
  */
194
204
  export function derive_session_key(sig_bytes: Uint8Array): BigUint64Array;
195
205
 
206
+ /**
207
+ * Dice RTP percent (99). Canonical source for backend/frontend.
208
+ */
209
+ export function dice_rtp_percent(): number;
210
+
196
211
  /**
197
212
  * Generate a cryptographically random user secret — 4 Goldilocks field elements.
198
213
  *
@@ -261,6 +276,11 @@ export function goldilocks_reduce(value: bigint): bigint;
261
276
  */
262
277
  export function hash_balance_leaf(raw: BigUint64Array): BigUint64Array;
263
278
 
279
+ /**
280
+ * Limbo RTP percent (99). Canonical source for backend/frontend.
281
+ */
282
+ export function limbo_rtp_percent(): number;
283
+
264
284
  /**
265
285
  * Build a main Merkle tree leaf from balance_hash, pk_hash, and address_hash.
266
286
  *