@rolly-dev/wasm-signer 1.12.0 → 1.14.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 +27 -9
- package/dist/node/rolly_wasm_signer.js +49 -13
- package/dist/node/rolly_wasm_signer_bg.wasm +0 -0
- package/dist/node/rolly_wasm_signer_bg.wasm.d.ts +6 -2
- package/dist/node-inline/rolly_wasm_signer.d.ts +27 -9
- package/dist/node-inline/rolly_wasm_signer.js +50 -14
- package/dist/node-inline/rolly_wasm_signer.mjs +47 -15
- package/dist/node-inline/rolly_wasm_signer_bg.wasm.d.ts +6 -2
- package/dist/web/rolly_wasm_signer.d.ts +33 -11
- package/dist/web/rolly_wasm_signer.js +45 -13
- package/dist/web/rolly_wasm_signer_bg.wasm +0 -0
- package/dist/web/rolly_wasm_signer_bg.wasm.d.ts +6 -2
- package/js/browser.mjs +4 -0
- package/js/index.d.ts +4 -0
- package/js/node-inline.cjs +4 -0
- package/js/node-inline.mjs +4 -0
- package/js/node.cjs +4 -0
- package/js/node.mjs +4 -0
- package/js/react.mjs +8 -0
- package/package.json +1 -1
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const amount_split: (a: number, b: bigint) => void;
|
|
5
|
+
export const coinflip_multiplier_x10000: () => number;
|
|
6
|
+
export const coinflip_rtp_percent: () => number;
|
|
5
7
|
export const compute_address_hash: (a: number, b: number, c: number) => void;
|
|
6
8
|
export const compute_drawn_keno: (a: number, b: number, c: number) => void;
|
|
7
9
|
export const compute_multi_dice: (a: number) => bigint;
|
|
8
10
|
export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
9
11
|
export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
10
12
|
export const compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
11
|
-
export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number
|
|
13
|
+
export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
12
14
|
export const compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
13
15
|
export const compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
14
16
|
export const compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
15
17
|
export const compute_roll_coinflip: (a: number, b: number) => number;
|
|
16
18
|
export const compute_roll_dice: (a: number, b: number) => number;
|
|
17
|
-
export const compute_roll_limbo: (a: number, b: number
|
|
19
|
+
export const compute_roll_limbo: (a: number, b: number) => number;
|
|
18
20
|
export const compute_roll_plinko: (a: number, b: number, c: number) => number;
|
|
19
21
|
export const compute_server_seed_hash: (a: number, b: number, c: number) => void;
|
|
20
22
|
export const compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
|
|
@@ -31,6 +33,8 @@ export const seed_hash_truncated: (a: number, b: number, c: number) => void;
|
|
|
31
33
|
export const session_public_key: (a: number, b: number, c: number, d: bigint) => void;
|
|
32
34
|
export const string_to_user_seed: (a: number, b: number, c: number) => void;
|
|
33
35
|
export const string_to_user_seed_hex: (a: number, b: number, c: number) => void;
|
|
36
|
+
export const dice_rtp_percent: () => number;
|
|
37
|
+
export const limbo_rtp_percent: () => number;
|
|
34
38
|
export const goldilocks_modulus: () => bigint;
|
|
35
39
|
export const __wbindgen_export: (a: number) => void;
|
|
36
40
|
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
@@ -12,6 +12,16 @@
|
|
|
12
12
|
*/
|
|
13
13
|
export function amount_split(amount: bigint): Uint32Array;
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
|
|
17
|
+
*/
|
|
18
|
+
export function coinflip_multiplier_x10000(): number;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* CoinFlip RTP percent (99). Canonical source for backend/frontend.
|
|
22
|
+
*/
|
|
23
|
+
export function coinflip_rtp_percent(): number;
|
|
24
|
+
|
|
15
25
|
/**
|
|
16
26
|
* Compute address_hash = Poseidon2(addr_byte_0, ..., addr_byte_19).
|
|
17
27
|
* Takes a hex address string (with or without 0x prefix), returns [u64; 4].
|
|
@@ -75,12 +85,11 @@ export function compute_payout_keno(random: BigUint64Array, bet_atomic: bigint,
|
|
|
75
85
|
*
|
|
76
86
|
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
77
87
|
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
78
|
-
* `prediction_x100`: target multiplier
|
|
79
|
-
* `rtp_numer`: RTP numerator for this bet (90–99). Stored per-bet, included in prediction_hash.
|
|
88
|
+
* `prediction_x100`: target multiplier x 100 (101..999999, i.e. 1.01x-9999.99x).
|
|
80
89
|
*
|
|
81
|
-
* Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier
|
|
90
|
+
* Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier x10000]`.
|
|
82
91
|
*/
|
|
83
|
-
export function compute_payout_limbo(random: BigUint64Array, bet_atomic: bigint, prediction_x100: number
|
|
92
|
+
export function compute_payout_limbo(random: BigUint64Array, bet_atomic: bigint, prediction_x100: number): BigUint64Array;
|
|
84
93
|
|
|
85
94
|
/**
|
|
86
95
|
* Full plinko payout computation — pure integer arithmetic, zero floats.
|
|
@@ -102,7 +111,7 @@ export function compute_payout_plinko(random: BigUint64Array, bet_atomic: bigint
|
|
|
102
111
|
* and the in-circuit `build_prediction_hash`.
|
|
103
112
|
*
|
|
104
113
|
* Semantics of p0–p2 depend on the game:
|
|
105
|
-
* Limbo: `(
|
|
114
|
+
* Limbo: `(99, prediction_x100, 0)` — RTP hardcoded at 99
|
|
106
115
|
* Dice: `(mode, pred_lo, pred_hi)`
|
|
107
116
|
* Plinko: `(sector, rows, is_extreme)`
|
|
108
117
|
* CoinFlip: `(prediction, 0, 0)`
|
|
@@ -135,13 +144,12 @@ export function compute_roll_coinflip(random: BigUint64Array): number;
|
|
|
135
144
|
export function compute_roll_dice(random: BigUint64Array): number;
|
|
136
145
|
|
|
137
146
|
/**
|
|
138
|
-
* Extract limbo result multiplier
|
|
147
|
+
* Extract limbo result multiplier x 100 from Poseidon2 random output.
|
|
139
148
|
*
|
|
140
149
|
* `random` must be exactly 4 elements.
|
|
141
|
-
*
|
|
142
|
-
* Returns the clamped multiplier × 100 (101..999999).
|
|
150
|
+
* Returns the clamped multiplier x 100 (101..999999).
|
|
143
151
|
*/
|
|
144
|
-
export function compute_roll_limbo(random: BigUint64Array
|
|
152
|
+
export function compute_roll_limbo(random: BigUint64Array): number;
|
|
145
153
|
|
|
146
154
|
/**
|
|
147
155
|
* Extract plinko bucket index from Poseidon2 random output.
|
|
@@ -195,6 +203,11 @@ export function compute_user_seed_binding(game_id: number, bet: bigint, pred_has
|
|
|
195
203
|
*/
|
|
196
204
|
export function derive_session_key(sig_bytes: Uint8Array): BigUint64Array;
|
|
197
205
|
|
|
206
|
+
/**
|
|
207
|
+
* Dice RTP percent (99). Canonical source for backend/frontend.
|
|
208
|
+
*/
|
|
209
|
+
export function dice_rtp_percent(): number;
|
|
210
|
+
|
|
198
211
|
/**
|
|
199
212
|
* Generate a cryptographically random user secret — 4 Goldilocks field elements.
|
|
200
213
|
*
|
|
@@ -263,6 +276,11 @@ export function goldilocks_reduce(value: bigint): bigint;
|
|
|
263
276
|
*/
|
|
264
277
|
export function hash_balance_leaf(raw: BigUint64Array): BigUint64Array;
|
|
265
278
|
|
|
279
|
+
/**
|
|
280
|
+
* Limbo RTP percent (99). Canonical source for backend/frontend.
|
|
281
|
+
*/
|
|
282
|
+
export function limbo_rtp_percent(): number;
|
|
283
|
+
|
|
266
284
|
/**
|
|
267
285
|
* Build a main Merkle tree leaf from balance_hash, pk_hash, and address_hash.
|
|
268
286
|
*
|
|
@@ -365,19 +383,21 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
365
383
|
export interface InitOutput {
|
|
366
384
|
readonly memory: WebAssembly.Memory;
|
|
367
385
|
readonly amount_split: (a: number, b: bigint) => void;
|
|
386
|
+
readonly coinflip_multiplier_x10000: () => number;
|
|
387
|
+
readonly coinflip_rtp_percent: () => number;
|
|
368
388
|
readonly compute_address_hash: (a: number, b: number, c: number) => void;
|
|
369
389
|
readonly compute_drawn_keno: (a: number, b: number, c: number) => void;
|
|
370
390
|
readonly compute_multi_dice: (a: number) => bigint;
|
|
371
391
|
readonly compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
372
392
|
readonly compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
373
393
|
readonly compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
374
|
-
readonly compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number
|
|
394
|
+
readonly compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
375
395
|
readonly compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
376
396
|
readonly compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
377
397
|
readonly compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
378
398
|
readonly compute_roll_coinflip: (a: number, b: number) => number;
|
|
379
399
|
readonly compute_roll_dice: (a: number, b: number) => number;
|
|
380
|
-
readonly compute_roll_limbo: (a: number, b: number
|
|
400
|
+
readonly compute_roll_limbo: (a: number, b: number) => number;
|
|
381
401
|
readonly compute_roll_plinko: (a: number, b: number, c: number) => number;
|
|
382
402
|
readonly compute_server_seed_hash: (a: number, b: number, c: number) => void;
|
|
383
403
|
readonly compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
|
|
@@ -394,6 +414,8 @@ export interface InitOutput {
|
|
|
394
414
|
readonly session_public_key: (a: number, b: number, c: number, d: bigint) => void;
|
|
395
415
|
readonly string_to_user_seed: (a: number, b: number, c: number) => void;
|
|
396
416
|
readonly string_to_user_seed_hex: (a: number, b: number, c: number) => void;
|
|
417
|
+
readonly dice_rtp_percent: () => number;
|
|
418
|
+
readonly limbo_rtp_percent: () => number;
|
|
397
419
|
readonly goldilocks_modulus: () => bigint;
|
|
398
420
|
readonly __wbindgen_export: (a: number) => void;
|
|
399
421
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
@@ -25,6 +25,24 @@ export function amount_split(amount) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
|
|
30
|
+
* @returns {number}
|
|
31
|
+
*/
|
|
32
|
+
export function coinflip_multiplier_x10000() {
|
|
33
|
+
const ret = wasm.coinflip_multiplier_x10000();
|
|
34
|
+
return ret >>> 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* CoinFlip RTP percent (99). Canonical source for backend/frontend.
|
|
39
|
+
* @returns {number}
|
|
40
|
+
*/
|
|
41
|
+
export function coinflip_rtp_percent() {
|
|
42
|
+
const ret = wasm.coinflip_rtp_percent();
|
|
43
|
+
return ret >>> 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
28
46
|
/**
|
|
29
47
|
* Compute address_hash = Poseidon2(addr_byte_0, ..., addr_byte_19).
|
|
30
48
|
* Takes a hex address string (with or without 0x prefix), returns [u64; 4].
|
|
@@ -184,22 +202,20 @@ export function compute_payout_keno(random, bet_atomic, risk, selected) {
|
|
|
184
202
|
*
|
|
185
203
|
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
186
204
|
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
187
|
-
* `prediction_x100`: target multiplier
|
|
188
|
-
* `rtp_numer`: RTP numerator for this bet (90–99). Stored per-bet, included in prediction_hash.
|
|
205
|
+
* `prediction_x100`: target multiplier x 100 (101..999999, i.e. 1.01x-9999.99x).
|
|
189
206
|
*
|
|
190
|
-
* Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier
|
|
207
|
+
* Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier x10000]`.
|
|
191
208
|
* @param {BigUint64Array} random
|
|
192
209
|
* @param {bigint} bet_atomic
|
|
193
210
|
* @param {number} prediction_x100
|
|
194
|
-
* @param {number} rtp_numer
|
|
195
211
|
* @returns {BigUint64Array}
|
|
196
212
|
*/
|
|
197
|
-
export function compute_payout_limbo(random, bet_atomic, prediction_x100
|
|
213
|
+
export function compute_payout_limbo(random, bet_atomic, prediction_x100) {
|
|
198
214
|
try {
|
|
199
215
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
200
216
|
const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
|
|
201
217
|
const len0 = WASM_VECTOR_LEN;
|
|
202
|
-
wasm.compute_payout_limbo(retptr, ptr0, len0, bet_atomic, prediction_x100
|
|
218
|
+
wasm.compute_payout_limbo(retptr, ptr0, len0, bet_atomic, prediction_x100);
|
|
203
219
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
204
220
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
205
221
|
var v2 = getArrayU64FromWasm0(r0, r1).slice();
|
|
@@ -250,7 +266,7 @@ export function compute_payout_plinko(random, bet_atomic, sector, rows, is_extre
|
|
|
250
266
|
* and the in-circuit `build_prediction_hash`.
|
|
251
267
|
*
|
|
252
268
|
* Semantics of p0–p2 depend on the game:
|
|
253
|
-
* Limbo: `(
|
|
269
|
+
* Limbo: `(99, prediction_x100, 0)` — RTP hardcoded at 99
|
|
254
270
|
* Dice: `(mode, pred_lo, pred_hi)`
|
|
255
271
|
* Plinko: `(sector, rows, is_extreme)`
|
|
256
272
|
* CoinFlip: `(prediction, 0, 0)`
|
|
@@ -333,19 +349,17 @@ export function compute_roll_dice(random) {
|
|
|
333
349
|
}
|
|
334
350
|
|
|
335
351
|
/**
|
|
336
|
-
* Extract limbo result multiplier
|
|
352
|
+
* Extract limbo result multiplier x 100 from Poseidon2 random output.
|
|
337
353
|
*
|
|
338
354
|
* `random` must be exactly 4 elements.
|
|
339
|
-
*
|
|
340
|
-
* Returns the clamped multiplier × 100 (101..999999).
|
|
355
|
+
* Returns the clamped multiplier x 100 (101..999999).
|
|
341
356
|
* @param {BigUint64Array} random
|
|
342
|
-
* @param {number} rtp_numer
|
|
343
357
|
* @returns {number}
|
|
344
358
|
*/
|
|
345
|
-
export function compute_roll_limbo(random
|
|
359
|
+
export function compute_roll_limbo(random) {
|
|
346
360
|
const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
|
|
347
361
|
const len0 = WASM_VECTOR_LEN;
|
|
348
|
-
const ret = wasm.compute_roll_limbo(ptr0, len0
|
|
362
|
+
const ret = wasm.compute_roll_limbo(ptr0, len0);
|
|
349
363
|
return ret >>> 0;
|
|
350
364
|
}
|
|
351
365
|
|
|
@@ -462,6 +476,15 @@ export function derive_session_key(sig_bytes) {
|
|
|
462
476
|
}
|
|
463
477
|
}
|
|
464
478
|
|
|
479
|
+
/**
|
|
480
|
+
* Dice RTP percent (99). Canonical source for backend/frontend.
|
|
481
|
+
* @returns {number}
|
|
482
|
+
*/
|
|
483
|
+
export function dice_rtp_percent() {
|
|
484
|
+
const ret = wasm.coinflip_rtp_percent();
|
|
485
|
+
return ret >>> 0;
|
|
486
|
+
}
|
|
487
|
+
|
|
465
488
|
/**
|
|
466
489
|
* Generate a cryptographically random user secret — 4 Goldilocks field elements.
|
|
467
490
|
*
|
|
@@ -603,6 +626,15 @@ export function hash_balance_leaf(raw) {
|
|
|
603
626
|
}
|
|
604
627
|
}
|
|
605
628
|
|
|
629
|
+
/**
|
|
630
|
+
* Limbo RTP percent (99). Canonical source for backend/frontend.
|
|
631
|
+
* @returns {number}
|
|
632
|
+
*/
|
|
633
|
+
export function limbo_rtp_percent() {
|
|
634
|
+
const ret = wasm.coinflip_rtp_percent();
|
|
635
|
+
return ret >>> 0;
|
|
636
|
+
}
|
|
637
|
+
|
|
606
638
|
/**
|
|
607
639
|
* Build a main Merkle tree leaf from balance_hash, pk_hash, and address_hash.
|
|
608
640
|
*
|
|
Binary file
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const amount_split: (a: number, b: bigint) => void;
|
|
5
|
+
export const coinflip_multiplier_x10000: () => number;
|
|
6
|
+
export const coinflip_rtp_percent: () => number;
|
|
5
7
|
export const compute_address_hash: (a: number, b: number, c: number) => void;
|
|
6
8
|
export const compute_drawn_keno: (a: number, b: number, c: number) => void;
|
|
7
9
|
export const compute_multi_dice: (a: number) => bigint;
|
|
8
10
|
export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
9
11
|
export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
10
12
|
export const compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
11
|
-
export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number
|
|
13
|
+
export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
12
14
|
export const compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
13
15
|
export const compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
14
16
|
export const compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
15
17
|
export const compute_roll_coinflip: (a: number, b: number) => number;
|
|
16
18
|
export const compute_roll_dice: (a: number, b: number) => number;
|
|
17
|
-
export const compute_roll_limbo: (a: number, b: number
|
|
19
|
+
export const compute_roll_limbo: (a: number, b: number) => number;
|
|
18
20
|
export const compute_roll_plinko: (a: number, b: number, c: number) => number;
|
|
19
21
|
export const compute_server_seed_hash: (a: number, b: number, c: number) => void;
|
|
20
22
|
export const compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
|
|
@@ -31,6 +33,8 @@ export const seed_hash_truncated: (a: number, b: number, c: number) => void;
|
|
|
31
33
|
export const session_public_key: (a: number, b: number, c: number, d: bigint) => void;
|
|
32
34
|
export const string_to_user_seed: (a: number, b: number, c: number) => void;
|
|
33
35
|
export const string_to_user_seed_hex: (a: number, b: number, c: number) => void;
|
|
36
|
+
export const dice_rtp_percent: () => number;
|
|
37
|
+
export const limbo_rtp_percent: () => number;
|
|
34
38
|
export const goldilocks_modulus: () => bigint;
|
|
35
39
|
export const __wbindgen_export: (a: number) => void;
|
|
36
40
|
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
package/js/browser.mjs
CHANGED
|
@@ -2,6 +2,8 @@ export { default as init } from '../dist/web/rolly_wasm_signer.js';
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
amount_split,
|
|
5
|
+
coinflip_multiplier_x10000,
|
|
6
|
+
coinflip_rtp_percent,
|
|
5
7
|
compute_address_hash,
|
|
6
8
|
compute_drawn_keno,
|
|
7
9
|
compute_multi_dice,
|
|
@@ -19,12 +21,14 @@ export {
|
|
|
19
21
|
compute_server_seed_hash,
|
|
20
22
|
compute_user_seed_binding,
|
|
21
23
|
derive_session_key,
|
|
24
|
+
dice_rtp_percent,
|
|
22
25
|
generate_user_secret,
|
|
23
26
|
generate_user_seed,
|
|
24
27
|
goldilocks_fields_to_hex,
|
|
25
28
|
goldilocks_modulus,
|
|
26
29
|
goldilocks_reduce,
|
|
27
30
|
hash_balance_leaf,
|
|
31
|
+
limbo_rtp_percent,
|
|
28
32
|
make_main_leaf,
|
|
29
33
|
poseidon2_hash,
|
|
30
34
|
poseidon2_two_to_one,
|
package/js/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
amount_split,
|
|
3
|
+
coinflip_multiplier_x10000,
|
|
4
|
+
coinflip_rtp_percent,
|
|
3
5
|
compute_address_hash,
|
|
4
6
|
compute_drawn_keno,
|
|
5
7
|
compute_multi_dice,
|
|
@@ -17,12 +19,14 @@ export {
|
|
|
17
19
|
compute_server_seed_hash,
|
|
18
20
|
compute_user_seed_binding,
|
|
19
21
|
derive_session_key,
|
|
22
|
+
dice_rtp_percent,
|
|
20
23
|
generate_user_secret,
|
|
21
24
|
generate_user_seed,
|
|
22
25
|
goldilocks_fields_to_hex,
|
|
23
26
|
goldilocks_modulus,
|
|
24
27
|
goldilocks_reduce,
|
|
25
28
|
hash_balance_leaf,
|
|
29
|
+
limbo_rtp_percent,
|
|
26
30
|
make_main_leaf,
|
|
27
31
|
poseidon2_hash,
|
|
28
32
|
poseidon2_two_to_one,
|
package/js/node-inline.cjs
CHANGED
|
@@ -4,6 +4,8 @@ const wasm = require('../dist/node-inline/rolly_wasm_signer.js');
|
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
amount_split: wasm.amount_split,
|
|
7
|
+
coinflip_multiplier_x10000: wasm.coinflip_multiplier_x10000,
|
|
8
|
+
coinflip_rtp_percent: wasm.coinflip_rtp_percent,
|
|
7
9
|
compute_address_hash: wasm.compute_address_hash,
|
|
8
10
|
compute_drawn_keno: wasm.compute_drawn_keno,
|
|
9
11
|
compute_multi_dice: wasm.compute_multi_dice,
|
|
@@ -21,12 +23,14 @@ module.exports = {
|
|
|
21
23
|
compute_server_seed_hash: wasm.compute_server_seed_hash,
|
|
22
24
|
compute_user_seed_binding: wasm.compute_user_seed_binding,
|
|
23
25
|
derive_session_key: wasm.derive_session_key,
|
|
26
|
+
dice_rtp_percent: wasm.dice_rtp_percent,
|
|
24
27
|
generate_user_secret: wasm.generate_user_secret,
|
|
25
28
|
generate_user_seed: wasm.generate_user_seed,
|
|
26
29
|
goldilocks_fields_to_hex: wasm.goldilocks_fields_to_hex,
|
|
27
30
|
goldilocks_modulus: wasm.goldilocks_modulus,
|
|
28
31
|
goldilocks_reduce: wasm.goldilocks_reduce,
|
|
29
32
|
hash_balance_leaf: wasm.hash_balance_leaf,
|
|
33
|
+
limbo_rtp_percent: wasm.limbo_rtp_percent,
|
|
30
34
|
make_main_leaf: wasm.make_main_leaf,
|
|
31
35
|
poseidon2_hash: wasm.poseidon2_hash,
|
|
32
36
|
poseidon2_two_to_one: wasm.poseidon2_two_to_one,
|
package/js/node-inline.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
amount_split,
|
|
3
|
+
coinflip_multiplier_x10000,
|
|
4
|
+
coinflip_rtp_percent,
|
|
3
5
|
compute_address_hash,
|
|
4
6
|
compute_drawn_keno,
|
|
5
7
|
compute_multi_dice,
|
|
@@ -17,12 +19,14 @@ export {
|
|
|
17
19
|
compute_server_seed_hash,
|
|
18
20
|
compute_user_seed_binding,
|
|
19
21
|
derive_session_key,
|
|
22
|
+
dice_rtp_percent,
|
|
20
23
|
generate_user_secret,
|
|
21
24
|
generate_user_seed,
|
|
22
25
|
goldilocks_fields_to_hex,
|
|
23
26
|
goldilocks_modulus,
|
|
24
27
|
goldilocks_reduce,
|
|
25
28
|
hash_balance_leaf,
|
|
29
|
+
limbo_rtp_percent,
|
|
26
30
|
make_main_leaf,
|
|
27
31
|
poseidon2_hash,
|
|
28
32
|
poseidon2_two_to_one,
|
package/js/node.cjs
CHANGED
|
@@ -4,6 +4,8 @@ const wasm = require('../dist/node/rolly_wasm_signer.js');
|
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
amount_split: wasm.amount_split,
|
|
7
|
+
coinflip_multiplier_x10000: wasm.coinflip_multiplier_x10000,
|
|
8
|
+
coinflip_rtp_percent: wasm.coinflip_rtp_percent,
|
|
7
9
|
compute_address_hash: wasm.compute_address_hash,
|
|
8
10
|
compute_drawn_keno: wasm.compute_drawn_keno,
|
|
9
11
|
compute_multi_dice: wasm.compute_multi_dice,
|
|
@@ -21,12 +23,14 @@ module.exports = {
|
|
|
21
23
|
compute_server_seed_hash: wasm.compute_server_seed_hash,
|
|
22
24
|
compute_user_seed_binding: wasm.compute_user_seed_binding,
|
|
23
25
|
derive_session_key: wasm.derive_session_key,
|
|
26
|
+
dice_rtp_percent: wasm.dice_rtp_percent,
|
|
24
27
|
generate_user_secret: wasm.generate_user_secret,
|
|
25
28
|
generate_user_seed: wasm.generate_user_seed,
|
|
26
29
|
goldilocks_fields_to_hex: wasm.goldilocks_fields_to_hex,
|
|
27
30
|
goldilocks_modulus: wasm.goldilocks_modulus,
|
|
28
31
|
goldilocks_reduce: wasm.goldilocks_reduce,
|
|
29
32
|
hash_balance_leaf: wasm.hash_balance_leaf,
|
|
33
|
+
limbo_rtp_percent: wasm.limbo_rtp_percent,
|
|
30
34
|
make_main_leaf: wasm.make_main_leaf,
|
|
31
35
|
poseidon2_hash: wasm.poseidon2_hash,
|
|
32
36
|
poseidon2_two_to_one: wasm.poseidon2_two_to_one,
|
package/js/node.mjs
CHANGED
|
@@ -5,6 +5,8 @@ const wasm = require('../dist/node/rolly_wasm_signer.js');
|
|
|
5
5
|
|
|
6
6
|
export const {
|
|
7
7
|
amount_split,
|
|
8
|
+
coinflip_multiplier_x10000,
|
|
9
|
+
coinflip_rtp_percent,
|
|
8
10
|
compute_address_hash,
|
|
9
11
|
compute_drawn_keno,
|
|
10
12
|
compute_multi_dice,
|
|
@@ -22,12 +24,14 @@ export const {
|
|
|
22
24
|
compute_server_seed_hash,
|
|
23
25
|
compute_user_seed_binding,
|
|
24
26
|
derive_session_key,
|
|
27
|
+
dice_rtp_percent,
|
|
25
28
|
generate_user_secret,
|
|
26
29
|
generate_user_seed,
|
|
27
30
|
goldilocks_fields_to_hex,
|
|
28
31
|
goldilocks_modulus,
|
|
29
32
|
goldilocks_reduce,
|
|
30
33
|
hash_balance_leaf,
|
|
34
|
+
limbo_rtp_percent,
|
|
31
35
|
make_main_leaf,
|
|
32
36
|
poseidon2_hash,
|
|
33
37
|
poseidon2_two_to_one,
|
package/js/react.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import init, {
|
|
3
3
|
amount_split,
|
|
4
|
+
coinflip_multiplier_x10000,
|
|
5
|
+
coinflip_rtp_percent,
|
|
4
6
|
compute_address_hash,
|
|
5
7
|
compute_drawn_keno,
|
|
6
8
|
compute_multi_dice,
|
|
@@ -18,12 +20,14 @@ import init, {
|
|
|
18
20
|
compute_server_seed_hash,
|
|
19
21
|
compute_user_seed_binding,
|
|
20
22
|
derive_session_key,
|
|
23
|
+
dice_rtp_percent,
|
|
21
24
|
generate_user_secret,
|
|
22
25
|
generate_user_seed,
|
|
23
26
|
goldilocks_fields_to_hex,
|
|
24
27
|
goldilocks_modulus,
|
|
25
28
|
goldilocks_reduce,
|
|
26
29
|
hash_balance_leaf,
|
|
30
|
+
limbo_rtp_percent,
|
|
27
31
|
make_main_leaf,
|
|
28
32
|
poseidon2_hash,
|
|
29
33
|
poseidon2_two_to_one,
|
|
@@ -45,6 +49,8 @@ function guard(fn) {
|
|
|
45
49
|
|
|
46
50
|
const fns = {
|
|
47
51
|
amount_split: guard(amount_split),
|
|
52
|
+
coinflip_multiplier_x10000: guard(coinflip_multiplier_x10000),
|
|
53
|
+
coinflip_rtp_percent: guard(coinflip_rtp_percent),
|
|
48
54
|
compute_address_hash: guard(compute_address_hash),
|
|
49
55
|
compute_drawn_keno: guard(compute_drawn_keno),
|
|
50
56
|
compute_multi_dice: guard(compute_multi_dice),
|
|
@@ -62,12 +68,14 @@ const fns = {
|
|
|
62
68
|
compute_server_seed_hash: guard(compute_server_seed_hash),
|
|
63
69
|
compute_user_seed_binding: guard(compute_user_seed_binding),
|
|
64
70
|
derive_session_key: guard(derive_session_key),
|
|
71
|
+
dice_rtp_percent: guard(dice_rtp_percent),
|
|
65
72
|
generate_user_secret: guard(generate_user_secret),
|
|
66
73
|
generate_user_seed: guard(generate_user_seed),
|
|
67
74
|
goldilocks_fields_to_hex: guard(goldilocks_fields_to_hex),
|
|
68
75
|
goldilocks_modulus: guard(goldilocks_modulus),
|
|
69
76
|
goldilocks_reduce: guard(goldilocks_reduce),
|
|
70
77
|
hash_balance_leaf: guard(hash_balance_leaf),
|
|
78
|
+
limbo_rtp_percent: guard(limbo_rtp_percent),
|
|
71
79
|
make_main_leaf: guard(make_main_leaf),
|
|
72
80
|
poseidon2_hash: guard(poseidon2_hash),
|
|
73
81
|
poseidon2_two_to_one: guard(poseidon2_two_to_one),
|