@rolly-dev/wasm-signer 1.11.0 → 1.13.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,15 +3,18 @@
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const amount_split: (a: number, b: bigint) => void;
5
5
  export const compute_address_hash: (a: number, b: number, c: number) => void;
6
+ export const compute_drawn_keno: (a: number, b: number, c: number) => void;
6
7
  export const compute_multi_dice: (a: number) => bigint;
7
8
  export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
8
9
  export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
9
- export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number, f: number) => void;
10
+ export const compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
11
+ export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
10
12
  export const compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
11
13
  export const compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
14
+ export const compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
12
15
  export const compute_roll_coinflip: (a: number, b: number) => number;
13
16
  export const compute_roll_dice: (a: number, b: number) => number;
14
- export const compute_roll_limbo: (a: number, b: number, c: number) => number;
17
+ export const compute_roll_limbo: (a: number, b: number) => number;
15
18
  export const compute_roll_plinko: (a: number, b: number, c: number) => number;
16
19
  export const compute_server_seed_hash: (a: number, b: number, c: number) => void;
17
20
  export const compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
@@ -18,6 +18,15 @@ export function amount_split(amount: bigint): Uint32Array;
18
18
  */
19
19
  export function compute_address_hash(address_hex: string): BigUint64Array;
20
20
 
21
+ /**
22
+ * Extract the 10 drawn numbers from Poseidon2 random output using
23
+ * the combinatorial number system: `combo_index = random[0] % C(40,10)`.
24
+ *
25
+ * `random` must be exactly 4 elements.
26
+ * Returns `Uint8Array` of length 10 (sorted ascending, each in [0, 39]).
27
+ */
28
+ export function compute_drawn_keno(random: BigUint64Array): Uint8Array;
29
+
21
30
  /**
22
31
  * Compute dice multiplier × 10000 from win_numbers count.
23
32
  *
@@ -49,17 +58,28 @@ export function compute_payout_coinflip(random: BigUint64Array, bet_atomic: bigi
49
58
  */
50
59
  export function compute_payout_dice(random: BigUint64Array, bet_atomic: bigint, game_mode: number, prediction_lo: number, prediction_hi: number): BigUint64Array;
51
60
 
61
+ /**
62
+ * Full keno payout computation — pure integer arithmetic, zero floats.
63
+ *
64
+ * `random`: 4 Goldilocks field elements (Poseidon2 output).
65
+ * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
66
+ * `risk`: 0=low, 1=medium, 2=high.
67
+ * `selected`: player-chosen numbers (0-indexed, each in [0, 39]).
68
+ *
69
+ * Returns `BigUint64Array[4]`: `[win_amount, match_count, is_win (0|1), multiplier×10000]`.
70
+ */
71
+ export function compute_payout_keno(random: BigUint64Array, bet_atomic: bigint, risk: number, selected: Uint8Array): BigUint64Array;
72
+
52
73
  /**
53
74
  * Full limbo payout computation — pure integer arithmetic, zero floats.
54
75
  *
55
76
  * `random`: 4 Goldilocks field elements (Poseidon2 output).
56
77
  * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
57
- * `prediction_x100`: target multiplier × 100 (101..999999, i.e. 1.01x9999.99x).
58
- * `rtp_numer`: RTP numerator for this bet (90–99). Stored per-bet, included in prediction_hash.
78
+ * `prediction_x100`: target multiplier x 100 (101..999999, i.e. 1.01x-9999.99x).
59
79
  *
60
- * Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier×10000]`.
80
+ * Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier x10000]`.
61
81
  */
62
- export function compute_payout_limbo(random: BigUint64Array, bet_atomic: bigint, prediction_x100: number, rtp_numer: number): BigUint64Array;
82
+ export function compute_payout_limbo(random: BigUint64Array, bet_atomic: bigint, prediction_x100: number): BigUint64Array;
63
83
 
64
84
  /**
65
85
  * Full plinko payout computation — pure integer arithmetic, zero floats.
@@ -81,13 +101,24 @@ export function compute_payout_plinko(random: BigUint64Array, bet_atomic: bigint
81
101
  * and the in-circuit `build_prediction_hash`.
82
102
  *
83
103
  * Semantics of p0–p2 depend on the game:
84
- * Limbo: `(rtp_numer, prediction_x100, 0)`
104
+ * Limbo: `(99, prediction_x100, 0)` — RTP hardcoded at 99
85
105
  * Dice: `(mode, pred_lo, pred_hi)`
86
106
  * Plinko: `(sector, rows, is_extreme)`
87
107
  * CoinFlip: `(prediction, 0, 0)`
88
108
  */
89
109
  export function compute_prediction_hash(game_id: number, p0: number, p1: number, p2: number): BigUint64Array;
90
110
 
111
+ /**
112
+ * Compute Keno prediction hash with extended 13-input format:
113
+ * `Poseidon2(game_id, risk, pick_count, selected[0], …, selected[9])`.
114
+ *
115
+ * Selected numbers are sorted internally for deterministic output.
116
+ * Unused slots (when pick_count < 10) are filled with 0.
117
+ *
118
+ * Returns `BigUint64Array` of length 4 (one `HashOut`).
119
+ */
120
+ export function compute_prediction_hash_keno(game_id: number, risk: number, pick_count: number, selected: Uint8Array): BigUint64Array;
121
+
91
122
  /**
92
123
  * Extract coinflip roll (0 or 1) from Poseidon2 random output.
93
124
  *
@@ -103,13 +134,12 @@ export function compute_roll_coinflip(random: BigUint64Array): number;
103
134
  export function compute_roll_dice(random: BigUint64Array): number;
104
135
 
105
136
  /**
106
- * Extract limbo result multiplier × 100 from Poseidon2 random output.
137
+ * Extract limbo result multiplier x 100 from Poseidon2 random output.
107
138
  *
108
139
  * `random` must be exactly 4 elements.
109
- * `rtp_numer` must be in [90, 99].
110
- * Returns the clamped multiplier × 100 (101..999999).
140
+ * Returns the clamped multiplier x 100 (101..999999).
111
141
  */
112
- export function compute_roll_limbo(random: BigUint64Array, rtp_numer: number): number;
142
+ export function compute_roll_limbo(random: BigUint64Array): number;
113
143
 
114
144
  /**
115
145
  * Extract plinko bucket index from Poseidon2 random output.
@@ -334,15 +364,18 @@ export interface InitOutput {
334
364
  readonly memory: WebAssembly.Memory;
335
365
  readonly amount_split: (a: number, b: bigint) => void;
336
366
  readonly compute_address_hash: (a: number, b: number, c: number) => void;
367
+ readonly compute_drawn_keno: (a: number, b: number, c: number) => void;
337
368
  readonly compute_multi_dice: (a: number) => bigint;
338
369
  readonly compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
339
370
  readonly compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
340
- readonly compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number, f: number) => void;
371
+ readonly compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
372
+ readonly compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
341
373
  readonly compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
342
374
  readonly compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
375
+ readonly compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
343
376
  readonly compute_roll_coinflip: (a: number, b: number) => number;
344
377
  readonly compute_roll_dice: (a: number, b: number) => number;
345
- readonly compute_roll_limbo: (a: number, b: number, c: number) => number;
378
+ readonly compute_roll_limbo: (a: number, b: number) => number;
346
379
  readonly compute_roll_plinko: (a: number, b: number, c: number) => number;
347
380
  readonly compute_server_seed_hash: (a: number, b: number, c: number) => void;
348
381
  readonly compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
@@ -47,6 +47,31 @@ export function compute_address_hash(address_hex) {
47
47
  }
48
48
  }
49
49
 
50
+ /**
51
+ * Extract the 10 drawn numbers from Poseidon2 random output using
52
+ * the combinatorial number system: `combo_index = random[0] % C(40,10)`.
53
+ *
54
+ * `random` must be exactly 4 elements.
55
+ * Returns `Uint8Array` of length 10 (sorted ascending, each in [0, 39]).
56
+ * @param {BigUint64Array} random
57
+ * @returns {Uint8Array}
58
+ */
59
+ export function compute_drawn_keno(random) {
60
+ try {
61
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
62
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
63
+ const len0 = WASM_VECTOR_LEN;
64
+ wasm.compute_drawn_keno(retptr, ptr0, len0);
65
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
66
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
67
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
68
+ wasm.__wbindgen_export2(r0, r1 * 1, 1);
69
+ return v2;
70
+ } finally {
71
+ wasm.__wbindgen_add_to_stack_pointer(16);
72
+ }
73
+ }
74
+
50
75
  /**
51
76
  * Compute dice multiplier × 10000 from win_numbers count.
52
77
  *
@@ -121,27 +146,58 @@ export function compute_payout_dice(random, bet_atomic, game_mode, prediction_lo
121
146
  }
122
147
  }
123
148
 
149
+ /**
150
+ * Full keno payout computation — pure integer arithmetic, zero floats.
151
+ *
152
+ * `random`: 4 Goldilocks field elements (Poseidon2 output).
153
+ * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
154
+ * `risk`: 0=low, 1=medium, 2=high.
155
+ * `selected`: player-chosen numbers (0-indexed, each in [0, 39]).
156
+ *
157
+ * Returns `BigUint64Array[4]`: `[win_amount, match_count, is_win (0|1), multiplier×10000]`.
158
+ * @param {BigUint64Array} random
159
+ * @param {bigint} bet_atomic
160
+ * @param {number} risk
161
+ * @param {Uint8Array} selected
162
+ * @returns {BigUint64Array}
163
+ */
164
+ export function compute_payout_keno(random, bet_atomic, risk, selected) {
165
+ try {
166
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
167
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
168
+ const len0 = WASM_VECTOR_LEN;
169
+ const ptr1 = passArray8ToWasm0(selected, wasm.__wbindgen_export3);
170
+ const len1 = WASM_VECTOR_LEN;
171
+ wasm.compute_payout_keno(retptr, ptr0, len0, bet_atomic, risk, ptr1, len1);
172
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
173
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
174
+ var v3 = getArrayU64FromWasm0(r0, r1).slice();
175
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
176
+ return v3;
177
+ } finally {
178
+ wasm.__wbindgen_add_to_stack_pointer(16);
179
+ }
180
+ }
181
+
124
182
  /**
125
183
  * Full limbo payout computation — pure integer arithmetic, zero floats.
126
184
  *
127
185
  * `random`: 4 Goldilocks field elements (Poseidon2 output).
128
186
  * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
129
- * `prediction_x100`: target multiplier × 100 (101..999999, i.e. 1.01x9999.99x).
130
- * `rtp_numer`: RTP numerator for this bet (90–99). Stored per-bet, included in prediction_hash.
187
+ * `prediction_x100`: target multiplier x 100 (101..999999, i.e. 1.01x-9999.99x).
131
188
  *
132
- * Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier×10000]`.
189
+ * Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier x10000]`.
133
190
  * @param {BigUint64Array} random
134
191
  * @param {bigint} bet_atomic
135
192
  * @param {number} prediction_x100
136
- * @param {number} rtp_numer
137
193
  * @returns {BigUint64Array}
138
194
  */
139
- export function compute_payout_limbo(random, bet_atomic, prediction_x100, rtp_numer) {
195
+ export function compute_payout_limbo(random, bet_atomic, prediction_x100) {
140
196
  try {
141
197
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
142
198
  const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
143
199
  const len0 = WASM_VECTOR_LEN;
144
- wasm.compute_payout_limbo(retptr, ptr0, len0, bet_atomic, prediction_x100, rtp_numer);
200
+ wasm.compute_payout_limbo(retptr, ptr0, len0, bet_atomic, prediction_x100);
145
201
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
146
202
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
147
203
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
@@ -192,7 +248,7 @@ export function compute_payout_plinko(random, bet_atomic, sector, rows, is_extre
192
248
  * and the in-circuit `build_prediction_hash`.
193
249
  *
194
250
  * Semantics of p0–p2 depend on the game:
195
- * Limbo: `(rtp_numer, prediction_x100, 0)`
251
+ * Limbo: `(99, prediction_x100, 0)` — RTP hardcoded at 99
196
252
  * Dice: `(mode, pred_lo, pred_hi)`
197
253
  * Plinko: `(sector, rows, is_extreme)`
198
254
  * CoinFlip: `(prediction, 0, 0)`
@@ -216,6 +272,36 @@ export function compute_prediction_hash(game_id, p0, p1, p2) {
216
272
  }
217
273
  }
218
274
 
275
+ /**
276
+ * Compute Keno prediction hash with extended 13-input format:
277
+ * `Poseidon2(game_id, risk, pick_count, selected[0], …, selected[9])`.
278
+ *
279
+ * Selected numbers are sorted internally for deterministic output.
280
+ * Unused slots (when pick_count < 10) are filled with 0.
281
+ *
282
+ * Returns `BigUint64Array` of length 4 (one `HashOut`).
283
+ * @param {number} game_id
284
+ * @param {number} risk
285
+ * @param {number} pick_count
286
+ * @param {Uint8Array} selected
287
+ * @returns {BigUint64Array}
288
+ */
289
+ export function compute_prediction_hash_keno(game_id, risk, pick_count, selected) {
290
+ try {
291
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
292
+ const ptr0 = passArray8ToWasm0(selected, wasm.__wbindgen_export3);
293
+ const len0 = WASM_VECTOR_LEN;
294
+ wasm.compute_prediction_hash_keno(retptr, game_id, risk, pick_count, ptr0, len0);
295
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
296
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
297
+ var v2 = getArrayU64FromWasm0(r0, r1).slice();
298
+ wasm.__wbindgen_export2(r0, r1 * 8, 8);
299
+ return v2;
300
+ } finally {
301
+ wasm.__wbindgen_add_to_stack_pointer(16);
302
+ }
303
+ }
304
+
219
305
  /**
220
306
  * Extract coinflip roll (0 or 1) from Poseidon2 random output.
221
307
  *
@@ -245,19 +331,17 @@ export function compute_roll_dice(random) {
245
331
  }
246
332
 
247
333
  /**
248
- * Extract limbo result multiplier × 100 from Poseidon2 random output.
334
+ * Extract limbo result multiplier x 100 from Poseidon2 random output.
249
335
  *
250
336
  * `random` must be exactly 4 elements.
251
- * `rtp_numer` must be in [90, 99].
252
- * Returns the clamped multiplier × 100 (101..999999).
337
+ * Returns the clamped multiplier x 100 (101..999999).
253
338
  * @param {BigUint64Array} random
254
- * @param {number} rtp_numer
255
339
  * @returns {number}
256
340
  */
257
- export function compute_roll_limbo(random, rtp_numer) {
341
+ export function compute_roll_limbo(random) {
258
342
  const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
259
343
  const len0 = WASM_VECTOR_LEN;
260
- const ret = wasm.compute_roll_limbo(ptr0, len0, rtp_numer);
344
+ const ret = wasm.compute_roll_limbo(ptr0, len0);
261
345
  return ret >>> 0;
262
346
  }
263
347
 
Binary file
@@ -3,15 +3,18 @@
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const amount_split: (a: number, b: bigint) => void;
5
5
  export const compute_address_hash: (a: number, b: number, c: number) => void;
6
+ export const compute_drawn_keno: (a: number, b: number, c: number) => void;
6
7
  export const compute_multi_dice: (a: number) => bigint;
7
8
  export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
8
9
  export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
9
- export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number, f: number) => void;
10
+ export const compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
11
+ export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
10
12
  export const compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
11
13
  export const compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
14
+ export const compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
12
15
  export const compute_roll_coinflip: (a: number, b: number) => number;
13
16
  export const compute_roll_dice: (a: number, b: number) => number;
14
- export const compute_roll_limbo: (a: number, b: number, c: number) => number;
17
+ export const compute_roll_limbo: (a: number, b: number) => number;
15
18
  export const compute_roll_plinko: (a: number, b: number, c: number) => number;
16
19
  export const compute_server_seed_hash: (a: number, b: number, c: number) => void;
17
20
  export const compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
package/js/browser.mjs CHANGED
@@ -3,12 +3,15 @@ export { default as init } from '../dist/web/rolly_wasm_signer.js';
3
3
  export {
4
4
  amount_split,
5
5
  compute_address_hash,
6
+ compute_drawn_keno,
6
7
  compute_multi_dice,
7
8
  compute_payout_coinflip,
8
9
  compute_payout_dice,
10
+ compute_payout_keno,
9
11
  compute_payout_limbo,
10
12
  compute_payout_plinko,
11
13
  compute_prediction_hash,
14
+ compute_prediction_hash_keno,
12
15
  compute_roll_coinflip,
13
16
  compute_roll_dice,
14
17
  compute_roll_limbo,
package/js/index.d.ts CHANGED
@@ -1,12 +1,15 @@
1
1
  export {
2
2
  amount_split,
3
3
  compute_address_hash,
4
+ compute_drawn_keno,
4
5
  compute_multi_dice,
5
6
  compute_payout_coinflip,
6
7
  compute_payout_dice,
8
+ compute_payout_keno,
7
9
  compute_payout_limbo,
8
10
  compute_payout_plinko,
9
11
  compute_prediction_hash,
12
+ compute_prediction_hash_keno,
10
13
  compute_roll_coinflip,
11
14
  compute_roll_dice,
12
15
  compute_roll_limbo,
@@ -5,12 +5,15 @@ const wasm = require('../dist/node-inline/rolly_wasm_signer.js');
5
5
  module.exports = {
6
6
  amount_split: wasm.amount_split,
7
7
  compute_address_hash: wasm.compute_address_hash,
8
+ compute_drawn_keno: wasm.compute_drawn_keno,
8
9
  compute_multi_dice: wasm.compute_multi_dice,
9
10
  compute_payout_coinflip: wasm.compute_payout_coinflip,
10
11
  compute_payout_dice: wasm.compute_payout_dice,
12
+ compute_payout_keno: wasm.compute_payout_keno,
11
13
  compute_payout_limbo: wasm.compute_payout_limbo,
12
14
  compute_payout_plinko: wasm.compute_payout_plinko,
13
15
  compute_prediction_hash: wasm.compute_prediction_hash,
16
+ compute_prediction_hash_keno:wasm.compute_prediction_hash_keno,
14
17
  compute_roll_coinflip: wasm.compute_roll_coinflip,
15
18
  compute_roll_dice: wasm.compute_roll_dice,
16
19
  compute_roll_limbo: wasm.compute_roll_limbo,
@@ -1,12 +1,15 @@
1
1
  export {
2
2
  amount_split,
3
3
  compute_address_hash,
4
+ compute_drawn_keno,
4
5
  compute_multi_dice,
5
6
  compute_payout_coinflip,
6
7
  compute_payout_dice,
8
+ compute_payout_keno,
7
9
  compute_payout_limbo,
8
10
  compute_payout_plinko,
9
11
  compute_prediction_hash,
12
+ compute_prediction_hash_keno,
10
13
  compute_roll_coinflip,
11
14
  compute_roll_dice,
12
15
  compute_roll_limbo,
package/js/node.cjs CHANGED
@@ -5,12 +5,15 @@ const wasm = require('../dist/node/rolly_wasm_signer.js');
5
5
  module.exports = {
6
6
  amount_split: wasm.amount_split,
7
7
  compute_address_hash: wasm.compute_address_hash,
8
+ compute_drawn_keno: wasm.compute_drawn_keno,
8
9
  compute_multi_dice: wasm.compute_multi_dice,
9
10
  compute_payout_coinflip: wasm.compute_payout_coinflip,
10
11
  compute_payout_dice: wasm.compute_payout_dice,
12
+ compute_payout_keno: wasm.compute_payout_keno,
11
13
  compute_payout_limbo: wasm.compute_payout_limbo,
12
14
  compute_payout_plinko: wasm.compute_payout_plinko,
13
15
  compute_prediction_hash: wasm.compute_prediction_hash,
16
+ compute_prediction_hash_keno:wasm.compute_prediction_hash_keno,
14
17
  compute_roll_coinflip: wasm.compute_roll_coinflip,
15
18
  compute_roll_dice: wasm.compute_roll_dice,
16
19
  compute_roll_limbo: wasm.compute_roll_limbo,
package/js/node.mjs CHANGED
@@ -6,12 +6,15 @@ const wasm = require('../dist/node/rolly_wasm_signer.js');
6
6
  export const {
7
7
  amount_split,
8
8
  compute_address_hash,
9
+ compute_drawn_keno,
9
10
  compute_multi_dice,
10
11
  compute_payout_coinflip,
11
12
  compute_payout_dice,
13
+ compute_payout_keno,
12
14
  compute_payout_limbo,
13
15
  compute_payout_plinko,
14
16
  compute_prediction_hash,
17
+ compute_prediction_hash_keno,
15
18
  compute_roll_coinflip,
16
19
  compute_roll_dice,
17
20
  compute_roll_limbo,
package/js/react.mjs CHANGED
@@ -2,12 +2,15 @@ import { useState, useEffect } from 'react';
2
2
  import init, {
3
3
  amount_split,
4
4
  compute_address_hash,
5
+ compute_drawn_keno,
5
6
  compute_multi_dice,
6
7
  compute_payout_coinflip,
7
8
  compute_payout_dice,
9
+ compute_payout_keno,
8
10
  compute_payout_limbo,
9
11
  compute_payout_plinko,
10
12
  compute_prediction_hash,
13
+ compute_prediction_hash_keno,
11
14
  compute_roll_coinflip,
12
15
  compute_roll_dice,
13
16
  compute_roll_limbo,
@@ -43,12 +46,15 @@ function guard(fn) {
43
46
  const fns = {
44
47
  amount_split: guard(amount_split),
45
48
  compute_address_hash: guard(compute_address_hash),
49
+ compute_drawn_keno: guard(compute_drawn_keno),
46
50
  compute_multi_dice: guard(compute_multi_dice),
47
51
  compute_payout_coinflip: guard(compute_payout_coinflip),
48
52
  compute_payout_dice: guard(compute_payout_dice),
53
+ compute_payout_keno: guard(compute_payout_keno),
49
54
  compute_payout_limbo: guard(compute_payout_limbo),
50
55
  compute_payout_plinko: guard(compute_payout_plinko),
51
56
  compute_prediction_hash: guard(compute_prediction_hash),
57
+ compute_prediction_hash_keno:guard(compute_prediction_hash_keno),
52
58
  compute_roll_coinflip: guard(compute_roll_coinflip),
53
59
  compute_roll_dice: guard(compute_roll_dice),
54
60
  compute_roll_limbo: guard(compute_roll_limbo),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolly-dev/wasm-signer",
3
- "version": "1.11.0",
3
+ "version": "1.13.0",
4
4
  "description": "Poseidon2 hashing & bet signing for Rolly ZK-Rollup (WASM, Goldilocks field)",
5
5
  "type": "module",
6
6
  "exports": {