@rolly-dev/wasm-signer 1.18.0 → 1.19.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.
@@ -285,6 +285,13 @@ export function goldilocks_reduce(value: bigint): bigint;
285
285
  */
286
286
  export function hash_balance_leaf(raw: BigUint64Array): BigUint64Array;
287
287
 
288
+ /**
289
+ * RTP × 100 for ALL valid Keno configs.
290
+ * Returns JS object: `{ "0_1": 9450, "0_2": 9712, ..., "2_10": 9580 }`
291
+ * Keys: `"{risk}_{pick_count}"`.
292
+ */
293
+ export function keno_all_rtp_x100(): any;
294
+
288
295
  export function keno_draw_count(): number;
289
296
 
290
297
  /**
@@ -303,6 +310,11 @@ export function keno_multiplier_table(risk: number, pick_count: number): BigUint
303
310
 
304
311
  export function keno_numbers_range(): number;
305
312
 
313
+ /**
314
+ * RTP × 100 for a Keno config (e.g. 9800 = 98.00%). Returns 0 for invalid combos.
315
+ */
316
+ export function keno_rtp_x100(risk: number, pick_count: number): bigint;
317
+
306
318
  /**
307
319
  * Limbo RTP percent (99). Canonical source for backend/frontend.
308
320
  */
@@ -326,6 +338,12 @@ export function limbo_rtp_percent(): number;
326
338
  */
327
339
  export function make_main_leaf(balance_hash: BigUint64Array, pk_hash: BigUint64Array, address_hash: BigUint64Array): BigUint64Array;
328
340
 
341
+ /**
342
+ * RTP × 100 for ALL valid Plinko configs.
343
+ * Returns JS object: `{ "0_8_normal": 9799, "1_12_extreme": 9881, ... }`
344
+ */
345
+ export function plinko_all_rtp_x100(): any;
346
+
329
347
  /**
330
348
  * Whether a (sector, rows, is_extreme) triple is a valid Plinko config.
331
349
  */
@@ -348,6 +366,11 @@ export function plinko_multiplier_table(sector: number, rows: number, is_extreme
348
366
 
349
367
  export function plinko_num_sectors(): number;
350
368
 
369
+ /**
370
+ * RTP × 100 for a Plinko config (e.g. 9799 = 97.99%). Returns 0 for invalid combos.
371
+ */
372
+ export function plinko_rtp_x100(sector: number, rows: number, is_extreme: boolean): bigint;
373
+
351
374
  /**
352
375
  * Poseidon2 hash of an arbitrary number of Goldilocks field elements.
353
376
  *
@@ -679,6 +679,18 @@ function hash_balance_leaf(raw) {
679
679
  }
680
680
  exports.hash_balance_leaf = hash_balance_leaf;
681
681
 
682
+ /**
683
+ * RTP × 100 for ALL valid Keno configs.
684
+ * Returns JS object: `{ "0_1": 9450, "0_2": 9712, ..., "2_10": 9580 }`
685
+ * Keys: `"{risk}_{pick_count}"`.
686
+ * @returns {any}
687
+ */
688
+ function keno_all_rtp_x100() {
689
+ const ret = wasm.keno_all_rtp_x100();
690
+ return takeObject(ret);
691
+ }
692
+ exports.keno_all_rtp_x100 = keno_all_rtp_x100;
693
+
682
694
  /**
683
695
  * @returns {number}
684
696
  */
@@ -741,6 +753,18 @@ function keno_numbers_range() {
741
753
  }
742
754
  exports.keno_numbers_range = keno_numbers_range;
743
755
 
756
+ /**
757
+ * RTP × 100 for a Keno config (e.g. 9800 = 98.00%). Returns 0 for invalid combos.
758
+ * @param {number} risk
759
+ * @param {number} pick_count
760
+ * @returns {bigint}
761
+ */
762
+ function keno_rtp_x100(risk, pick_count) {
763
+ const ret = wasm.keno_rtp_x100(risk, pick_count);
764
+ return BigInt.asUintN(64, ret);
765
+ }
766
+ exports.keno_rtp_x100 = keno_rtp_x100;
767
+
744
768
  /**
745
769
  * Limbo RTP percent (99). Canonical source for backend/frontend.
746
770
  * @returns {number}
@@ -792,6 +816,17 @@ function make_main_leaf(balance_hash, pk_hash, address_hash) {
792
816
  }
793
817
  exports.make_main_leaf = make_main_leaf;
794
818
 
819
+ /**
820
+ * RTP × 100 for ALL valid Plinko configs.
821
+ * Returns JS object: `{ "0_8_normal": 9799, "1_12_extreme": 9881, ... }`
822
+ * @returns {any}
823
+ */
824
+ function plinko_all_rtp_x100() {
825
+ const ret = wasm.plinko_all_rtp_x100();
826
+ return takeObject(ret);
827
+ }
828
+ exports.plinko_all_rtp_x100 = plinko_all_rtp_x100;
829
+
795
830
  /**
796
831
  * Whether a (sector, rows, is_extreme) triple is a valid Plinko config.
797
832
  * @param {number} sector
@@ -866,6 +901,19 @@ function plinko_num_sectors() {
866
901
  }
867
902
  exports.plinko_num_sectors = plinko_num_sectors;
868
903
 
904
+ /**
905
+ * RTP × 100 for a Plinko config (e.g. 9799 = 97.99%). Returns 0 for invalid combos.
906
+ * @param {number} sector
907
+ * @param {number} rows
908
+ * @param {boolean} is_extreme
909
+ * @returns {bigint}
910
+ */
911
+ function plinko_rtp_x100(sector, rows, is_extreme) {
912
+ const ret = wasm.plinko_rtp_x100(sector, rows, is_extreme);
913
+ return BigInt.asUintN(64, ret);
914
+ }
915
+ exports.plinko_rtp_x100 = plinko_rtp_x100;
916
+
869
917
  /**
870
918
  * Poseidon2 hash of an arbitrary number of Goldilocks field elements.
871
919
  *
@@ -1100,6 +1148,10 @@ function __wbg_get_imports() {
1100
1148
  const ret = getObject(arg0).msCrypto;
1101
1149
  return addHeapObject(ret);
1102
1150
  },
1151
+ __wbg_new_361308b2356cecd0: function() {
1152
+ const ret = new Object();
1153
+ return addHeapObject(ret);
1154
+ },
1103
1155
  __wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
1104
1156
  const ret = new Function(getStringFromWasm0(arg0, arg1));
1105
1157
  return addHeapObject(ret);
@@ -1126,6 +1178,10 @@ function __wbg_get_imports() {
1126
1178
  const ret = module.require;
1127
1179
  return addHeapObject(ret);
1128
1180
  }, arguments); },
1181
+ __wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
1182
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1183
+ return ret;
1184
+ }, arguments); },
1129
1185
  __wbg_static_accessor_GLOBAL_12837167ad935116: function() {
1130
1186
  const ret = typeof global === 'undefined' ? null : global;
1131
1187
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
@@ -1160,6 +1216,11 @@ function __wbg_get_imports() {
1160
1216
  const ret = getStringFromWasm0(arg0, arg1);
1161
1217
  return addHeapObject(ret);
1162
1218
  },
1219
+ __wbindgen_cast_0000000000000003: function(arg0) {
1220
+ // Cast intrinsic for `U64 -> Externref`.
1221
+ const ret = BigInt.asUintN(64, arg0);
1222
+ return addHeapObject(ret);
1223
+ },
1163
1224
  __wbindgen_object_clone_ref: function(arg0) {
1164
1225
  const ret = getObject(arg0);
1165
1226
  return addHeapObject(ret);
Binary file
@@ -27,17 +27,21 @@ export const generate_user_seed: (a: number) => void;
27
27
  export const goldilocks_fields_to_hex: (a: number, b: number, c: number) => void;
28
28
  export const goldilocks_reduce: (a: bigint) => bigint;
29
29
  export const hash_balance_leaf: (a: number, b: number, c: number) => void;
30
+ export const keno_all_rtp_x100: () => number;
30
31
  export const keno_draw_count: () => number;
31
32
  export const keno_is_valid_config: (a: number, b: number) => number;
32
33
  export const keno_multiplier_table: (a: number, b: number, c: number) => void;
33
34
  export const keno_numbers_range: () => number;
35
+ export const keno_rtp_x100: (a: number, b: number) => bigint;
34
36
  export const make_main_leaf: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
37
+ export const plinko_all_rtp_x100: () => number;
35
38
  export const plinko_is_valid_config: (a: number, b: number, c: number) => number;
36
39
  export const plinko_is_valid_rows: (a: number) => number;
37
40
  export const plinko_max_rows: () => number;
38
41
  export const plinko_min_rows: () => number;
39
42
  export const plinko_multiplier_table: (a: number, b: number, c: number, d: number) => void;
40
43
  export const plinko_num_sectors: () => number;
44
+ export const plinko_rtp_x100: (a: number, b: number, c: number) => bigint;
41
45
  export const poseidon2_hash: (a: number, b: number, c: number) => void;
42
46
  export const poseidon2_two_to_one: (a: number, b: number, c: number, d: number, e: number) => void;
43
47
  export const seed_hash_truncated: (a: number, b: number, c: number) => void;
@@ -285,6 +285,13 @@ export function goldilocks_reduce(value: bigint): bigint;
285
285
  */
286
286
  export function hash_balance_leaf(raw: BigUint64Array): BigUint64Array;
287
287
 
288
+ /**
289
+ * RTP × 100 for ALL valid Keno configs.
290
+ * Returns JS object: `{ "0_1": 9450, "0_2": 9712, ..., "2_10": 9580 }`
291
+ * Keys: `"{risk}_{pick_count}"`.
292
+ */
293
+ export function keno_all_rtp_x100(): any;
294
+
288
295
  export function keno_draw_count(): number;
289
296
 
290
297
  /**
@@ -303,6 +310,11 @@ export function keno_multiplier_table(risk: number, pick_count: number): BigUint
303
310
 
304
311
  export function keno_numbers_range(): number;
305
312
 
313
+ /**
314
+ * RTP × 100 for a Keno config (e.g. 9800 = 98.00%). Returns 0 for invalid combos.
315
+ */
316
+ export function keno_rtp_x100(risk: number, pick_count: number): bigint;
317
+
306
318
  /**
307
319
  * Limbo RTP percent (99). Canonical source for backend/frontend.
308
320
  */
@@ -326,6 +338,12 @@ export function limbo_rtp_percent(): number;
326
338
  */
327
339
  export function make_main_leaf(balance_hash: BigUint64Array, pk_hash: BigUint64Array, address_hash: BigUint64Array): BigUint64Array;
328
340
 
341
+ /**
342
+ * RTP × 100 for ALL valid Plinko configs.
343
+ * Returns JS object: `{ "0_8_normal": 9799, "1_12_extreme": 9881, ... }`
344
+ */
345
+ export function plinko_all_rtp_x100(): any;
346
+
329
347
  /**
330
348
  * Whether a (sector, rows, is_extreme) triple is a valid Plinko config.
331
349
  */
@@ -348,6 +366,11 @@ export function plinko_multiplier_table(sector: number, rows: number, is_extreme
348
366
 
349
367
  export function plinko_num_sectors(): number;
350
368
 
369
+ /**
370
+ * RTP × 100 for a Plinko config (e.g. 9799 = 97.99%). Returns 0 for invalid combos.
371
+ */
372
+ export function plinko_rtp_x100(sector: number, rows: number, is_extreme: boolean): bigint;
373
+
351
374
  /**
352
375
  * Poseidon2 hash of an arbitrary number of Goldilocks field elements.
353
376
  *