@rolly-dev/wasm-signer 1.21.0 → 1.24.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.
Binary file
@@ -2,14 +2,14 @@
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 aviato_rtp_percent: () => number;
5
6
  export const coinflip_multiplier_x10000: () => number;
6
- export const coinflip_rtp_percent: () => number;
7
7
  export const compute_address_hash: (a: number, b: number, c: number) => void;
8
- export const compute_crash_point: (a: number, b: number) => number;
8
+ export const compute_aviato_point: (a: number, b: number) => number;
9
9
  export const compute_drawn_keno: (a: number, b: number, c: number) => void;
10
10
  export const compute_multi_dice: (a: number) => bigint;
11
+ export const compute_payout_aviato: (a: number, b: number, c: number, d: bigint, e: number) => void;
11
12
  export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
12
- export const compute_payout_crash: (a: number, b: number, c: number, d: bigint, e: number) => void;
13
13
  export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
14
14
  export const compute_payout_keno: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
15
15
  export const compute_payout_limbo: (a: number, b: number, c: number, d: bigint, e: number) => void;
@@ -35,6 +35,7 @@ export const keno_is_valid_config: (a: number, b: number) => number;
35
35
  export const keno_multiplier_table: (a: number, b: number, c: number) => void;
36
36
  export const keno_numbers_range: () => number;
37
37
  export const keno_rtp_x100: (a: number, b: number) => bigint;
38
+ export const limbo_rtp_percent: () => number;
38
39
  export const make_main_leaf: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
39
40
  export const plinko_all_rtp_x100: () => number;
40
41
  export const plinko_is_valid_config: (a: number, b: number, c: number) => number;
@@ -50,13 +51,13 @@ export const seed_hash_truncated: (a: number, b: number, c: number) => void;
50
51
  export const session_public_key: (a: number, b: number, c: number, d: bigint) => void;
51
52
  export const string_to_user_seed: (a: number, b: number, c: number) => void;
52
53
  export const string_to_user_seed_hex: (a: number, b: number, c: number) => void;
53
- export const crash_rtp_percent: () => number;
54
+ export const validate_slot: (a: number, b: number) => void;
55
+ export const coinflip_rtp_percent: () => number;
54
56
  export const dice_rtp_percent: () => number;
55
57
  export const keno_max_picks: () => number;
56
- export const limbo_rtp_percent: () => number;
57
58
  export const goldilocks_modulus: () => bigint;
58
- export const __wbindgen_export: (a: number) => void;
59
+ export const __wbindgen_export: (a: number, b: number) => number;
60
+ export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
61
+ export const __wbindgen_export3: (a: number) => void;
59
62
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
60
- export const __wbindgen_export2: (a: number, b: number, c: number) => void;
61
- export const __wbindgen_export3: (a: number, b: number) => number;
62
- export const __wbindgen_export4: (a: number, b: number, c: number, d: number) => number;
63
+ export const __wbindgen_export4: (a: number, b: number, c: number) => void;
@@ -12,6 +12,11 @@
12
12
  */
13
13
  export function amount_split(amount: bigint): Uint32Array;
14
14
 
15
+ /**
16
+ * Aviato RTP percent (99). Canonical source for backend/frontend.
17
+ */
18
+ export function aviato_rtp_percent(): number;
19
+
15
20
  /**
16
21
  * CoinFlip multiplier × 10000 (19800 = 1.98×). Canonical source for backend/frontend.
17
22
  */
@@ -29,12 +34,12 @@ export function coinflip_rtp_percent(): number;
29
34
  export function compute_address_hash(address_hex: string): BigUint64Array;
30
35
 
31
36
  /**
32
- * Extract crash point (×100) from Poseidon2 random output.
37
+ * Extract aviato point (×100) from raw server seed fields.
33
38
  *
34
- * `random` must be exactly 4 elements.
35
- * Returns the clamped crash multiplier ×100 (100..=1_000_000, i.e. 1.00x..10000.00x).
39
+ * `random` must be exactly 4 elements (first 4 fields of server_seed).
40
+ * Returns the clamped aviato multiplier ×100 (100..=1_000_000, i.e. 1.00x..10000.00x).
36
41
  */
37
- export function compute_crash_point(random: BigUint64Array): number;
42
+ export function compute_aviato_point(random: BigUint64Array): number;
38
43
 
39
44
  /**
40
45
  * Extract the 10 drawn numbers from Poseidon2 random output using
@@ -54,28 +59,28 @@ export function compute_drawn_keno(random: BigUint64Array): Uint8Array;
54
59
  export function compute_multi_dice(win_numbers: number): bigint;
55
60
 
56
61
  /**
57
- * Full coinflip payout computation — pure integer arithmetic, zero floats.
62
+ * Full aviato payout computation — pure integer arithmetic, zero floats.
58
63
  *
59
- * `random`: 4 Goldilocks field elements (Poseidon2 output).
64
+ * `random`: 4 Goldilocks field elements (first 4 fields of raw server_seed).
60
65
  * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
61
- * `prediction`: 0 or 1.
66
+ * `cashout_x100`: multiplier at which the user cashed out (×100).
67
+ * - 0 = user did NOT cash out (loss).
68
+ * - 100..=1_000_000 = user stopped at this multiplier.
62
69
  *
63
- * Returns `BigUint64Array[4]`: `[win_amount, roll (0|1), is_win (0|1), multiplier×10000]`.
70
+ * Returns `BigUint64Array[4]`: `[win_amount, aviato_x100, is_win (0|1), multiplier×10000]`.
64
71
  */
65
- export function compute_payout_coinflip(random: BigUint64Array, bet_atomic: bigint, prediction: number): BigUint64Array;
72
+ export function compute_payout_aviato(random: BigUint64Array, bet_atomic: bigint, cashout_x100: number): BigUint64Array;
66
73
 
67
74
  /**
68
- * Full crash payout computation — pure integer arithmetic, zero floats.
75
+ * Full coinflip payout computation — pure integer arithmetic, zero floats.
69
76
  *
70
- * `random`: 4 Goldilocks field elements (Poseidon2 output of server_seed).
77
+ * `random`: 4 Goldilocks field elements (Poseidon2 output).
71
78
  * `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
72
- * `cashout_x100`: multiplier at which the user cashed out (×100).
73
- * - 0 = user did NOT cash out (loss).
74
- * - 100..=1_000_000 = user stopped at this multiplier.
79
+ * `prediction`: 0 or 1.
75
80
  *
76
- * Returns `BigUint64Array[4]`: `[win_amount, crash_x100, is_win (0|1), multiplier×10000]`.
81
+ * Returns `BigUint64Array[4]`: `[win_amount, roll (0|1), is_win (0|1), multiplier×10000]`.
77
82
  */
78
- export function compute_payout_crash(random: BigUint64Array, bet_atomic: bigint, cashout_x100: number): BigUint64Array;
83
+ export function compute_payout_coinflip(random: BigUint64Array, bet_atomic: bigint, prediction: number): BigUint64Array;
79
84
 
80
85
  /**
81
86
  * Full dice payout computation — pure integer arithmetic, zero floats.
@@ -206,11 +211,6 @@ export function compute_server_seed_hash(server_seed: BigUint64Array): BigUint64
206
211
  */
207
212
  export function compute_user_seed_binding(game_id: number, bet: bigint, pred_hash: BigUint64Array, secret: BigUint64Array): BigUint64Array;
208
213
 
209
- /**
210
- * Crash RTP percent (99). Canonical source for backend/frontend.
211
- */
212
- export function crash_rtp_percent(): number;
213
-
214
214
  /**
215
215
  * Derive a session key from 32 bytes of entropy (e.g. MetaMask signature).
216
216
  *
@@ -475,3 +475,13 @@ export function string_to_user_seed(input: string): BigUint64Array;
475
475
  * ```
476
476
  */
477
477
  export function string_to_user_seed_hex(input: string): string;
478
+
479
+ /**
480
+ * Re-check every per-slot circuit constraint on a candidate witness, returning
481
+ * the post-tx effects on success or a typed rejection reason on failure.
482
+ *
483
+ * Input: a JS object matching `tx_validator::SlotInput` (serde-compatible).
484
+ * Output on success: `{ ok: true, effects: SlotEffects }`.
485
+ * Output on failure: `{ ok: false, reason: string }`.
486
+ */
487
+ export function validate_slot(input: any): any;