@rolly-dev/wasm-signer 2.0.0 → 2.1.0-dev.1
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 +29 -2
- package/dist/node/rolly_wasm_signer.js +75 -2
- 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 +29 -2
- package/dist/node-inline/rolly_wasm_signer.js +76 -3
- package/dist/node-inline/rolly_wasm_signer.mjs +72 -4
- package/dist/node-inline/rolly_wasm_signer_bg.wasm.d.ts +5 -0
- package/dist/web/rolly_wasm_signer.d.ts +34 -2
- package/dist/web/rolly_wasm_signer.js +70 -2
- 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.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.mjs +10 -0
- package/package.json +1 -1
|
@@ -75,6 +75,11 @@ export function compute_address_hash(address_hex: string): BigUint64Array;
|
|
|
75
75
|
*/
|
|
76
76
|
export function compute_aviato_point(random: BigUint64Array): number;
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Power Boost Boost for a bet: `[boost_rng, boost]`, `boost_rng = random[1] % 10000`.
|
|
80
|
+
*/
|
|
81
|
+
export function compute_boost_dice(random: BigUint64Array): BigUint64Array;
|
|
82
|
+
|
|
78
83
|
/**
|
|
79
84
|
* Extract crash point (×100) from raw server seed fields.
|
|
80
85
|
*
|
|
@@ -168,10 +173,12 @@ export function compute_payout_crash(random: BigUint64Array, bet_atomic: bigint,
|
|
|
168
173
|
*
|
|
169
174
|
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
170
175
|
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
171
|
-
* `game_mode`: 0=Under, 1=Over, 2=In, 3=Out.
|
|
176
|
+
* `game_mode`: 0=Under, 1=Over, 2=In, 3=Out; 4..7 = the same in Power Boost.
|
|
177
|
+
* `bet_atomic`: the debited stake — for Power Boost the Total Bet (Bet Amount × 100).
|
|
172
178
|
* `prediction_lo` / `prediction_hi`: prediction range bounds (0..999).
|
|
173
179
|
*
|
|
174
|
-
* Returns `BigUint64Array
|
|
180
|
+
* Returns `BigUint64Array`: `[win_amount, roll_number, is_win (0|1), multiplier×10000]`;
|
|
181
|
+
* Power Boost appends `[boost_rng, boost]` (multiplier stays the base one).
|
|
175
182
|
*/
|
|
176
183
|
export function compute_payout_dice(random: BigUint64Array, bet_atomic: bigint, game_mode: number, prediction_lo: number, prediction_hi: number): BigUint64Array;
|
|
177
184
|
|
|
@@ -315,6 +322,26 @@ export function crash_rtp_percent(): number;
|
|
|
315
322
|
*/
|
|
316
323
|
export function derive_session_key(sig_bytes: Uint8Array): BigUint64Array;
|
|
317
324
|
|
|
325
|
+
/**
|
|
326
|
+
* Power Boost table flattened as `[rng_lo, rng_hi, boost, ...]` (inclusive ranges).
|
|
327
|
+
*/
|
|
328
|
+
export function dice_boost_table(): BigUint64Array;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Dice `game_mode = direction + dice_directions_count() × variant` (classic 0, Power Boost 1).
|
|
332
|
+
*/
|
|
333
|
+
export function dice_directions_count(): number;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Power Boost cost: Total Bet = Bet Amount × this (100).
|
|
337
|
+
*/
|
|
338
|
+
export function dice_power_boost_cost(): bigint;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Largest Power Boost Bet Amount accepted on-chain, atomic units.
|
|
342
|
+
*/
|
|
343
|
+
export function dice_power_boost_max_bet_atomic(): bigint;
|
|
344
|
+
|
|
318
345
|
/**
|
|
319
346
|
* Dice RTP percent (99). Canonical source for backend/frontend.
|
|
320
347
|
*/
|
|
@@ -166,6 +166,28 @@ function compute_aviato_point(random) {
|
|
|
166
166
|
}
|
|
167
167
|
exports.compute_aviato_point = compute_aviato_point;
|
|
168
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Power Boost Boost for a bet: `[boost_rng, boost]`, `boost_rng = random[1] % 10000`.
|
|
171
|
+
* @param {BigUint64Array} random
|
|
172
|
+
* @returns {BigUint64Array}
|
|
173
|
+
*/
|
|
174
|
+
function compute_boost_dice(random) {
|
|
175
|
+
try {
|
|
176
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
177
|
+
const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export);
|
|
178
|
+
const len0 = WASM_VECTOR_LEN;
|
|
179
|
+
wasm.compute_boost_dice(retptr, ptr0, len0);
|
|
180
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
181
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
182
|
+
var v2 = getArrayU64FromWasm0(r0, r1).slice();
|
|
183
|
+
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
184
|
+
return v2;
|
|
185
|
+
} finally {
|
|
186
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
exports.compute_boost_dice = compute_boost_dice;
|
|
190
|
+
|
|
169
191
|
/**
|
|
170
192
|
* Extract crash point (×100) from raw server seed fields.
|
|
171
193
|
*
|
|
@@ -372,10 +394,12 @@ exports.compute_payout_crash = compute_payout_crash;
|
|
|
372
394
|
*
|
|
373
395
|
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
374
396
|
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
375
|
-
* `game_mode`: 0=Under, 1=Over, 2=In, 3=Out.
|
|
397
|
+
* `game_mode`: 0=Under, 1=Over, 2=In, 3=Out; 4..7 = the same in Power Boost.
|
|
398
|
+
* `bet_atomic`: the debited stake — for Power Boost the Total Bet (Bet Amount × 100).
|
|
376
399
|
* `prediction_lo` / `prediction_hi`: prediction range bounds (0..999).
|
|
377
400
|
*
|
|
378
|
-
* Returns `BigUint64Array
|
|
401
|
+
* Returns `BigUint64Array`: `[win_amount, roll_number, is_win (0|1), multiplier×10000]`;
|
|
402
|
+
* Power Boost appends `[boost_rng, boost]` (multiplier stays the base one).
|
|
379
403
|
* @param {BigUint64Array} random
|
|
380
404
|
* @param {bigint} bet_atomic
|
|
381
405
|
* @param {number} game_mode
|
|
@@ -734,6 +758,55 @@ function derive_session_key(sig_bytes) {
|
|
|
734
758
|
}
|
|
735
759
|
exports.derive_session_key = derive_session_key;
|
|
736
760
|
|
|
761
|
+
/**
|
|
762
|
+
* Power Boost table flattened as `[rng_lo, rng_hi, boost, ...]` (inclusive ranges).
|
|
763
|
+
* @returns {BigUint64Array}
|
|
764
|
+
*/
|
|
765
|
+
function dice_boost_table() {
|
|
766
|
+
try {
|
|
767
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
768
|
+
wasm.dice_boost_table(retptr);
|
|
769
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
770
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
771
|
+
var v1 = getArrayU64FromWasm0(r0, r1).slice();
|
|
772
|
+
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
773
|
+
return v1;
|
|
774
|
+
} finally {
|
|
775
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
exports.dice_boost_table = dice_boost_table;
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Dice `game_mode = direction + dice_directions_count() × variant` (classic 0, Power Boost 1).
|
|
782
|
+
* @returns {number}
|
|
783
|
+
*/
|
|
784
|
+
function dice_directions_count() {
|
|
785
|
+
const ret = wasm.dice_directions_count();
|
|
786
|
+
return ret >>> 0;
|
|
787
|
+
}
|
|
788
|
+
exports.dice_directions_count = dice_directions_count;
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Power Boost cost: Total Bet = Bet Amount × this (100).
|
|
792
|
+
* @returns {bigint}
|
|
793
|
+
*/
|
|
794
|
+
function dice_power_boost_cost() {
|
|
795
|
+
const ret = wasm.dice_power_boost_cost();
|
|
796
|
+
return BigInt.asUintN(64, ret);
|
|
797
|
+
}
|
|
798
|
+
exports.dice_power_boost_cost = dice_power_boost_cost;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* Largest Power Boost Bet Amount accepted on-chain, atomic units.
|
|
802
|
+
* @returns {bigint}
|
|
803
|
+
*/
|
|
804
|
+
function dice_power_boost_max_bet_atomic() {
|
|
805
|
+
const ret = wasm.dice_power_boost_max_bet_atomic();
|
|
806
|
+
return BigInt.asUintN(64, ret);
|
|
807
|
+
}
|
|
808
|
+
exports.dice_power_boost_max_bet_atomic = dice_power_boost_max_bet_atomic;
|
|
809
|
+
|
|
737
810
|
/**
|
|
738
811
|
* Dice RTP percent (99). Canonical source for backend/frontend.
|
|
739
812
|
* @returns {number}
|
|
Binary file
|
|
@@ -8,6 +8,7 @@ export const blackjack_pack_actions: (a: number, b: number, c: number) => void;
|
|
|
8
8
|
export const coinflip_multiplier_x10000: () => number;
|
|
9
9
|
export const compute_address_hash: (a: number, b: number, c: number) => void;
|
|
10
10
|
export const compute_aviato_point: (a: number, b: number) => number;
|
|
11
|
+
export const compute_boost_dice: (a: number, b: number, c: number) => void;
|
|
11
12
|
export const compute_crash_point: (a: number, b: number) => number;
|
|
12
13
|
export const compute_drawn_keno: (a: number, b: number, c: number) => void;
|
|
13
14
|
export const compute_multi_dice: (a: number) => bigint;
|
|
@@ -28,6 +29,8 @@ export const compute_roll_plinko: (a: number, b: number, c: number) => number;
|
|
|
28
29
|
export const compute_server_seed_hash: (a: number, b: number, c: number) => void;
|
|
29
30
|
export const compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
|
|
30
31
|
export const derive_session_key: (a: number, b: number, c: number) => void;
|
|
32
|
+
export const dice_boost_table: (a: number) => void;
|
|
33
|
+
export const dice_directions_count: () => number;
|
|
31
34
|
export const encode_keno_selected: (a: number, b: number, c: number) => void;
|
|
32
35
|
export const generate_user_secret: (a: number) => void;
|
|
33
36
|
export const generate_user_seed: (a: number) => void;
|
|
@@ -61,6 +64,8 @@ export const coinflip_rtp_percent: () => number;
|
|
|
61
64
|
export const crash_rtp_percent: () => number;
|
|
62
65
|
export const dice_rtp_percent: () => number;
|
|
63
66
|
export const keno_max_picks: () => number;
|
|
67
|
+
export const dice_power_boost_cost: () => bigint;
|
|
68
|
+
export const dice_power_boost_max_bet_atomic: () => bigint;
|
|
64
69
|
export const goldilocks_modulus: () => bigint;
|
|
65
70
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
66
71
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
@@ -75,6 +75,11 @@ export function compute_address_hash(address_hex: string): BigUint64Array;
|
|
|
75
75
|
*/
|
|
76
76
|
export function compute_aviato_point(random: BigUint64Array): number;
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Power Boost Boost for a bet: `[boost_rng, boost]`, `boost_rng = random[1] % 10000`.
|
|
80
|
+
*/
|
|
81
|
+
export function compute_boost_dice(random: BigUint64Array): BigUint64Array;
|
|
82
|
+
|
|
78
83
|
/**
|
|
79
84
|
* Extract crash point (×100) from raw server seed fields.
|
|
80
85
|
*
|
|
@@ -168,10 +173,12 @@ export function compute_payout_crash(random: BigUint64Array, bet_atomic: bigint,
|
|
|
168
173
|
*
|
|
169
174
|
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
170
175
|
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
171
|
-
* `game_mode`: 0=Under, 1=Over, 2=In, 3=Out.
|
|
176
|
+
* `game_mode`: 0=Under, 1=Over, 2=In, 3=Out; 4..7 = the same in Power Boost.
|
|
177
|
+
* `bet_atomic`: the debited stake — for Power Boost the Total Bet (Bet Amount × 100).
|
|
172
178
|
* `prediction_lo` / `prediction_hi`: prediction range bounds (0..999).
|
|
173
179
|
*
|
|
174
|
-
* Returns `BigUint64Array
|
|
180
|
+
* Returns `BigUint64Array`: `[win_amount, roll_number, is_win (0|1), multiplier×10000]`;
|
|
181
|
+
* Power Boost appends `[boost_rng, boost]` (multiplier stays the base one).
|
|
175
182
|
*/
|
|
176
183
|
export function compute_payout_dice(random: BigUint64Array, bet_atomic: bigint, game_mode: number, prediction_lo: number, prediction_hi: number): BigUint64Array;
|
|
177
184
|
|
|
@@ -315,6 +322,26 @@ export function crash_rtp_percent(): number;
|
|
|
315
322
|
*/
|
|
316
323
|
export function derive_session_key(sig_bytes: Uint8Array): BigUint64Array;
|
|
317
324
|
|
|
325
|
+
/**
|
|
326
|
+
* Power Boost table flattened as `[rng_lo, rng_hi, boost, ...]` (inclusive ranges).
|
|
327
|
+
*/
|
|
328
|
+
export function dice_boost_table(): BigUint64Array;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Dice `game_mode = direction + dice_directions_count() × variant` (classic 0, Power Boost 1).
|
|
332
|
+
*/
|
|
333
|
+
export function dice_directions_count(): number;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Power Boost cost: Total Bet = Bet Amount × this (100).
|
|
337
|
+
*/
|
|
338
|
+
export function dice_power_boost_cost(): bigint;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Largest Power Boost Bet Amount accepted on-chain, atomic units.
|
|
342
|
+
*/
|
|
343
|
+
export function dice_power_boost_max_bet_atomic(): bigint;
|
|
344
|
+
|
|
318
345
|
/**
|
|
319
346
|
* Dice RTP percent (99). Canonical source for backend/frontend.
|
|
320
347
|
*/
|