@rolly-dev/wasm-signer 1.28.1 → 1.29.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.
@@ -3,13 +3,17 @@
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const amount_split: (a: number, b: bigint) => void;
5
5
  export const aviato_rtp_percent: () => number;
6
+ export const blackjack_deal_shoe: (a: number, b: number, c: number, d: number, e: number) => void;
7
+ export const blackjack_pack_actions: (a: number, b: number, c: number) => void;
6
8
  export const coinflip_multiplier_x10000: () => number;
7
9
  export const compute_address_hash: (a: number, b: number, c: number) => void;
8
10
  export const compute_aviato_point: (a: number, b: number) => number;
11
+ export const compute_crash_point: (a: number, b: number) => number;
9
12
  export const compute_drawn_keno: (a: number, b: number, c: number) => void;
10
13
  export const compute_multi_dice: (a: number) => bigint;
11
14
  export const compute_payout_aviato: (a: number, b: number, c: number, d: bigint, e: number) => void;
12
15
  export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
16
+ export const compute_payout_crash: (a: number, b: number, c: number, d: bigint, e: number) => void;
13
17
  export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
14
18
  export const compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
15
19
  export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
@@ -53,6 +57,7 @@ export const string_to_user_seed: (a: number, b: number, c: number) => void;
53
57
  export const string_to_user_seed_hex: (a: number, b: number, c: number) => void;
54
58
  export const validate_slot: (a: number, b: number) => void;
55
59
  export const coinflip_rtp_percent: () => number;
60
+ export const crash_rtp_percent: () => number;
56
61
  export const dice_rtp_percent: () => number;
57
62
  export const keno_max_picks: () => number;
58
63
  export const goldilocks_modulus: () => bigint;
@@ -13,10 +13,45 @@
13
13
  export function amount_split(amount: bigint): Uint32Array;
14
14
 
15
15
  /**
16
- * Aviato RTP percent (99). Canonical source for backend/frontend.
16
+ * Backward-compatible alias for `crash_rtp_percent`.
17
17
  */
18
18
  export function aviato_rtp_percent(): number;
19
19
 
20
+ /**
21
+ * Reconstruct the 30 dealt Blackjack rank codes from the fairness seeds.
22
+ *
23
+ * This is the SINGLE client/backend-side mirror of the native shoe unfold in
24
+ * `tx_validator::blackjack::unfold_shoe` and the in-circuit shuffle: it computes
25
+ * `mix = Poseidon2(server_seed ‖ user_secret_random)` and the per-step swap
26
+ * randomness `low32(Poseidon2(mix ‖ k))`, then defers the deterministic
27
+ * 30-swap partial Fisher–Yates over the fixed 416-card layout to the pure
28
+ * `rolly_game_core::blackjack::deal_shoe`. Mixing the player-chosen
29
+ * `user_secret_random` into the seed makes the shuffle a mutual commit–reveal,
30
+ * so neither the operator nor the player can pre-grind a shoe.
31
+ *
32
+ * `server_seed` must be 8 elements (the full fairness preimage); `user_secret_random`
33
+ * must be 4 elements (`string_to_user_seed(user_seed_source)`).
34
+ *
35
+ * **Output**: `Uint8Array` of length 30 — rank codes `0..=12` (Ace=0, 2..9=1..8,
36
+ * 10/J/Q/K=9..12). Suits are cosmetic and restored off-engine.
37
+ *
38
+ * ```js
39
+ * const shoe = blackjack_deal_shoe(serverSeed8, userSecret4); // length 30
40
+ * ```
41
+ */
42
+ export function blackjack_deal_shoe(server_seed: BigUint64Array, user_secret_random: BigUint64Array): Uint8Array;
43
+
44
+ /**
45
+ * Pack a Blackjack action sequence into the two base-8 halves the rollup records
46
+ * as `prediction_lo` / `prediction_hi` (`actions[0..10]` → lo, `actions[10..20]`
47
+ * → hi). Single-sources `rolly_game_core::blackjack::pack_actions` so the
48
+ * backend feeds the WitnessEngine exactly what the circuit re-derives.
49
+ *
50
+ * `actions` are the `ACTION_*` codes (1..=6). **Output**: `Uint32Array` of
51
+ * length 2 = `[prediction_lo, prediction_hi]`.
52
+ */
53
+ export function blackjack_pack_actions(actions: Uint8Array): Uint32Array;
54
+
20
55
  /**
21
56
  * CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
22
57
  */
@@ -34,12 +69,17 @@ export function coinflip_rtp_percent(): number;
34
69
  export function compute_address_hash(address_hex: string): BigUint64Array;
35
70
 
36
71
  /**
37
- * Extract aviato point (×100) from raw server seed fields.
72
+ * Backward-compatible alias for `compute_crash_point`.
73
+ */
74
+ export function compute_aviato_point(random: BigUint64Array): number;
75
+
76
+ /**
77
+ * Extract crash point (×100) from raw server seed fields.
38
78
  *
39
79
  * `random` must be exactly 4 elements (first 4 fields of server_seed).
40
- * Returns the clamped aviato multiplier ×100 (100..=1_000_000, i.e. 1.00x..10000.00x).
80
+ * Returns the clamped crash multiplier ×100 (100..=1_000_000, i.e. 1.00x..10000.00x).
41
81
  */
42
- export function compute_aviato_point(random: BigUint64Array): number;
82
+ export function compute_crash_point(random: BigUint64Array): number;
43
83
 
44
84
  /**
45
85
  * Extract the 10 drawn numbers from Poseidon2 random output using
@@ -59,15 +99,7 @@ export function compute_drawn_keno(random: BigUint64Array): Uint8Array;
59
99
  export function compute_multi_dice(win_numbers: number): bigint;
60
100
 
61
101
  /**
62
- * Full aviato payout computation — pure integer arithmetic, zero floats.
63
- *
64
- * `random`: 4 Goldilocks field elements (first 4 fields of raw server_seed).
65
- * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
66
- * `cashout_x100`: multiplier at which the user cashed out (×100).
67
- * - 0 = user did NOT cash out (loss).
68
- * - 100..=1_000_000 = user stopped at this multiplier.
69
- *
70
- * Returns `BigUint64Array[4]`: `[win_amount, aviato_x100, is_win (0|1), multiplier×10000]`.
102
+ * Backward-compatible alias for `compute_payout_crash`.
71
103
  */
72
104
  export function compute_payout_aviato(random: BigUint64Array, bet_atomic: bigint, cashout_x100: number): BigUint64Array;
73
105
 
@@ -82,6 +114,19 @@ export function compute_payout_aviato(random: BigUint64Array, bet_atomic: bigint
82
114
  */
83
115
  export function compute_payout_coinflip(random: BigUint64Array, bet_atomic: bigint, prediction: number): BigUint64Array;
84
116
 
117
+ /**
118
+ * Full crash payout computation — pure integer arithmetic, zero floats.
119
+ *
120
+ * `random`: 4 Goldilocks field elements (first 4 fields of raw server_seed).
121
+ * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
122
+ * `cashout_x100`: multiplier at which the user cashed out (×100).
123
+ * - 0 = user did NOT cash out (loss).
124
+ * - 100..=1_000_000 = user stopped at this multiplier.
125
+ *
126
+ * Returns `BigUint64Array[4]`: `[win_amount, crash_x100, is_win (0|1), multiplier×10000]`.
127
+ */
128
+ export function compute_payout_crash(random: BigUint64Array, bet_atomic: bigint, cashout_x100: number): BigUint64Array;
129
+
85
130
  /**
86
131
  * Full dice payout computation — pure integer arithmetic, zero floats.
87
132
  *
@@ -211,6 +256,11 @@ export function compute_server_seed_hash(server_seed: BigUint64Array): BigUint64
211
256
  */
212
257
  export function compute_user_seed_binding(game_id: number, bet: bigint, pred_hash: BigUint64Array, secret: BigUint64Array): BigUint64Array;
213
258
 
259
+ /**
260
+ * Crash RTP percent (99). Canonical source for backend/frontend.
261
+ */
262
+ export function crash_rtp_percent(): number;
263
+
214
264
  /**
215
265
  * Derive a session key from 32 bytes of entropy (e.g. MetaMask signature).
216
266
  *
@@ -492,13 +542,17 @@ export interface InitOutput {
492
542
  readonly memory: WebAssembly.Memory;
493
543
  readonly amount_split: (a: number, b: bigint) => void;
494
544
  readonly aviato_rtp_percent: () => number;
545
+ readonly blackjack_deal_shoe: (a: number, b: number, c: number, d: number, e: number) => void;
546
+ readonly blackjack_pack_actions: (a: number, b: number, c: number) => void;
495
547
  readonly coinflip_multiplier_x10000: () => number;
496
548
  readonly compute_address_hash: (a: number, b: number, c: number) => void;
497
549
  readonly compute_aviato_point: (a: number, b: number) => number;
550
+ readonly compute_crash_point: (a: number, b: number) => number;
498
551
  readonly compute_drawn_keno: (a: number, b: number, c: number) => void;
499
552
  readonly compute_multi_dice: (a: number) => bigint;
500
553
  readonly compute_payout_aviato: (a: number, b: number, c: number, d: bigint, e: number) => void;
501
554
  readonly compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
555
+ readonly compute_payout_crash: (a: number, b: number, c: number, d: bigint, e: number) => void;
502
556
  readonly compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
503
557
  readonly compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
504
558
  readonly compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
@@ -542,6 +596,7 @@ export interface InitOutput {
542
596
  readonly string_to_user_seed_hex: (a: number, b: number, c: number) => void;
543
597
  readonly validate_slot: (a: number, b: number) => void;
544
598
  readonly coinflip_rtp_percent: () => number;
599
+ readonly crash_rtp_percent: () => number;
545
600
  readonly dice_rtp_percent: () => number;
546
601
  readonly keno_max_picks: () => number;
547
602
  readonly goldilocks_modulus: () => bigint;
@@ -26,7 +26,7 @@ export function amount_split(amount) {
26
26
  }
27
27
 
28
28
  /**
29
- * Aviato RTP percent (99). Canonical source for backend/frontend.
29
+ * Backward-compatible alias for `crash_rtp_percent`.
30
30
  * @returns {number}
31
31
  */
32
32
  export function aviato_rtp_percent() {
@@ -34,6 +34,76 @@ export function aviato_rtp_percent() {
34
34
  return ret >>> 0;
35
35
  }
36
36
 
37
+ /**
38
+ * Reconstruct the 30 dealt Blackjack rank codes from the fairness seeds.
39
+ *
40
+ * This is the SINGLE client/backend-side mirror of the native shoe unfold in
41
+ * `tx_validator::blackjack::unfold_shoe` and the in-circuit shuffle: it computes
42
+ * `mix = Poseidon2(server_seed ‖ user_secret_random)` and the per-step swap
43
+ * randomness `low32(Poseidon2(mix ‖ k))`, then defers the deterministic
44
+ * 30-swap partial Fisher–Yates over the fixed 416-card layout to the pure
45
+ * `rolly_game_core::blackjack::deal_shoe`. Mixing the player-chosen
46
+ * `user_secret_random` into the seed makes the shuffle a mutual commit–reveal,
47
+ * so neither the operator nor the player can pre-grind a shoe.
48
+ *
49
+ * `server_seed` must be 8 elements (the full fairness preimage); `user_secret_random`
50
+ * must be 4 elements (`string_to_user_seed(user_seed_source)`).
51
+ *
52
+ * **Output**: `Uint8Array` of length 30 — rank codes `0..=12` (Ace=0, 2..9=1..8,
53
+ * 10/J/Q/K=9..12). Suits are cosmetic and restored off-engine.
54
+ *
55
+ * ```js
56
+ * const shoe = blackjack_deal_shoe(serverSeed8, userSecret4); // length 30
57
+ * ```
58
+ * @param {BigUint64Array} server_seed
59
+ * @param {BigUint64Array} user_secret_random
60
+ * @returns {Uint8Array}
61
+ */
62
+ export function blackjack_deal_shoe(server_seed, user_secret_random) {
63
+ try {
64
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
65
+ const ptr0 = passArray64ToWasm0(server_seed, wasm.__wbindgen_export);
66
+ const len0 = WASM_VECTOR_LEN;
67
+ const ptr1 = passArray64ToWasm0(user_secret_random, wasm.__wbindgen_export);
68
+ const len1 = WASM_VECTOR_LEN;
69
+ wasm.blackjack_deal_shoe(retptr, ptr0, len0, ptr1, len1);
70
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
71
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
72
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
73
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
74
+ return v3;
75
+ } finally {
76
+ wasm.__wbindgen_add_to_stack_pointer(16);
77
+ }
78
+ }
79
+
80
+ /**
81
+ * Pack a Blackjack action sequence into the two base-8 halves the rollup records
82
+ * as `prediction_lo` / `prediction_hi` (`actions[0..10]` → lo, `actions[10..20]`
83
+ * → hi). Single-sources `rolly_game_core::blackjack::pack_actions` so the
84
+ * backend feeds the WitnessEngine exactly what the circuit re-derives.
85
+ *
86
+ * `actions` are the `ACTION_*` codes (1..=6). **Output**: `Uint32Array` of
87
+ * length 2 = `[prediction_lo, prediction_hi]`.
88
+ * @param {Uint8Array} actions
89
+ * @returns {Uint32Array}
90
+ */
91
+ export function blackjack_pack_actions(actions) {
92
+ try {
93
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
94
+ const ptr0 = passArray8ToWasm0(actions, wasm.__wbindgen_export);
95
+ const len0 = WASM_VECTOR_LEN;
96
+ wasm.blackjack_pack_actions(retptr, ptr0, len0);
97
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
98
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
99
+ var v2 = getArrayU32FromWasm0(r0, r1).slice();
100
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
101
+ return v2;
102
+ } finally {
103
+ wasm.__wbindgen_add_to_stack_pointer(16);
104
+ }
105
+ }
106
+
37
107
  /**
38
108
  * CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
39
109
  * @returns {number}
@@ -75,10 +145,7 @@ export function compute_address_hash(address_hex) {
75
145
  }
76
146
 
77
147
  /**
78
- * Extract aviato point (×100) from raw server seed fields.
79
- *
80
- * `random` must be exactly 4 elements (first 4 fields of server_seed).
81
- * Returns the clamped aviato multiplier ×100 (100..=1_000_000, i.e. 1.00x..10000.00x).
148
+ * Backward-compatible alias for `compute_crash_point`.
82
149
  * @param {BigUint64Array} random
83
150
  * @returns {number}
84
151
  */
@@ -89,6 +156,21 @@ export function compute_aviato_point(random) {
89
156
  return ret >>> 0;
90
157
  }
91
158
 
159
+ /**
160
+ * Extract crash point (×100) from raw server seed fields.
161
+ *
162
+ * `random` must be exactly 4 elements (first 4 fields of server_seed).
163
+ * Returns the clamped crash multiplier ×100 (100..=1_000_000, i.e. 1.00x..10000.00x).
164
+ * @param {BigUint64Array} random
165
+ * @returns {number}
166
+ */
167
+ export function compute_crash_point(random) {
168
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
169
+ const len0 = WASM_VECTOR_LEN;
170
+ const ret = wasm.compute_crash_point(ptr0, len0);
171
+ return ret >>> 0;
172
+ }
173
+
92
174
  /**
93
175
  * Extract the 10 drawn numbers from Poseidon2 random output using
94
176
  * the combinatorial number system: `combo_index = random[0] % C(40,10)`.
@@ -128,15 +210,7 @@ export function compute_multi_dice(win_numbers) {
128
210
  }
129
211
 
130
212
  /**
131
- * Full aviato payout computation — pure integer arithmetic, zero floats.
132
- *
133
- * `random`: 4 Goldilocks field elements (first 4 fields of raw server_seed).
134
- * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
135
- * `cashout_x100`: multiplier at which the user cashed out (×100).
136
- * - 0 = user did NOT cash out (loss).
137
- * - 100..=1_000_000 = user stopped at this multiplier.
138
- *
139
- * Returns `BigUint64Array[4]`: `[win_amount, aviato_x100, is_win (0|1), multiplier×10000]`.
213
+ * Backward-compatible alias for `compute_payout_crash`.
140
214
  * @param {BigUint64Array} random
141
215
  * @param {bigint} bet_atomic
142
216
  * @param {number} cashout_x100
@@ -187,6 +261,37 @@ export function compute_payout_coinflip(random, bet_atomic, prediction) {
187
261
  }
188
262
  }
189
263
 
264
+ /**
265
+ * Full crash payout computation — pure integer arithmetic, zero floats.
266
+ *
267
+ * `random`: 4 Goldilocks field elements (first 4 fields of raw server_seed).
268
+ * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
269
+ * `cashout_x100`: multiplier at which the user cashed out (×100).
270
+ * - 0 = user did NOT cash out (loss).
271
+ * - 100..=1_000_000 = user stopped at this multiplier.
272
+ *
273
+ * Returns `BigUint64Array[4]`: `[win_amount, crash_x100, is_win (0|1), multiplier×10000]`.
274
+ * @param {BigUint64Array} random
275
+ * @param {bigint} bet_atomic
276
+ * @param {number} cashout_x100
277
+ * @returns {BigUint64Array}
278
+ */
279
+ export function compute_payout_crash(random, bet_atomic, cashout_x100) {
280
+ try {
281
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
282
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
283
+ const len0 = WASM_VECTOR_LEN;
284
+ wasm.compute_payout_crash(retptr, ptr0, len0, bet_atomic, cashout_x100);
285
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
286
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
287
+ var v2 = getArrayU64FromWasm0(r0, r1).slice();
288
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
289
+ return v2;
290
+ } finally {
291
+ wasm.__wbindgen_add_to_stack_pointer(16);
292
+ }
293
+ }
294
+
190
295
  /**
191
296
  * Full dice payout computation — pure integer arithmetic, zero floats.
192
297
  *
@@ -497,6 +602,15 @@ export function compute_user_seed_binding(game_id, bet, pred_hash, secret) {
497
602
  }
498
603
  }
499
604
 
605
+ /**
606
+ * Crash RTP percent (99). Canonical source for backend/frontend.
607
+ * @returns {number}
608
+ */
609
+ export function crash_rtp_percent() {
610
+ const ret = wasm.aviato_rtp_percent();
611
+ return ret >>> 0;
612
+ }
613
+
500
614
  /**
501
615
  * Derive a session key from 32 bytes of entropy (e.g. MetaMask signature).
502
616
  *
Binary file
@@ -3,13 +3,17 @@
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const amount_split: (a: number, b: bigint) => void;
5
5
  export const aviato_rtp_percent: () => number;
6
+ export const blackjack_deal_shoe: (a: number, b: number, c: number, d: number, e: number) => void;
7
+ export const blackjack_pack_actions: (a: number, b: number, c: number) => void;
6
8
  export const coinflip_multiplier_x10000: () => number;
7
9
  export const compute_address_hash: (a: number, b: number, c: number) => void;
8
10
  export const compute_aviato_point: (a: number, b: number) => number;
11
+ export const compute_crash_point: (a: number, b: number) => number;
9
12
  export const compute_drawn_keno: (a: number, b: number, c: number) => void;
10
13
  export const compute_multi_dice: (a: number) => bigint;
11
14
  export const compute_payout_aviato: (a: number, b: number, c: number, d: bigint, e: number) => void;
12
15
  export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
16
+ export const compute_payout_crash: (a: number, b: number, c: number, d: bigint, e: number) => void;
13
17
  export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
14
18
  export const compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
15
19
  export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
@@ -53,6 +57,7 @@ export const string_to_user_seed: (a: number, b: number, c: number) => void;
53
57
  export const string_to_user_seed_hex: (a: number, b: number, c: number) => void;
54
58
  export const validate_slot: (a: number, b: number) => void;
55
59
  export const coinflip_rtp_percent: () => number;
60
+ export const crash_rtp_percent: () => number;
56
61
  export const dice_rtp_percent: () => number;
57
62
  export const keno_max_picks: () => number;
58
63
  export const goldilocks_modulus: () => bigint;
package/js/browser.mjs CHANGED
@@ -3,14 +3,18 @@ export { default as init } from '../dist/web/rolly_wasm_signer.js';
3
3
  export {
4
4
  amount_split,
5
5
  aviato_rtp_percent,
6
+ blackjack_deal_shoe,
7
+ blackjack_pack_actions,
6
8
  coinflip_multiplier_x10000,
7
9
  coinflip_rtp_percent,
8
10
  compute_address_hash,
9
11
  compute_aviato_point,
12
+ compute_crash_point,
10
13
  compute_drawn_keno,
11
14
  compute_multi_dice,
12
15
  compute_payout_aviato,
13
16
  compute_payout_coinflip,
17
+ compute_payout_crash,
14
18
  compute_payout_dice,
15
19
  compute_payout_keno,
16
20
  compute_payout_limbo,
@@ -23,6 +27,7 @@ export {
23
27
  compute_roll_plinko,
24
28
  compute_server_seed_hash,
25
29
  compute_user_seed_binding,
30
+ crash_rtp_percent,
26
31
  derive_session_key,
27
32
  dice_rtp_percent,
28
33
  encode_keno_selected,
package/js/index.d.ts CHANGED
@@ -1,14 +1,18 @@
1
1
  export {
2
2
  amount_split,
3
3
  aviato_rtp_percent,
4
+ blackjack_deal_shoe,
5
+ blackjack_pack_actions,
4
6
  coinflip_multiplier_x10000,
5
7
  coinflip_rtp_percent,
6
8
  compute_address_hash,
7
9
  compute_aviato_point,
10
+ compute_crash_point,
8
11
  compute_drawn_keno,
9
12
  compute_multi_dice,
10
13
  compute_payout_aviato,
11
14
  compute_payout_coinflip,
15
+ compute_payout_crash,
12
16
  compute_payout_dice,
13
17
  compute_payout_keno,
14
18
  compute_payout_limbo,
@@ -21,6 +25,7 @@ export {
21
25
  compute_roll_plinko,
22
26
  compute_server_seed_hash,
23
27
  compute_user_seed_binding,
28
+ crash_rtp_percent,
24
29
  derive_session_key,
25
30
  dice_rtp_percent,
26
31
  encode_keno_selected,
@@ -5,14 +5,18 @@ const wasm = require('../dist/node-inline/rolly_wasm_signer.js');
5
5
  module.exports = {
6
6
  amount_split: wasm.amount_split,
7
7
  aviato_rtp_percent: wasm.aviato_rtp_percent,
8
+ blackjack_deal_shoe: wasm.blackjack_deal_shoe,
9
+ blackjack_pack_actions: wasm.blackjack_pack_actions,
8
10
  coinflip_multiplier_x10000: wasm.coinflip_multiplier_x10000,
9
11
  coinflip_rtp_percent: wasm.coinflip_rtp_percent,
10
12
  compute_address_hash: wasm.compute_address_hash,
11
13
  compute_aviato_point: wasm.compute_aviato_point,
14
+ compute_crash_point: wasm.compute_crash_point,
12
15
  compute_drawn_keno: wasm.compute_drawn_keno,
13
16
  compute_multi_dice: wasm.compute_multi_dice,
14
17
  compute_payout_aviato: wasm.compute_payout_aviato,
15
18
  compute_payout_coinflip: wasm.compute_payout_coinflip,
19
+ compute_payout_crash: wasm.compute_payout_crash,
16
20
  compute_payout_dice: wasm.compute_payout_dice,
17
21
  compute_payout_keno: wasm.compute_payout_keno,
18
22
  compute_payout_limbo: wasm.compute_payout_limbo,
@@ -25,6 +29,7 @@ module.exports = {
25
29
  compute_roll_plinko: wasm.compute_roll_plinko,
26
30
  compute_server_seed_hash: wasm.compute_server_seed_hash,
27
31
  compute_user_seed_binding: wasm.compute_user_seed_binding,
32
+ crash_rtp_percent: wasm.crash_rtp_percent,
28
33
  derive_session_key: wasm.derive_session_key,
29
34
  dice_rtp_percent: wasm.dice_rtp_percent,
30
35
  encode_keno_selected: wasm.encode_keno_selected,
@@ -1,14 +1,18 @@
1
1
  export {
2
2
  amount_split,
3
3
  aviato_rtp_percent,
4
+ blackjack_deal_shoe,
5
+ blackjack_pack_actions,
4
6
  coinflip_multiplier_x10000,
5
7
  coinflip_rtp_percent,
6
8
  compute_address_hash,
7
9
  compute_aviato_point,
10
+ compute_crash_point,
8
11
  compute_drawn_keno,
9
12
  compute_multi_dice,
10
13
  compute_payout_aviato,
11
14
  compute_payout_coinflip,
15
+ compute_payout_crash,
12
16
  compute_payout_dice,
13
17
  compute_payout_keno,
14
18
  compute_payout_limbo,
@@ -21,6 +25,7 @@ export {
21
25
  compute_roll_plinko,
22
26
  compute_server_seed_hash,
23
27
  compute_user_seed_binding,
28
+ crash_rtp_percent,
24
29
  derive_session_key,
25
30
  dice_rtp_percent,
26
31
  encode_keno_selected,
package/js/node.cjs CHANGED
@@ -5,14 +5,18 @@ const wasm = require('../dist/node/rolly_wasm_signer.js');
5
5
  module.exports = {
6
6
  amount_split: wasm.amount_split,
7
7
  aviato_rtp_percent: wasm.aviato_rtp_percent,
8
+ blackjack_deal_shoe: wasm.blackjack_deal_shoe,
9
+ blackjack_pack_actions: wasm.blackjack_pack_actions,
8
10
  coinflip_multiplier_x10000: wasm.coinflip_multiplier_x10000,
9
11
  coinflip_rtp_percent: wasm.coinflip_rtp_percent,
10
12
  compute_address_hash: wasm.compute_address_hash,
11
13
  compute_aviato_point: wasm.compute_aviato_point,
14
+ compute_crash_point: wasm.compute_crash_point,
12
15
  compute_drawn_keno: wasm.compute_drawn_keno,
13
16
  compute_multi_dice: wasm.compute_multi_dice,
14
17
  compute_payout_aviato: wasm.compute_payout_aviato,
15
18
  compute_payout_coinflip: wasm.compute_payout_coinflip,
19
+ compute_payout_crash: wasm.compute_payout_crash,
16
20
  compute_payout_dice: wasm.compute_payout_dice,
17
21
  compute_payout_keno: wasm.compute_payout_keno,
18
22
  compute_payout_limbo: wasm.compute_payout_limbo,
@@ -25,6 +29,7 @@ module.exports = {
25
29
  compute_roll_plinko: wasm.compute_roll_plinko,
26
30
  compute_server_seed_hash: wasm.compute_server_seed_hash,
27
31
  compute_user_seed_binding: wasm.compute_user_seed_binding,
32
+ crash_rtp_percent: wasm.crash_rtp_percent,
28
33
  derive_session_key: wasm.derive_session_key,
29
34
  dice_rtp_percent: wasm.dice_rtp_percent,
30
35
  encode_keno_selected: wasm.encode_keno_selected,
package/js/node.mjs CHANGED
@@ -6,14 +6,18 @@ const wasm = require('../dist/node/rolly_wasm_signer.js');
6
6
  export const {
7
7
  amount_split,
8
8
  aviato_rtp_percent,
9
+ blackjack_deal_shoe,
10
+ blackjack_pack_actions,
9
11
  coinflip_multiplier_x10000,
10
12
  coinflip_rtp_percent,
11
13
  compute_address_hash,
12
14
  compute_aviato_point,
15
+ compute_crash_point,
13
16
  compute_drawn_keno,
14
17
  compute_multi_dice,
15
18
  compute_payout_aviato,
16
19
  compute_payout_coinflip,
20
+ compute_payout_crash,
17
21
  compute_payout_dice,
18
22
  compute_payout_keno,
19
23
  compute_payout_limbo,
@@ -26,6 +30,7 @@ export const {
26
30
  compute_roll_plinko,
27
31
  compute_server_seed_hash,
28
32
  compute_user_seed_binding,
33
+ crash_rtp_percent,
29
34
  derive_session_key,
30
35
  dice_rtp_percent,
31
36
  encode_keno_selected,
package/js/react.mjs CHANGED
@@ -2,14 +2,18 @@ import { useState, useEffect } from 'react';
2
2
  import init, {
3
3
  amount_split,
4
4
  aviato_rtp_percent,
5
+ blackjack_deal_shoe,
6
+ blackjack_pack_actions,
5
7
  coinflip_multiplier_x10000,
6
8
  coinflip_rtp_percent,
7
9
  compute_address_hash,
8
10
  compute_aviato_point,
11
+ compute_crash_point,
9
12
  compute_drawn_keno,
10
13
  compute_multi_dice,
11
14
  compute_payout_aviato,
12
15
  compute_payout_coinflip,
16
+ compute_payout_crash,
13
17
  compute_payout_dice,
14
18
  compute_payout_keno,
15
19
  compute_payout_limbo,
@@ -22,6 +26,7 @@ import init, {
22
26
  compute_roll_plinko,
23
27
  compute_server_seed_hash,
24
28
  compute_user_seed_binding,
29
+ crash_rtp_percent,
25
30
  derive_session_key,
26
31
  dice_rtp_percent,
27
32
  encode_keno_selected,
@@ -70,14 +75,18 @@ function guard(fn) {
70
75
  const fns = {
71
76
  amount_split: guard(amount_split),
72
77
  aviato_rtp_percent: guard(aviato_rtp_percent),
78
+ blackjack_deal_shoe: guard(blackjack_deal_shoe),
79
+ blackjack_pack_actions: guard(blackjack_pack_actions),
73
80
  coinflip_multiplier_x10000: guard(coinflip_multiplier_x10000),
74
81
  coinflip_rtp_percent: guard(coinflip_rtp_percent),
75
82
  compute_address_hash: guard(compute_address_hash),
76
83
  compute_aviato_point: guard(compute_aviato_point),
84
+ compute_crash_point: guard(compute_crash_point),
77
85
  compute_drawn_keno: guard(compute_drawn_keno),
78
86
  compute_multi_dice: guard(compute_multi_dice),
79
87
  compute_payout_aviato: guard(compute_payout_aviato),
80
88
  compute_payout_coinflip: guard(compute_payout_coinflip),
89
+ compute_payout_crash: guard(compute_payout_crash),
81
90
  compute_payout_dice: guard(compute_payout_dice),
82
91
  compute_payout_keno: guard(compute_payout_keno),
83
92
  compute_payout_limbo: guard(compute_payout_limbo),
@@ -90,6 +99,7 @@ const fns = {
90
99
  compute_roll_plinko: guard(compute_roll_plinko),
91
100
  compute_server_seed_hash: guard(compute_server_seed_hash),
92
101
  compute_user_seed_binding: guard(compute_user_seed_binding),
102
+ crash_rtp_percent: guard(crash_rtp_percent),
93
103
  derive_session_key: guard(derive_session_key),
94
104
  dice_rtp_percent: guard(dice_rtp_percent),
95
105
  encode_keno_selected: guard(encode_keno_selected),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolly-dev/wasm-signer",
3
- "version": "1.28.1",
3
+ "version": "1.29.0",
4
4
  "description": "Poseidon2 hashing & bet signing for Rolly ZK-Rollup (WASM, Goldilocks field)",
5
5
  "type": "module",
6
6
  "exports": {