@rolly-dev/wasm-signer 1.17.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.
- package/dist/node/rolly_wasm_signer.d.ts +28 -0
- package/dist/node/rolly_wasm_signer.js +72 -0
- package/dist/node/rolly_wasm_signer_bg.wasm +0 -0
- package/dist/node/rolly_wasm_signer_bg.wasm.d.ts +5 -0
- package/dist/node-inline/rolly_wasm_signer.d.ts +28 -0
- package/dist/node-inline/rolly_wasm_signer.js +73 -1
- package/dist/node-inline/rolly_wasm_signer.mjs +69 -2
- package/dist/node-inline/rolly_wasm_signer_bg.wasm.d.ts +5 -0
- package/dist/web/rolly_wasm_signer.d.ts +33 -0
- package/dist/web/rolly_wasm_signer.js +67 -0
- package/dist/web/rolly_wasm_signer_bg.wasm +0 -0
- package/dist/web/rolly_wasm_signer_bg.wasm.d.ts +5 -0
- package/js/browser.d.mts +5 -0
- package/js/browser.mjs +5 -0
- package/js/index.d.ts +5 -0
- package/js/node-inline.cjs +5 -0
- package/js/node-inline.mjs +5 -0
- package/js/node.cjs +5 -0
- package/js/node.mjs +5 -0
- package/js/react.d.mts +5 -0
- package/js/react.mjs +10 -0
- package/package.json +1 -1
|
@@ -27,16 +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;
|
|
39
|
+
export const plinko_is_valid_rows: (a: number) => number;
|
|
36
40
|
export const plinko_max_rows: () => number;
|
|
37
41
|
export const plinko_min_rows: () => number;
|
|
38
42
|
export const plinko_multiplier_table: (a: number, b: number, c: number, d: number) => void;
|
|
39
43
|
export const plinko_num_sectors: () => number;
|
|
44
|
+
export const plinko_rtp_x100: (a: number, b: number, c: number) => bigint;
|
|
40
45
|
export const poseidon2_hash: (a: number, b: number, c: number) => void;
|
|
41
46
|
export const poseidon2_two_to_one: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
42
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,11 +338,22 @@ 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
|
*/
|
|
332
350
|
export function plinko_is_valid_config(sector: number, rows: number, is_extreme: boolean): boolean;
|
|
333
351
|
|
|
352
|
+
/**
|
|
353
|
+
* Whether rows is within the valid Plinko range [8, 16].
|
|
354
|
+
*/
|
|
355
|
+
export function plinko_is_valid_rows(rows: number): boolean;
|
|
356
|
+
|
|
334
357
|
export function plinko_max_rows(): number;
|
|
335
358
|
|
|
336
359
|
export function plinko_min_rows(): number;
|
|
@@ -343,6 +366,11 @@ export function plinko_multiplier_table(sector: number, rows: number, is_extreme
|
|
|
343
366
|
|
|
344
367
|
export function plinko_num_sectors(): number;
|
|
345
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
|
+
|
|
346
374
|
/**
|
|
347
375
|
* Poseidon2 hash of an arbitrary number of Goldilocks field elements.
|
|
348
376
|
*
|
|
@@ -452,16 +480,21 @@ export interface InitOutput {
|
|
|
452
480
|
readonly goldilocks_fields_to_hex: (a: number, b: number, c: number) => void;
|
|
453
481
|
readonly goldilocks_reduce: (a: bigint) => bigint;
|
|
454
482
|
readonly hash_balance_leaf: (a: number, b: number, c: number) => void;
|
|
483
|
+
readonly keno_all_rtp_x100: () => number;
|
|
455
484
|
readonly keno_draw_count: () => number;
|
|
456
485
|
readonly keno_is_valid_config: (a: number, b: number) => number;
|
|
457
486
|
readonly keno_multiplier_table: (a: number, b: number, c: number) => void;
|
|
458
487
|
readonly keno_numbers_range: () => number;
|
|
488
|
+
readonly keno_rtp_x100: (a: number, b: number) => bigint;
|
|
459
489
|
readonly make_main_leaf: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
490
|
+
readonly plinko_all_rtp_x100: () => number;
|
|
460
491
|
readonly plinko_is_valid_config: (a: number, b: number, c: number) => number;
|
|
492
|
+
readonly plinko_is_valid_rows: (a: number) => number;
|
|
461
493
|
readonly plinko_max_rows: () => number;
|
|
462
494
|
readonly plinko_min_rows: () => number;
|
|
463
495
|
readonly plinko_multiplier_table: (a: number, b: number, c: number, d: number) => void;
|
|
464
496
|
readonly plinko_num_sectors: () => number;
|
|
497
|
+
readonly plinko_rtp_x100: (a: number, b: number, c: number) => bigint;
|
|
465
498
|
readonly poseidon2_hash: (a: number, b: number, c: number) => void;
|
|
466
499
|
readonly poseidon2_two_to_one: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
467
500
|
readonly seed_hash_truncated: (a: number, b: number, c: number) => void;
|
|
@@ -651,6 +651,17 @@ export function hash_balance_leaf(raw) {
|
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
+
/**
|
|
655
|
+
* RTP × 100 for ALL valid Keno configs.
|
|
656
|
+
* Returns JS object: `{ "0_1": 9450, "0_2": 9712, ..., "2_10": 9580 }`
|
|
657
|
+
* Keys: `"{risk}_{pick_count}"`.
|
|
658
|
+
* @returns {any}
|
|
659
|
+
*/
|
|
660
|
+
export function keno_all_rtp_x100() {
|
|
661
|
+
const ret = wasm.keno_all_rtp_x100();
|
|
662
|
+
return takeObject(ret);
|
|
663
|
+
}
|
|
664
|
+
|
|
654
665
|
/**
|
|
655
666
|
* @returns {number}
|
|
656
667
|
*/
|
|
@@ -708,6 +719,17 @@ export function keno_numbers_range() {
|
|
|
708
719
|
return ret >>> 0;
|
|
709
720
|
}
|
|
710
721
|
|
|
722
|
+
/**
|
|
723
|
+
* RTP × 100 for a Keno config (e.g. 9800 = 98.00%). Returns 0 for invalid combos.
|
|
724
|
+
* @param {number} risk
|
|
725
|
+
* @param {number} pick_count
|
|
726
|
+
* @returns {bigint}
|
|
727
|
+
*/
|
|
728
|
+
export function keno_rtp_x100(risk, pick_count) {
|
|
729
|
+
const ret = wasm.keno_rtp_x100(risk, pick_count);
|
|
730
|
+
return BigInt.asUintN(64, ret);
|
|
731
|
+
}
|
|
732
|
+
|
|
711
733
|
/**
|
|
712
734
|
* Limbo RTP percent (99). Canonical source for backend/frontend.
|
|
713
735
|
* @returns {number}
|
|
@@ -757,6 +779,16 @@ export function make_main_leaf(balance_hash, pk_hash, address_hash) {
|
|
|
757
779
|
}
|
|
758
780
|
}
|
|
759
781
|
|
|
782
|
+
/**
|
|
783
|
+
* RTP × 100 for ALL valid Plinko configs.
|
|
784
|
+
* Returns JS object: `{ "0_8_normal": 9799, "1_12_extreme": 9881, ... }`
|
|
785
|
+
* @returns {any}
|
|
786
|
+
*/
|
|
787
|
+
export function plinko_all_rtp_x100() {
|
|
788
|
+
const ret = wasm.plinko_all_rtp_x100();
|
|
789
|
+
return takeObject(ret);
|
|
790
|
+
}
|
|
791
|
+
|
|
760
792
|
/**
|
|
761
793
|
* Whether a (sector, rows, is_extreme) triple is a valid Plinko config.
|
|
762
794
|
* @param {number} sector
|
|
@@ -769,6 +801,16 @@ export function plinko_is_valid_config(sector, rows, is_extreme) {
|
|
|
769
801
|
return ret !== 0;
|
|
770
802
|
}
|
|
771
803
|
|
|
804
|
+
/**
|
|
805
|
+
* Whether rows is within the valid Plinko range [8, 16].
|
|
806
|
+
* @param {number} rows
|
|
807
|
+
* @returns {boolean}
|
|
808
|
+
*/
|
|
809
|
+
export function plinko_is_valid_rows(rows) {
|
|
810
|
+
const ret = wasm.plinko_is_valid_rows(rows);
|
|
811
|
+
return ret !== 0;
|
|
812
|
+
}
|
|
813
|
+
|
|
772
814
|
/**
|
|
773
815
|
* @returns {number}
|
|
774
816
|
*/
|
|
@@ -815,6 +857,18 @@ export function plinko_num_sectors() {
|
|
|
815
857
|
return ret;
|
|
816
858
|
}
|
|
817
859
|
|
|
860
|
+
/**
|
|
861
|
+
* RTP × 100 for a Plinko config (e.g. 9799 = 97.99%). Returns 0 for invalid combos.
|
|
862
|
+
* @param {number} sector
|
|
863
|
+
* @param {number} rows
|
|
864
|
+
* @param {boolean} is_extreme
|
|
865
|
+
* @returns {bigint}
|
|
866
|
+
*/
|
|
867
|
+
export function plinko_rtp_x100(sector, rows, is_extreme) {
|
|
868
|
+
const ret = wasm.plinko_rtp_x100(sector, rows, is_extreme);
|
|
869
|
+
return BigInt.asUintN(64, ret);
|
|
870
|
+
}
|
|
871
|
+
|
|
818
872
|
/**
|
|
819
873
|
* Poseidon2 hash of an arbitrary number of Goldilocks field elements.
|
|
820
874
|
*
|
|
@@ -1043,6 +1097,10 @@ function __wbg_get_imports() {
|
|
|
1043
1097
|
const ret = getObject(arg0).msCrypto;
|
|
1044
1098
|
return addHeapObject(ret);
|
|
1045
1099
|
},
|
|
1100
|
+
__wbg_new_361308b2356cecd0: function() {
|
|
1101
|
+
const ret = new Object();
|
|
1102
|
+
return addHeapObject(ret);
|
|
1103
|
+
},
|
|
1046
1104
|
__wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
|
|
1047
1105
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1048
1106
|
return addHeapObject(ret);
|
|
@@ -1069,6 +1127,10 @@ function __wbg_get_imports() {
|
|
|
1069
1127
|
const ret = module.require;
|
|
1070
1128
|
return addHeapObject(ret);
|
|
1071
1129
|
}, arguments); },
|
|
1130
|
+
__wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1131
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1132
|
+
return ret;
|
|
1133
|
+
}, arguments); },
|
|
1072
1134
|
__wbg_static_accessor_GLOBAL_12837167ad935116: function() {
|
|
1073
1135
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1074
1136
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
@@ -1103,6 +1165,11 @@ function __wbg_get_imports() {
|
|
|
1103
1165
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1104
1166
|
return addHeapObject(ret);
|
|
1105
1167
|
},
|
|
1168
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
1169
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
1170
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1171
|
+
return addHeapObject(ret);
|
|
1172
|
+
},
|
|
1106
1173
|
__wbindgen_object_clone_ref: function(arg0) {
|
|
1107
1174
|
const ret = getObject(arg0);
|
|
1108
1175
|
return addHeapObject(ret);
|
|
Binary file
|
|
@@ -27,16 +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;
|
|
39
|
+
export const plinko_is_valid_rows: (a: number) => number;
|
|
36
40
|
export const plinko_max_rows: () => number;
|
|
37
41
|
export const plinko_min_rows: () => number;
|
|
38
42
|
export const plinko_multiplier_table: (a: number, b: number, c: number, d: number) => void;
|
|
39
43
|
export const plinko_num_sectors: () => number;
|
|
44
|
+
export const plinko_rtp_x100: (a: number, b: number, c: number) => bigint;
|
|
40
45
|
export const poseidon2_hash: (a: number, b: number, c: number) => void;
|
|
41
46
|
export const poseidon2_two_to_one: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
42
47
|
export const seed_hash_truncated: (a: number, b: number, c: number) => void;
|
package/js/browser.d.mts
CHANGED
|
@@ -23,11 +23,16 @@ export {
|
|
|
23
23
|
plinko_num_sectors,
|
|
24
24
|
plinko_multiplier_table,
|
|
25
25
|
plinko_is_valid_config,
|
|
26
|
+
plinko_is_valid_rows,
|
|
27
|
+
plinko_rtp_x100,
|
|
28
|
+
plinko_all_rtp_x100,
|
|
26
29
|
keno_numbers_range,
|
|
27
30
|
keno_draw_count,
|
|
28
31
|
keno_max_picks,
|
|
29
32
|
keno_multiplier_table,
|
|
30
33
|
keno_is_valid_config,
|
|
34
|
+
keno_rtp_x100,
|
|
35
|
+
keno_all_rtp_x100,
|
|
31
36
|
} from '../dist/web/rolly_wasm_signer.js';
|
|
32
37
|
|
|
33
38
|
export { default as init } from '../dist/web/rolly_wasm_signer.js';
|
package/js/browser.mjs
CHANGED
|
@@ -29,18 +29,23 @@ export {
|
|
|
29
29
|
goldilocks_modulus,
|
|
30
30
|
goldilocks_reduce,
|
|
31
31
|
hash_balance_leaf,
|
|
32
|
+
keno_all_rtp_x100,
|
|
32
33
|
keno_draw_count,
|
|
33
34
|
keno_is_valid_config,
|
|
34
35
|
keno_max_picks,
|
|
35
36
|
keno_multiplier_table,
|
|
36
37
|
keno_numbers_range,
|
|
38
|
+
keno_rtp_x100,
|
|
37
39
|
limbo_rtp_percent,
|
|
38
40
|
make_main_leaf,
|
|
41
|
+
plinko_all_rtp_x100,
|
|
39
42
|
plinko_is_valid_config,
|
|
43
|
+
plinko_is_valid_rows,
|
|
40
44
|
plinko_max_rows,
|
|
41
45
|
plinko_min_rows,
|
|
42
46
|
plinko_multiplier_table,
|
|
43
47
|
plinko_num_sectors,
|
|
48
|
+
plinko_rtp_x100,
|
|
44
49
|
poseidon2_hash,
|
|
45
50
|
poseidon2_two_to_one,
|
|
46
51
|
seed_hash_truncated,
|
package/js/index.d.ts
CHANGED
|
@@ -27,18 +27,23 @@ export {
|
|
|
27
27
|
goldilocks_modulus,
|
|
28
28
|
goldilocks_reduce,
|
|
29
29
|
hash_balance_leaf,
|
|
30
|
+
keno_all_rtp_x100,
|
|
30
31
|
keno_draw_count,
|
|
31
32
|
keno_is_valid_config,
|
|
32
33
|
keno_max_picks,
|
|
33
34
|
keno_multiplier_table,
|
|
34
35
|
keno_numbers_range,
|
|
36
|
+
keno_rtp_x100,
|
|
35
37
|
limbo_rtp_percent,
|
|
36
38
|
make_main_leaf,
|
|
39
|
+
plinko_all_rtp_x100,
|
|
37
40
|
plinko_is_valid_config,
|
|
41
|
+
plinko_is_valid_rows,
|
|
38
42
|
plinko_max_rows,
|
|
39
43
|
plinko_min_rows,
|
|
40
44
|
plinko_multiplier_table,
|
|
41
45
|
plinko_num_sectors,
|
|
46
|
+
plinko_rtp_x100,
|
|
42
47
|
poseidon2_hash,
|
|
43
48
|
poseidon2_two_to_one,
|
|
44
49
|
seed_hash_truncated,
|
package/js/node-inline.cjs
CHANGED
|
@@ -31,18 +31,23 @@ module.exports = {
|
|
|
31
31
|
goldilocks_modulus: wasm.goldilocks_modulus,
|
|
32
32
|
goldilocks_reduce: wasm.goldilocks_reduce,
|
|
33
33
|
hash_balance_leaf: wasm.hash_balance_leaf,
|
|
34
|
+
keno_all_rtp_x100: wasm.keno_all_rtp_x100,
|
|
34
35
|
keno_draw_count: wasm.keno_draw_count,
|
|
35
36
|
keno_is_valid_config: wasm.keno_is_valid_config,
|
|
36
37
|
keno_max_picks: wasm.keno_max_picks,
|
|
37
38
|
keno_multiplier_table: wasm.keno_multiplier_table,
|
|
38
39
|
keno_numbers_range: wasm.keno_numbers_range,
|
|
40
|
+
keno_rtp_x100: wasm.keno_rtp_x100,
|
|
39
41
|
limbo_rtp_percent: wasm.limbo_rtp_percent,
|
|
40
42
|
make_main_leaf: wasm.make_main_leaf,
|
|
43
|
+
plinko_all_rtp_x100: wasm.plinko_all_rtp_x100,
|
|
41
44
|
plinko_is_valid_config: wasm.plinko_is_valid_config,
|
|
45
|
+
plinko_is_valid_rows: wasm.plinko_is_valid_rows,
|
|
42
46
|
plinko_max_rows: wasm.plinko_max_rows,
|
|
43
47
|
plinko_min_rows: wasm.plinko_min_rows,
|
|
44
48
|
plinko_multiplier_table: wasm.plinko_multiplier_table,
|
|
45
49
|
plinko_num_sectors: wasm.plinko_num_sectors,
|
|
50
|
+
plinko_rtp_x100: wasm.plinko_rtp_x100,
|
|
46
51
|
poseidon2_hash: wasm.poseidon2_hash,
|
|
47
52
|
poseidon2_two_to_one: wasm.poseidon2_two_to_one,
|
|
48
53
|
seed_hash_truncated: wasm.seed_hash_truncated,
|
package/js/node-inline.mjs
CHANGED
|
@@ -27,18 +27,23 @@ export {
|
|
|
27
27
|
goldilocks_modulus,
|
|
28
28
|
goldilocks_reduce,
|
|
29
29
|
hash_balance_leaf,
|
|
30
|
+
keno_all_rtp_x100,
|
|
30
31
|
keno_draw_count,
|
|
31
32
|
keno_is_valid_config,
|
|
32
33
|
keno_max_picks,
|
|
33
34
|
keno_multiplier_table,
|
|
34
35
|
keno_numbers_range,
|
|
36
|
+
keno_rtp_x100,
|
|
35
37
|
limbo_rtp_percent,
|
|
36
38
|
make_main_leaf,
|
|
39
|
+
plinko_all_rtp_x100,
|
|
37
40
|
plinko_is_valid_config,
|
|
41
|
+
plinko_is_valid_rows,
|
|
38
42
|
plinko_max_rows,
|
|
39
43
|
plinko_min_rows,
|
|
40
44
|
plinko_multiplier_table,
|
|
41
45
|
plinko_num_sectors,
|
|
46
|
+
plinko_rtp_x100,
|
|
42
47
|
poseidon2_hash,
|
|
43
48
|
poseidon2_two_to_one,
|
|
44
49
|
seed_hash_truncated,
|
package/js/node.cjs
CHANGED
|
@@ -31,18 +31,23 @@ module.exports = {
|
|
|
31
31
|
goldilocks_modulus: wasm.goldilocks_modulus,
|
|
32
32
|
goldilocks_reduce: wasm.goldilocks_reduce,
|
|
33
33
|
hash_balance_leaf: wasm.hash_balance_leaf,
|
|
34
|
+
keno_all_rtp_x100: wasm.keno_all_rtp_x100,
|
|
34
35
|
keno_draw_count: wasm.keno_draw_count,
|
|
35
36
|
keno_is_valid_config: wasm.keno_is_valid_config,
|
|
36
37
|
keno_max_picks: wasm.keno_max_picks,
|
|
37
38
|
keno_multiplier_table: wasm.keno_multiplier_table,
|
|
38
39
|
keno_numbers_range: wasm.keno_numbers_range,
|
|
40
|
+
keno_rtp_x100: wasm.keno_rtp_x100,
|
|
39
41
|
limbo_rtp_percent: wasm.limbo_rtp_percent,
|
|
40
42
|
make_main_leaf: wasm.make_main_leaf,
|
|
43
|
+
plinko_all_rtp_x100: wasm.plinko_all_rtp_x100,
|
|
41
44
|
plinko_is_valid_config: wasm.plinko_is_valid_config,
|
|
45
|
+
plinko_is_valid_rows: wasm.plinko_is_valid_rows,
|
|
42
46
|
plinko_max_rows: wasm.plinko_max_rows,
|
|
43
47
|
plinko_min_rows: wasm.plinko_min_rows,
|
|
44
48
|
plinko_multiplier_table: wasm.plinko_multiplier_table,
|
|
45
49
|
plinko_num_sectors: wasm.plinko_num_sectors,
|
|
50
|
+
plinko_rtp_x100: wasm.plinko_rtp_x100,
|
|
46
51
|
poseidon2_hash: wasm.poseidon2_hash,
|
|
47
52
|
poseidon2_two_to_one: wasm.poseidon2_two_to_one,
|
|
48
53
|
seed_hash_truncated: wasm.seed_hash_truncated,
|
package/js/node.mjs
CHANGED
|
@@ -32,18 +32,23 @@ export const {
|
|
|
32
32
|
goldilocks_modulus,
|
|
33
33
|
goldilocks_reduce,
|
|
34
34
|
hash_balance_leaf,
|
|
35
|
+
keno_all_rtp_x100,
|
|
35
36
|
keno_draw_count,
|
|
36
37
|
keno_is_valid_config,
|
|
37
38
|
keno_max_picks,
|
|
38
39
|
keno_multiplier_table,
|
|
39
40
|
keno_numbers_range,
|
|
41
|
+
keno_rtp_x100,
|
|
40
42
|
limbo_rtp_percent,
|
|
41
43
|
make_main_leaf,
|
|
44
|
+
plinko_all_rtp_x100,
|
|
42
45
|
plinko_is_valid_config,
|
|
46
|
+
plinko_is_valid_rows,
|
|
43
47
|
plinko_max_rows,
|
|
44
48
|
plinko_min_rows,
|
|
45
49
|
plinko_multiplier_table,
|
|
46
50
|
plinko_num_sectors,
|
|
51
|
+
plinko_rtp_x100,
|
|
47
52
|
poseidon2_hash,
|
|
48
53
|
poseidon2_two_to_one,
|
|
49
54
|
seed_hash_truncated,
|
package/js/react.d.mts
CHANGED
|
@@ -41,11 +41,16 @@ export interface RollyWasmResult {
|
|
|
41
41
|
plinko_num_sectors: () => number;
|
|
42
42
|
plinko_multiplier_table: (sector: number, rows: number, is_extreme: boolean) => BigUint64Array;
|
|
43
43
|
plinko_is_valid_config: (sector: number, rows: number, is_extreme: boolean) => boolean;
|
|
44
|
+
plinko_is_valid_rows: (rows: number) => boolean;
|
|
45
|
+
plinko_rtp_x100: (sector: number, rows: number, is_extreme: boolean) => bigint;
|
|
46
|
+
plinko_all_rtp_x100: () => Record<string, bigint>;
|
|
44
47
|
keno_numbers_range: () => number;
|
|
45
48
|
keno_draw_count: () => number;
|
|
46
49
|
keno_max_picks: () => number;
|
|
47
50
|
keno_multiplier_table: (risk: number, pick_count: number) => BigUint64Array;
|
|
48
51
|
keno_is_valid_config: (risk: number, pick_count: number) => boolean;
|
|
52
|
+
keno_rtp_x100: (risk: number, pick_count: number) => bigint;
|
|
53
|
+
keno_all_rtp_x100: () => Record<string, bigint>;
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
export function useRollyWasm(): RollyWasmResult;
|
package/js/react.mjs
CHANGED
|
@@ -28,18 +28,23 @@ import init, {
|
|
|
28
28
|
goldilocks_modulus,
|
|
29
29
|
goldilocks_reduce,
|
|
30
30
|
hash_balance_leaf,
|
|
31
|
+
keno_all_rtp_x100,
|
|
31
32
|
keno_draw_count,
|
|
32
33
|
keno_is_valid_config,
|
|
33
34
|
keno_max_picks,
|
|
34
35
|
keno_multiplier_table,
|
|
35
36
|
keno_numbers_range,
|
|
37
|
+
keno_rtp_x100,
|
|
36
38
|
limbo_rtp_percent,
|
|
37
39
|
make_main_leaf,
|
|
40
|
+
plinko_all_rtp_x100,
|
|
38
41
|
plinko_is_valid_config,
|
|
42
|
+
plinko_is_valid_rows,
|
|
39
43
|
plinko_max_rows,
|
|
40
44
|
plinko_min_rows,
|
|
41
45
|
plinko_multiplier_table,
|
|
42
46
|
plinko_num_sectors,
|
|
47
|
+
plinko_rtp_x100,
|
|
43
48
|
poseidon2_hash,
|
|
44
49
|
poseidon2_two_to_one,
|
|
45
50
|
seed_hash_truncated,
|
|
@@ -87,18 +92,23 @@ const fns = {
|
|
|
87
92
|
goldilocks_modulus: guard(goldilocks_modulus),
|
|
88
93
|
goldilocks_reduce: guard(goldilocks_reduce),
|
|
89
94
|
hash_balance_leaf: guard(hash_balance_leaf),
|
|
95
|
+
keno_all_rtp_x100: guard(keno_all_rtp_x100),
|
|
90
96
|
keno_draw_count: guard(keno_draw_count),
|
|
91
97
|
keno_is_valid_config: guard(keno_is_valid_config),
|
|
92
98
|
keno_max_picks: guard(keno_max_picks),
|
|
93
99
|
keno_multiplier_table: guard(keno_multiplier_table),
|
|
94
100
|
keno_numbers_range: guard(keno_numbers_range),
|
|
101
|
+
keno_rtp_x100: guard(keno_rtp_x100),
|
|
95
102
|
limbo_rtp_percent: guard(limbo_rtp_percent),
|
|
96
103
|
make_main_leaf: guard(make_main_leaf),
|
|
104
|
+
plinko_all_rtp_x100: guard(plinko_all_rtp_x100),
|
|
97
105
|
plinko_is_valid_config: guard(plinko_is_valid_config),
|
|
106
|
+
plinko_is_valid_rows: guard(plinko_is_valid_rows),
|
|
98
107
|
plinko_max_rows: guard(plinko_max_rows),
|
|
99
108
|
plinko_min_rows: guard(plinko_min_rows),
|
|
100
109
|
plinko_multiplier_table: guard(plinko_multiplier_table),
|
|
101
110
|
plinko_num_sectors: guard(plinko_num_sectors),
|
|
111
|
+
plinko_rtp_x100: guard(plinko_rtp_x100),
|
|
102
112
|
poseidon2_hash: guard(poseidon2_hash),
|
|
103
113
|
poseidon2_two_to_one: guard(poseidon2_two_to_one),
|
|
104
114
|
seed_hash_truncated: guard(seed_hash_truncated),
|