@rolly-dev/wasm-signer 1.21.0 → 1.24.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.
@@ -18,7 +18,7 @@ function amount_split(amount) {
18
18
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
19
19
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
20
20
  var v1 = getArrayU32FromWasm0(r0, r1).slice();
21
- wasm.__wbindgen_export2(r0, r1 * 4, 4);
21
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
22
22
  return v1;
23
23
  } finally {
24
24
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -26,6 +26,16 @@ function amount_split(amount) {
26
26
  }
27
27
  exports.amount_split = amount_split;
28
28
 
29
+ /**
30
+ * Aviato RTP percent (99). Canonical source for backend/frontend.
31
+ * @returns {number}
32
+ */
33
+ function aviato_rtp_percent() {
34
+ const ret = wasm.aviato_rtp_percent();
35
+ return ret >>> 0;
36
+ }
37
+ exports.aviato_rtp_percent = aviato_rtp_percent;
38
+
29
39
  /**
30
40
  * CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
31
41
  * @returns {number}
@@ -41,7 +51,7 @@ exports.coinflip_multiplier_x10000 = coinflip_multiplier_x10000;
41
51
  * @returns {number}
42
52
  */
43
53
  function coinflip_rtp_percent() {
44
- const ret = wasm.coinflip_rtp_percent();
54
+ const ret = wasm.aviato_rtp_percent();
45
55
  return ret >>> 0;
46
56
  }
47
57
  exports.coinflip_rtp_percent = coinflip_rtp_percent;
@@ -55,13 +65,13 @@ exports.coinflip_rtp_percent = coinflip_rtp_percent;
55
65
  function compute_address_hash(address_hex) {
56
66
  try {
57
67
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
58
- const ptr0 = passStringToWasm0(address_hex, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
68
+ const ptr0 = passStringToWasm0(address_hex, wasm.__wbindgen_export, wasm.__wbindgen_export2);
59
69
  const len0 = WASM_VECTOR_LEN;
60
70
  wasm.compute_address_hash(retptr, ptr0, len0);
61
71
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
62
72
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
63
73
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
64
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
74
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
65
75
  return v2;
66
76
  } finally {
67
77
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -70,20 +80,20 @@ function compute_address_hash(address_hex) {
70
80
  exports.compute_address_hash = compute_address_hash;
71
81
 
72
82
  /**
73
- * Extract crash point (×100) from Poseidon2 random output.
83
+ * Extract aviato point (×100) from raw server seed fields.
74
84
  *
75
- * `random` must be exactly 4 elements.
76
- * Returns the clamped crash multiplier ×100 (100..=1_000_000, i.e. 1.00x..10000.00x).
85
+ * `random` must be exactly 4 elements (first 4 fields of server_seed).
86
+ * Returns the clamped aviato multiplier ×100 (100..=1_000_000, i.e. 1.00x..10000.00x).
77
87
  * @param {BigUint64Array} random
78
88
  * @returns {number}
79
89
  */
80
- function compute_crash_point(random) {
81
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
90
+ function compute_aviato_point(random) {
91
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
82
92
  const len0 = WASM_VECTOR_LEN;
83
- const ret = wasm.compute_crash_point(ptr0, len0);
93
+ const ret = wasm.compute_aviato_point(ptr0, len0);
84
94
  return ret >>> 0;
85
95
  }
86
- exports.compute_crash_point = compute_crash_point;
96
+ exports.compute_aviato_point = compute_aviato_point;
87
97
 
88
98
  /**
89
99
  * Extract the 10 drawn numbers from Poseidon2 random output using
@@ -97,13 +107,13 @@ exports.compute_crash_point = compute_crash_point;
97
107
  function compute_drawn_keno(random) {
98
108
  try {
99
109
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
100
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
110
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
101
111
  const len0 = WASM_VECTOR_LEN;
102
112
  wasm.compute_drawn_keno(retptr, ptr0, len0);
103
113
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
104
114
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
105
115
  var v2 = getArrayU8FromWasm0(r0, r1).slice();
106
- wasm.__wbindgen_export2(r0, r1 * 1, 1);
116
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
107
117
  return v2;
108
118
  } finally {
109
119
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -126,66 +136,66 @@ function compute_multi_dice(win_numbers) {
126
136
  exports.compute_multi_dice = compute_multi_dice;
127
137
 
128
138
  /**
129
- * Full coinflip payout computation — pure integer arithmetic, zero floats.
139
+ * Full aviato payout computation — pure integer arithmetic, zero floats.
130
140
  *
131
- * `random`: 4 Goldilocks field elements (Poseidon2 output).
141
+ * `random`: 4 Goldilocks field elements (first 4 fields of raw server_seed).
132
142
  * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
133
- * `prediction`: 0 or 1.
143
+ * `cashout_x100`: multiplier at which the user cashed out (×100).
144
+ * - 0 = user did NOT cash out (loss).
145
+ * - 100..=1_000_000 = user stopped at this multiplier.
134
146
  *
135
- * Returns `BigUint64Array[4]`: `[win_amount, roll (0|1), is_win (0|1), multiplier×10000]`.
147
+ * Returns `BigUint64Array[4]`: `[win_amount, aviato_x100, is_win (0|1), multiplier×10000]`.
136
148
  * @param {BigUint64Array} random
137
149
  * @param {bigint} bet_atomic
138
- * @param {number} prediction
150
+ * @param {number} cashout_x100
139
151
  * @returns {BigUint64Array}
140
152
  */
141
- function compute_payout_coinflip(random, bet_atomic, prediction) {
153
+ function compute_payout_aviato(random, bet_atomic, cashout_x100) {
142
154
  try {
143
155
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
144
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
156
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
145
157
  const len0 = WASM_VECTOR_LEN;
146
- wasm.compute_payout_coinflip(retptr, ptr0, len0, bet_atomic, prediction);
158
+ wasm.compute_payout_aviato(retptr, ptr0, len0, bet_atomic, cashout_x100);
147
159
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
148
160
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
149
161
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
150
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
162
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
151
163
  return v2;
152
164
  } finally {
153
165
  wasm.__wbindgen_add_to_stack_pointer(16);
154
166
  }
155
167
  }
156
- exports.compute_payout_coinflip = compute_payout_coinflip;
168
+ exports.compute_payout_aviato = compute_payout_aviato;
157
169
 
158
170
  /**
159
- * Full crash payout computation — pure integer arithmetic, zero floats.
171
+ * Full coinflip payout computation — pure integer arithmetic, zero floats.
160
172
  *
161
- * `random`: 4 Goldilocks field elements (Poseidon2 output of server_seed).
173
+ * `random`: 4 Goldilocks field elements (Poseidon2 output).
162
174
  * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
163
- * `cashout_x100`: multiplier at which the user cashed out (×100).
164
- * - 0 = user did NOT cash out (loss).
165
- * - 100..=1_000_000 = user stopped at this multiplier.
175
+ * `prediction`: 0 or 1.
166
176
  *
167
- * Returns `BigUint64Array[4]`: `[win_amount, crash_x100, is_win (0|1), multiplier×10000]`.
177
+ * Returns `BigUint64Array[4]`: `[win_amount, roll (0|1), is_win (0|1), multiplier×10000]`.
168
178
  * @param {BigUint64Array} random
169
179
  * @param {bigint} bet_atomic
170
- * @param {number} cashout_x100
180
+ * @param {number} prediction
171
181
  * @returns {BigUint64Array}
172
182
  */
173
- function compute_payout_crash(random, bet_atomic, cashout_x100) {
183
+ function compute_payout_coinflip(random, bet_atomic, prediction) {
174
184
  try {
175
185
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
176
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
186
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
177
187
  const len0 = WASM_VECTOR_LEN;
178
- wasm.compute_payout_crash(retptr, ptr0, len0, bet_atomic, cashout_x100);
188
+ wasm.compute_payout_coinflip(retptr, ptr0, len0, bet_atomic, prediction);
179
189
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
180
190
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
181
191
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
182
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
192
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
183
193
  return v2;
184
194
  } finally {
185
195
  wasm.__wbindgen_add_to_stack_pointer(16);
186
196
  }
187
197
  }
188
- exports.compute_payout_crash = compute_payout_crash;
198
+ exports.compute_payout_coinflip = compute_payout_coinflip;
189
199
 
190
200
  /**
191
201
  * Full dice payout computation — pure integer arithmetic, zero floats.
@@ -206,13 +216,13 @@ exports.compute_payout_crash = compute_payout_crash;
206
216
  function compute_payout_dice(random, bet_atomic, game_mode, prediction_lo, prediction_hi) {
207
217
  try {
208
218
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
209
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
219
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
210
220
  const len0 = WASM_VECTOR_LEN;
211
221
  wasm.compute_payout_dice(retptr, ptr0, len0, bet_atomic, game_mode, prediction_lo, prediction_hi);
212
222
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
213
223
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
214
224
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
215
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
225
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
216
226
  return v2;
217
227
  } finally {
218
228
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -238,15 +248,15 @@ exports.compute_payout_dice = compute_payout_dice;
238
248
  function compute_payout_keno(random, bet_atomic, risk, selected) {
239
249
  try {
240
250
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
241
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
251
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
242
252
  const len0 = WASM_VECTOR_LEN;
243
- const ptr1 = passArray8ToWasm0(selected, wasm.__wbindgen_export3);
253
+ const ptr1 = passArray8ToWasm0(selected, wasm.__wbindgen_export);
244
254
  const len1 = WASM_VECTOR_LEN;
245
255
  wasm.compute_payout_keno(retptr, ptr0, len0, bet_atomic, risk, ptr1, len1);
246
256
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
247
257
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
248
258
  var v3 = getArrayU64FromWasm0(r0, r1).slice();
249
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
259
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
250
260
  return v3;
251
261
  } finally {
252
262
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -270,13 +280,13 @@ exports.compute_payout_keno = compute_payout_keno;
270
280
  function compute_payout_limbo(random, bet_atomic, prediction_x100) {
271
281
  try {
272
282
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
273
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
283
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
274
284
  const len0 = WASM_VECTOR_LEN;
275
285
  wasm.compute_payout_limbo(retptr, ptr0, len0, bet_atomic, prediction_x100);
276
286
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
277
287
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
278
288
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
279
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
289
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
280
290
  return v2;
281
291
  } finally {
282
292
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -304,13 +314,13 @@ exports.compute_payout_limbo = compute_payout_limbo;
304
314
  function compute_payout_plinko(random, bet_atomic, sector, rows, is_extreme) {
305
315
  try {
306
316
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
307
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
317
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
308
318
  const len0 = WASM_VECTOR_LEN;
309
319
  wasm.compute_payout_plinko(retptr, ptr0, len0, bet_atomic, sector, rows, is_extreme);
310
320
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
311
321
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
312
322
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
313
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
323
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
314
324
  return v2;
315
325
  } finally {
316
326
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -342,7 +352,7 @@ function compute_prediction_hash(game_id, p0, p1, p2) {
342
352
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
343
353
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
344
354
  var v1 = getArrayU64FromWasm0(r0, r1).slice();
345
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
355
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
346
356
  return v1;
347
357
  } finally {
348
358
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -367,13 +377,13 @@ exports.compute_prediction_hash = compute_prediction_hash;
367
377
  function compute_prediction_hash_keno(game_id, risk, pick_count, selected) {
368
378
  try {
369
379
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
370
- const ptr0 = passArray8ToWasm0(selected, wasm.__wbindgen_export3);
380
+ const ptr0 = passArray8ToWasm0(selected, wasm.__wbindgen_export);
371
381
  const len0 = WASM_VECTOR_LEN;
372
382
  wasm.compute_prediction_hash_keno(retptr, game_id, risk, pick_count, ptr0, len0);
373
383
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
374
384
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
375
385
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
376
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
386
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
377
387
  return v2;
378
388
  } finally {
379
389
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -389,7 +399,7 @@ exports.compute_prediction_hash_keno = compute_prediction_hash_keno;
389
399
  * @returns {number}
390
400
  */
391
401
  function compute_roll_coinflip(random) {
392
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
402
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
393
403
  const len0 = WASM_VECTOR_LEN;
394
404
  const ret = wasm.compute_roll_coinflip(ptr0, len0);
395
405
  return ret >>> 0;
@@ -404,7 +414,7 @@ exports.compute_roll_coinflip = compute_roll_coinflip;
404
414
  * @returns {number}
405
415
  */
406
416
  function compute_roll_dice(random) {
407
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
417
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
408
418
  const len0 = WASM_VECTOR_LEN;
409
419
  const ret = wasm.compute_roll_dice(ptr0, len0);
410
420
  return ret >>> 0;
@@ -420,7 +430,7 @@ exports.compute_roll_dice = compute_roll_dice;
420
430
  * @returns {number}
421
431
  */
422
432
  function compute_roll_limbo(random) {
423
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
433
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
424
434
  const len0 = WASM_VECTOR_LEN;
425
435
  const ret = wasm.compute_roll_limbo(ptr0, len0);
426
436
  return ret >>> 0;
@@ -438,7 +448,7 @@ exports.compute_roll_limbo = compute_roll_limbo;
438
448
  * @returns {number}
439
449
  */
440
450
  function compute_roll_plinko(random, rows) {
441
- const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
451
+ const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
442
452
  const len0 = WASM_VECTOR_LEN;
443
453
  const ret = wasm.compute_roll_plinko(ptr0, len0, rows);
444
454
  return ret >>> 0;
@@ -460,13 +470,13 @@ exports.compute_roll_plinko = compute_roll_plinko;
460
470
  function compute_server_seed_hash(server_seed) {
461
471
  try {
462
472
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
463
- const ptr0 = passArray64ToWasm0(server_seed, wasm.__wbindgen_export3);
473
+ const ptr0 = passArray64ToWasm0(server_seed, wasm.__wbindgen_export);
464
474
  const len0 = WASM_VECTOR_LEN;
465
475
  wasm.compute_server_seed_hash(retptr, ptr0, len0);
466
476
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
467
477
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
468
478
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
469
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
479
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
470
480
  return v2;
471
481
  } finally {
472
482
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -493,15 +503,15 @@ exports.compute_server_seed_hash = compute_server_seed_hash;
493
503
  function compute_user_seed_binding(game_id, bet, pred_hash, secret) {
494
504
  try {
495
505
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
496
- const ptr0 = passArray64ToWasm0(pred_hash, wasm.__wbindgen_export3);
506
+ const ptr0 = passArray64ToWasm0(pred_hash, wasm.__wbindgen_export);
497
507
  const len0 = WASM_VECTOR_LEN;
498
- const ptr1 = passArray64ToWasm0(secret, wasm.__wbindgen_export3);
508
+ const ptr1 = passArray64ToWasm0(secret, wasm.__wbindgen_export);
499
509
  const len1 = WASM_VECTOR_LEN;
500
510
  wasm.compute_user_seed_binding(retptr, game_id, bet, ptr0, len0, ptr1, len1);
501
511
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
502
512
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
503
513
  var v3 = getArrayU64FromWasm0(r0, r1).slice();
504
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
514
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
505
515
  return v3;
506
516
  } finally {
507
517
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -509,16 +519,6 @@ function compute_user_seed_binding(game_id, bet, pred_hash, secret) {
509
519
  }
510
520
  exports.compute_user_seed_binding = compute_user_seed_binding;
511
521
 
512
- /**
513
- * Crash RTP percent (99). Canonical source for backend/frontend.
514
- * @returns {number}
515
- */
516
- function crash_rtp_percent() {
517
- const ret = wasm.coinflip_rtp_percent();
518
- return ret >>> 0;
519
- }
520
- exports.crash_rtp_percent = crash_rtp_percent;
521
-
522
522
  /**
523
523
  * Derive a session key from 32 bytes of entropy (e.g. MetaMask signature).
524
524
  *
@@ -540,13 +540,13 @@ exports.crash_rtp_percent = crash_rtp_percent;
540
540
  function derive_session_key(sig_bytes) {
541
541
  try {
542
542
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
543
- const ptr0 = passArray8ToWasm0(sig_bytes, wasm.__wbindgen_export3);
543
+ const ptr0 = passArray8ToWasm0(sig_bytes, wasm.__wbindgen_export);
544
544
  const len0 = WASM_VECTOR_LEN;
545
545
  wasm.derive_session_key(retptr, ptr0, len0);
546
546
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
547
547
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
548
548
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
549
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
549
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
550
550
  return v2;
551
551
  } finally {
552
552
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -559,7 +559,7 @@ exports.derive_session_key = derive_session_key;
559
559
  * @returns {number}
560
560
  */
561
561
  function dice_rtp_percent() {
562
- const ret = wasm.coinflip_rtp_percent();
562
+ const ret = wasm.aviato_rtp_percent();
563
563
  return ret >>> 0;
564
564
  }
565
565
  exports.dice_rtp_percent = dice_rtp_percent;
@@ -576,13 +576,13 @@ exports.dice_rtp_percent = dice_rtp_percent;
576
576
  function encode_keno_selected(selected_1indexed) {
577
577
  try {
578
578
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
579
- const ptr0 = passArray8ToWasm0(selected_1indexed, wasm.__wbindgen_export3);
579
+ const ptr0 = passArray8ToWasm0(selected_1indexed, wasm.__wbindgen_export);
580
580
  const len0 = WASM_VECTOR_LEN;
581
581
  wasm.encode_keno_selected(retptr, ptr0, len0);
582
582
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
583
583
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
584
584
  var v2 = getArrayU32FromWasm0(r0, r1).slice();
585
- wasm.__wbindgen_export2(r0, r1 * 4, 4);
585
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
586
586
  return v2;
587
587
  } finally {
588
588
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -609,7 +609,7 @@ function generate_user_secret() {
609
609
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
610
610
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
611
611
  var v1 = getArrayU64FromWasm0(r0, r1).slice();
612
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
612
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
613
613
  return v1;
614
614
  } finally {
615
615
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -642,7 +642,7 @@ function generate_user_seed() {
642
642
  return getStringFromWasm0(r0, r1);
643
643
  } finally {
644
644
  wasm.__wbindgen_add_to_stack_pointer(16);
645
- wasm.__wbindgen_export2(deferred1_0, deferred1_1, 1);
645
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
646
646
  }
647
647
  }
648
648
  exports.generate_user_seed = generate_user_seed;
@@ -664,7 +664,7 @@ function goldilocks_fields_to_hex(fields) {
664
664
  let deferred2_1;
665
665
  try {
666
666
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
667
- const ptr0 = passArray64ToWasm0(fields, wasm.__wbindgen_export3);
667
+ const ptr0 = passArray64ToWasm0(fields, wasm.__wbindgen_export);
668
668
  const len0 = WASM_VECTOR_LEN;
669
669
  wasm.goldilocks_fields_to_hex(retptr, ptr0, len0);
670
670
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -674,7 +674,7 @@ function goldilocks_fields_to_hex(fields) {
674
674
  return getStringFromWasm0(r0, r1);
675
675
  } finally {
676
676
  wasm.__wbindgen_add_to_stack_pointer(16);
677
- wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
677
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
678
678
  }
679
679
  }
680
680
  exports.goldilocks_fields_to_hex = goldilocks_fields_to_hex;
@@ -723,13 +723,13 @@ exports.goldilocks_reduce = goldilocks_reduce;
723
723
  function hash_balance_leaf(raw) {
724
724
  try {
725
725
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
726
- const ptr0 = passArray64ToWasm0(raw, wasm.__wbindgen_export3);
726
+ const ptr0 = passArray64ToWasm0(raw, wasm.__wbindgen_export);
727
727
  const len0 = WASM_VECTOR_LEN;
728
728
  wasm.hash_balance_leaf(retptr, ptr0, len0);
729
729
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
730
730
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
731
731
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
732
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
732
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
733
733
  return v2;
734
734
  } finally {
735
735
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -794,7 +794,7 @@ function keno_multiplier_table(risk, pick_count) {
794
794
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
795
795
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
796
796
  var v1 = getArrayU64FromWasm0(r0, r1).slice();
797
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
797
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
798
798
  return v1;
799
799
  } finally {
800
800
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -828,7 +828,7 @@ exports.keno_rtp_x100 = keno_rtp_x100;
828
828
  * @returns {number}
829
829
  */
830
830
  function limbo_rtp_percent() {
831
- const ret = wasm.coinflip_rtp_percent();
831
+ const ret = wasm.limbo_rtp_percent();
832
832
  return ret >>> 0;
833
833
  }
834
834
  exports.limbo_rtp_percent = limbo_rtp_percent;
@@ -856,17 +856,17 @@ exports.limbo_rtp_percent = limbo_rtp_percent;
856
856
  function make_main_leaf(balance_hash, pk_hash, address_hash) {
857
857
  try {
858
858
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
859
- const ptr0 = passArray64ToWasm0(balance_hash, wasm.__wbindgen_export3);
859
+ const ptr0 = passArray64ToWasm0(balance_hash, wasm.__wbindgen_export);
860
860
  const len0 = WASM_VECTOR_LEN;
861
- const ptr1 = passArray64ToWasm0(pk_hash, wasm.__wbindgen_export3);
861
+ const ptr1 = passArray64ToWasm0(pk_hash, wasm.__wbindgen_export);
862
862
  const len1 = WASM_VECTOR_LEN;
863
- const ptr2 = passArray64ToWasm0(address_hash, wasm.__wbindgen_export3);
863
+ const ptr2 = passArray64ToWasm0(address_hash, wasm.__wbindgen_export);
864
864
  const len2 = WASM_VECTOR_LEN;
865
865
  wasm.make_main_leaf(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
866
866
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
867
867
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
868
868
  var v4 = getArrayU64FromWasm0(r0, r1).slice();
869
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
869
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
870
870
  return v4;
871
871
  } finally {
872
872
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -942,7 +942,7 @@ function plinko_multiplier_table(sector, rows, is_extreme) {
942
942
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
943
943
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
944
944
  var v1 = getArrayU64FromWasm0(r0, r1).slice();
945
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
945
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
946
946
  return v1;
947
947
  } finally {
948
948
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -991,13 +991,13 @@ exports.plinko_rtp_x100 = plinko_rtp_x100;
991
991
  function poseidon2_hash(input) {
992
992
  try {
993
993
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
994
- const ptr0 = passArray64ToWasm0(input, wasm.__wbindgen_export3);
994
+ const ptr0 = passArray64ToWasm0(input, wasm.__wbindgen_export);
995
995
  const len0 = WASM_VECTOR_LEN;
996
996
  wasm.poseidon2_hash(retptr, ptr0, len0);
997
997
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
998
998
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
999
999
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
1000
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
1000
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
1001
1001
  return v2;
1002
1002
  } finally {
1003
1003
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1019,15 +1019,15 @@ exports.poseidon2_hash = poseidon2_hash;
1019
1019
  function poseidon2_two_to_one(left, right) {
1020
1020
  try {
1021
1021
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1022
- const ptr0 = passArray64ToWasm0(left, wasm.__wbindgen_export3);
1022
+ const ptr0 = passArray64ToWasm0(left, wasm.__wbindgen_export);
1023
1023
  const len0 = WASM_VECTOR_LEN;
1024
- const ptr1 = passArray64ToWasm0(right, wasm.__wbindgen_export3);
1024
+ const ptr1 = passArray64ToWasm0(right, wasm.__wbindgen_export);
1025
1025
  const len1 = WASM_VECTOR_LEN;
1026
1026
  wasm.poseidon2_two_to_one(retptr, ptr0, len0, ptr1, len1);
1027
1027
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1028
1028
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1029
1029
  var v3 = getArrayU64FromWasm0(r0, r1).slice();
1030
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
1030
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
1031
1031
  return v3;
1032
1032
  } finally {
1033
1033
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1051,13 +1051,13 @@ exports.poseidon2_two_to_one = poseidon2_two_to_one;
1051
1051
  function seed_hash_truncated(server_seed) {
1052
1052
  try {
1053
1053
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1054
- const ptr0 = passArray64ToWasm0(server_seed, wasm.__wbindgen_export3);
1054
+ const ptr0 = passArray64ToWasm0(server_seed, wasm.__wbindgen_export);
1055
1055
  const len0 = WASM_VECTOR_LEN;
1056
1056
  wasm.seed_hash_truncated(retptr, ptr0, len0);
1057
1057
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1058
1058
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1059
1059
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
1060
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
1060
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
1061
1061
  return v2;
1062
1062
  } finally {
1063
1063
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1080,13 +1080,13 @@ exports.seed_hash_truncated = seed_hash_truncated;
1080
1080
  function session_public_key(session_key, session_expiry) {
1081
1081
  try {
1082
1082
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1083
- const ptr0 = passArray64ToWasm0(session_key, wasm.__wbindgen_export3);
1083
+ const ptr0 = passArray64ToWasm0(session_key, wasm.__wbindgen_export);
1084
1084
  const len0 = WASM_VECTOR_LEN;
1085
1085
  wasm.session_public_key(retptr, ptr0, len0, session_expiry);
1086
1086
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1087
1087
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1088
1088
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
1089
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
1089
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
1090
1090
  return v2;
1091
1091
  } finally {
1092
1092
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1113,13 +1113,13 @@ exports.session_public_key = session_public_key;
1113
1113
  function string_to_user_seed(input) {
1114
1114
  try {
1115
1115
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1116
- const ptr0 = passStringToWasm0(input, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1116
+ const ptr0 = passStringToWasm0(input, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1117
1117
  const len0 = WASM_VECTOR_LEN;
1118
1118
  wasm.string_to_user_seed(retptr, ptr0, len0);
1119
1119
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1120
1120
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1121
1121
  var v2 = getArrayU64FromWasm0(r0, r1).slice();
1122
- wasm.__wbindgen_export2(r0, r1 * 8, 8);
1122
+ wasm.__wbindgen_export4(r0, r1 * 8, 8);
1123
1123
  return v2;
1124
1124
  } finally {
1125
1125
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -1145,7 +1145,7 @@ function string_to_user_seed_hex(input) {
1145
1145
  let deferred2_1;
1146
1146
  try {
1147
1147
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1148
- const ptr0 = passStringToWasm0(input, wasm.__wbindgen_export3, wasm.__wbindgen_export4);
1148
+ const ptr0 = passStringToWasm0(input, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1149
1149
  const len0 = WASM_VECTOR_LEN;
1150
1150
  wasm.string_to_user_seed_hex(retptr, ptr0, len0);
1151
1151
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -1155,14 +1155,82 @@ function string_to_user_seed_hex(input) {
1155
1155
  return getStringFromWasm0(r0, r1);
1156
1156
  } finally {
1157
1157
  wasm.__wbindgen_add_to_stack_pointer(16);
1158
- wasm.__wbindgen_export2(deferred2_0, deferred2_1, 1);
1158
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
1159
1159
  }
1160
1160
  }
1161
1161
  exports.string_to_user_seed_hex = string_to_user_seed_hex;
1162
1162
 
1163
+ /**
1164
+ * Re-check every per-slot circuit constraint on a candidate witness, returning
1165
+ * the post-tx effects on success or a typed rejection reason on failure.
1166
+ *
1167
+ * Input: a JS object matching `tx_validator::SlotInput` (serde-compatible).
1168
+ * Output on success: `{ ok: true, effects: SlotEffects }`.
1169
+ * Output on failure: `{ ok: false, reason: string }`.
1170
+ * @param {any} input
1171
+ * @returns {any}
1172
+ */
1173
+ function validate_slot(input) {
1174
+ try {
1175
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1176
+ wasm.validate_slot(retptr, addHeapObject(input));
1177
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1178
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1179
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1180
+ if (r2) {
1181
+ throw takeObject(r1);
1182
+ }
1183
+ return takeObject(r0);
1184
+ } finally {
1185
+ wasm.__wbindgen_add_to_stack_pointer(16);
1186
+ }
1187
+ }
1188
+ exports.validate_slot = validate_slot;
1189
+
1163
1190
  function __wbg_get_imports() {
1164
1191
  const import0 = {
1165
1192
  __proto__: null,
1193
+ __wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
1194
+ const ret = Error(getStringFromWasm0(arg0, arg1));
1195
+ return addHeapObject(ret);
1196
+ },
1197
+ __wbg_Number_04624de7d0e8332d: function(arg0) {
1198
+ const ret = Number(getObject(arg0));
1199
+ return ret;
1200
+ },
1201
+ __wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
1202
+ const ret = String(getObject(arg1));
1203
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1204
+ const len1 = WASM_VECTOR_LEN;
1205
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1206
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1207
+ },
1208
+ __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(arg0, arg1) {
1209
+ const v = getObject(arg1);
1210
+ const ret = typeof(v) === 'bigint' ? v : undefined;
1211
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
1212
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1213
+ },
1214
+ __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
1215
+ const v = getObject(arg0);
1216
+ const ret = typeof(v) === 'boolean' ? v : undefined;
1217
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
1218
+ },
1219
+ __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
1220
+ const ret = debugString(getObject(arg1));
1221
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1222
+ const len1 = WASM_VECTOR_LEN;
1223
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1224
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1225
+ },
1226
+ __wbg___wbindgen_in_47fa6863be6f2f25: function(arg0, arg1) {
1227
+ const ret = getObject(arg0) in getObject(arg1);
1228
+ return ret;
1229
+ },
1230
+ __wbg___wbindgen_is_bigint_31b12575b56f32fc: function(arg0) {
1231
+ const ret = typeof(getObject(arg0)) === 'bigint';
1232
+ return ret;
1233
+ },
1166
1234
  __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
1167
1235
  const ret = typeof(getObject(arg0)) === 'function';
1168
1236
  return ret;
@@ -1180,6 +1248,28 @@ function __wbg_get_imports() {
1180
1248
  const ret = getObject(arg0) === undefined;
1181
1249
  return ret;
1182
1250
  },
1251
+ __wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
1252
+ const ret = getObject(arg0) === getObject(arg1);
1253
+ return ret;
1254
+ },
1255
+ __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(arg0, arg1) {
1256
+ const ret = getObject(arg0) == getObject(arg1);
1257
+ return ret;
1258
+ },
1259
+ __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
1260
+ const obj = getObject(arg1);
1261
+ const ret = typeof(obj) === 'number' ? obj : undefined;
1262
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
1263
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
1264
+ },
1265
+ __wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
1266
+ const obj = getObject(arg1);
1267
+ const ret = typeof(obj) === 'string' ? obj : undefined;
1268
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1269
+ var len1 = WASM_VECTOR_LEN;
1270
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1271
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1272
+ },
1183
1273
  __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
1184
1274
  throw new Error(getStringFromWasm0(arg0, arg1));
1185
1275
  },
@@ -1195,13 +1285,65 @@ function __wbg_get_imports() {
1195
1285
  const ret = getObject(arg0).crypto;
1196
1286
  return addHeapObject(ret);
1197
1287
  },
1288
+ __wbg_done_57b39ecd9addfe81: function(arg0) {
1289
+ const ret = getObject(arg0).done;
1290
+ return ret;
1291
+ },
1198
1292
  __wbg_getRandomValues_b3f15fcbfabb0f8b: function() { return handleError(function (arg0, arg1) {
1199
1293
  getObject(arg0).getRandomValues(getObject(arg1));
1200
1294
  }, arguments); },
1295
+ __wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
1296
+ const ret = getObject(arg0)[arg1 >>> 0];
1297
+ return addHeapObject(ret);
1298
+ },
1299
+ __wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
1300
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
1301
+ return addHeapObject(ret);
1302
+ }, arguments); },
1303
+ __wbg_get_with_ref_key_1dc361bd10053bfe: function(arg0, arg1) {
1304
+ const ret = getObject(arg0)[getObject(arg1)];
1305
+ return addHeapObject(ret);
1306
+ },
1307
+ __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
1308
+ let result;
1309
+ try {
1310
+ result = getObject(arg0) instanceof ArrayBuffer;
1311
+ } catch (_) {
1312
+ result = false;
1313
+ }
1314
+ const ret = result;
1315
+ return ret;
1316
+ },
1317
+ __wbg_instanceof_Uint8Array_9b9075935c74707c: function(arg0) {
1318
+ let result;
1319
+ try {
1320
+ result = getObject(arg0) instanceof Uint8Array;
1321
+ } catch (_) {
1322
+ result = false;
1323
+ }
1324
+ const ret = result;
1325
+ return ret;
1326
+ },
1327
+ __wbg_isArray_d314bb98fcf08331: function(arg0) {
1328
+ const ret = Array.isArray(getObject(arg0));
1329
+ return ret;
1330
+ },
1331
+ __wbg_isSafeInteger_bfbc7332a9768d2a: function(arg0) {
1332
+ const ret = Number.isSafeInteger(getObject(arg0));
1333
+ return ret;
1334
+ },
1335
+ __wbg_iterator_6ff6560ca1568e55: function() {
1336
+ const ret = Symbol.iterator;
1337
+ return addHeapObject(ret);
1338
+ },
1201
1339
  __wbg_length_32ed9a279acd054c: function(arg0) {
1202
1340
  const ret = getObject(arg0).length;
1203
1341
  return ret;
1204
1342
  },
1343
+ __wbg_length_35a7bace40f36eac: function(arg0) {
1344
+ const ret = getObject(arg0).length;
1345
+ return ret;
1346
+ },
1205
1347
  __wbg_msCrypto_d562bbe83e0d4b91: function(arg0) {
1206
1348
  const ret = getObject(arg0).msCrypto;
1207
1349
  return addHeapObject(ret);
@@ -1210,6 +1352,14 @@ function __wbg_get_imports() {
1210
1352
  const ret = new Object();
1211
1353
  return addHeapObject(ret);
1212
1354
  },
1355
+ __wbg_new_3eb36ae241fe6f44: function() {
1356
+ const ret = new Array();
1357
+ return addHeapObject(ret);
1358
+ },
1359
+ __wbg_new_dd2b680c8bf6ae29: function(arg0) {
1360
+ const ret = new Uint8Array(getObject(arg0));
1361
+ return addHeapObject(ret);
1362
+ },
1213
1363
  __wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
1214
1364
  const ret = new Function(getStringFromWasm0(arg0, arg1));
1215
1365
  return addHeapObject(ret);
@@ -1218,6 +1368,14 @@ function __wbg_get_imports() {
1218
1368
  const ret = new Uint8Array(arg0 >>> 0);
1219
1369
  return addHeapObject(ret);
1220
1370
  },
1371
+ __wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
1372
+ const ret = getObject(arg0).next();
1373
+ return addHeapObject(ret);
1374
+ }, arguments); },
1375
+ __wbg_next_418f80d8f5303233: function(arg0) {
1376
+ const ret = getObject(arg0).next;
1377
+ return addHeapObject(ret);
1378
+ },
1221
1379
  __wbg_node_e1f24f89a7336c2e: function(arg0) {
1222
1380
  const ret = getObject(arg0).node;
1223
1381
  return addHeapObject(ret);
@@ -1236,10 +1394,16 @@ function __wbg_get_imports() {
1236
1394
  const ret = module.require;
1237
1395
  return addHeapObject(ret);
1238
1396
  }, arguments); },
1397
+ __wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
1398
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
1399
+ },
1239
1400
  __wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
1240
1401
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1241
1402
  return ret;
1242
1403
  }, arguments); },
1404
+ __wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
1405
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1406
+ },
1243
1407
  __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
1244
1408
  const ret = typeof global === 'undefined' ? null : global;
1245
1409
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
@@ -1260,21 +1424,30 @@ function __wbg_get_imports() {
1260
1424
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
1261
1425
  return addHeapObject(ret);
1262
1426
  },
1427
+ __wbg_value_0546255b415e96c1: function(arg0) {
1428
+ const ret = getObject(arg0).value;
1429
+ return addHeapObject(ret);
1430
+ },
1263
1431
  __wbg_versions_4e31226f5e8dc909: function(arg0) {
1264
1432
  const ret = getObject(arg0).versions;
1265
1433
  return addHeapObject(ret);
1266
1434
  },
1267
- __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1435
+ __wbindgen_cast_0000000000000001: function(arg0) {
1436
+ // Cast intrinsic for `F64 -> Externref`.
1437
+ const ret = arg0;
1438
+ return addHeapObject(ret);
1439
+ },
1440
+ __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1268
1441
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
1269
1442
  const ret = getArrayU8FromWasm0(arg0, arg1);
1270
1443
  return addHeapObject(ret);
1271
1444
  },
1272
- __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1445
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
1273
1446
  // Cast intrinsic for `Ref(String) -> Externref`.
1274
1447
  const ret = getStringFromWasm0(arg0, arg1);
1275
1448
  return addHeapObject(ret);
1276
1449
  },
1277
- __wbindgen_cast_0000000000000003: function(arg0) {
1450
+ __wbindgen_cast_0000000000000004: function(arg0) {
1278
1451
  // Cast intrinsic for `U64 -> Externref`.
1279
1452
  const ret = BigInt.asUintN(64, arg0);
1280
1453
  return addHeapObject(ret);
@@ -1302,6 +1475,71 @@ function addHeapObject(obj) {
1302
1475
  return idx;
1303
1476
  }
1304
1477
 
1478
+ function debugString(val) {
1479
+ // primitive types
1480
+ const type = typeof val;
1481
+ if (type == 'number' || type == 'boolean' || val == null) {
1482
+ return `${val}`;
1483
+ }
1484
+ if (type == 'string') {
1485
+ return `"${val}"`;
1486
+ }
1487
+ if (type == 'symbol') {
1488
+ const description = val.description;
1489
+ if (description == null) {
1490
+ return 'Symbol';
1491
+ } else {
1492
+ return `Symbol(${description})`;
1493
+ }
1494
+ }
1495
+ if (type == 'function') {
1496
+ const name = val.name;
1497
+ if (typeof name == 'string' && name.length > 0) {
1498
+ return `Function(${name})`;
1499
+ } else {
1500
+ return 'Function';
1501
+ }
1502
+ }
1503
+ // objects
1504
+ if (Array.isArray(val)) {
1505
+ const length = val.length;
1506
+ let debug = '[';
1507
+ if (length > 0) {
1508
+ debug += debugString(val[0]);
1509
+ }
1510
+ for(let i = 1; i < length; i++) {
1511
+ debug += ', ' + debugString(val[i]);
1512
+ }
1513
+ debug += ']';
1514
+ return debug;
1515
+ }
1516
+ // Test for built-in
1517
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
1518
+ let className;
1519
+ if (builtInMatches && builtInMatches.length > 1) {
1520
+ className = builtInMatches[1];
1521
+ } else {
1522
+ // Failed to match the standard '[object ClassName]'
1523
+ return toString.call(val);
1524
+ }
1525
+ if (className == 'Object') {
1526
+ // we're a user defined class or Object
1527
+ // JSON.stringify avoids problems with cycles, and is generally much
1528
+ // easier than looping through ownProperties of `val`.
1529
+ try {
1530
+ return 'Object(' + JSON.stringify(val) + ')';
1531
+ } catch (_) {
1532
+ return 'Object';
1533
+ }
1534
+ }
1535
+ // errors
1536
+ if (val instanceof Error) {
1537
+ return `${val.name}: ${val.message}\n${val.stack}`;
1538
+ }
1539
+ // TODO we could test for more things here, like `Set`s and `Map`s.
1540
+ return className;
1541
+ }
1542
+
1305
1543
  function dropObject(idx) {
1306
1544
  if (idx < 132) return;
1307
1545
  heap[idx] = heap_next;
@@ -1366,7 +1604,7 @@ function handleError(f, args) {
1366
1604
  try {
1367
1605
  return f.apply(this, args);
1368
1606
  } catch (e) {
1369
- wasm.__wbindgen_export(addHeapObject(e));
1607
+ wasm.__wbindgen_export3(addHeapObject(e));
1370
1608
  }
1371
1609
  }
1372
1610