@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
|
@@ -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
|
*
|
|
@@ -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
|
|
@@ -805,6 +840,17 @@ function plinko_is_valid_config(sector, rows, is_extreme) {
|
|
|
805
840
|
}
|
|
806
841
|
exports.plinko_is_valid_config = plinko_is_valid_config;
|
|
807
842
|
|
|
843
|
+
/**
|
|
844
|
+
* Whether rows is within the valid Plinko range [8, 16].
|
|
845
|
+
* @param {number} rows
|
|
846
|
+
* @returns {boolean}
|
|
847
|
+
*/
|
|
848
|
+
function plinko_is_valid_rows(rows) {
|
|
849
|
+
const ret = wasm.plinko_is_valid_rows(rows);
|
|
850
|
+
return ret !== 0;
|
|
851
|
+
}
|
|
852
|
+
exports.plinko_is_valid_rows = plinko_is_valid_rows;
|
|
853
|
+
|
|
808
854
|
/**
|
|
809
855
|
* @returns {number}
|
|
810
856
|
*/
|
|
@@ -855,6 +901,19 @@ function plinko_num_sectors() {
|
|
|
855
901
|
}
|
|
856
902
|
exports.plinko_num_sectors = plinko_num_sectors;
|
|
857
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
|
+
|
|
858
917
|
/**
|
|
859
918
|
* Poseidon2 hash of an arbitrary number of Goldilocks field elements.
|
|
860
919
|
*
|
|
@@ -1089,6 +1148,10 @@ function __wbg_get_imports() {
|
|
|
1089
1148
|
const ret = getObject(arg0).msCrypto;
|
|
1090
1149
|
return addHeapObject(ret);
|
|
1091
1150
|
},
|
|
1151
|
+
__wbg_new_361308b2356cecd0: function() {
|
|
1152
|
+
const ret = new Object();
|
|
1153
|
+
return addHeapObject(ret);
|
|
1154
|
+
},
|
|
1092
1155
|
__wbg_new_no_args_1c7c842f08d00ebb: function(arg0, arg1) {
|
|
1093
1156
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1094
1157
|
return addHeapObject(ret);
|
|
@@ -1115,6 +1178,10 @@ function __wbg_get_imports() {
|
|
|
1115
1178
|
const ret = module.require;
|
|
1116
1179
|
return addHeapObject(ret);
|
|
1117
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); },
|
|
1118
1185
|
__wbg_static_accessor_GLOBAL_12837167ad935116: function() {
|
|
1119
1186
|
const ret = typeof global === 'undefined' ? null : global;
|
|
1120
1187
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
@@ -1149,6 +1216,11 @@ function __wbg_get_imports() {
|
|
|
1149
1216
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1150
1217
|
return addHeapObject(ret);
|
|
1151
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
|
+
},
|
|
1152
1224
|
__wbindgen_object_clone_ref: function(arg0) {
|
|
1153
1225
|
const ret = getObject(arg0);
|
|
1154
1226
|
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;
|
|
@@ -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
|
*
|