@rolly-dev/wasm-signer 1.14.0 → 1.15.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.
Files changed (2) hide show
  1. package/js/react.d.mts +35 -19
  2. package/package.json +1 -1
package/js/react.d.mts CHANGED
@@ -1,25 +1,41 @@
1
1
  export interface RollyWasmResult {
2
2
  ready: boolean;
3
3
  error: Error | null;
4
- poseidon2_hash: (input: BigUint64Array) => BigUint64Array;
5
- poseidon2_two_to_one: (left: BigUint64Array, right: BigUint64Array) => BigUint64Array;
6
- derive_session_key: (sig_bytes: Uint8Array) => BigUint64Array;
7
- session_public_key: (session_key: BigUint64Array, session_expiry: bigint) => BigUint64Array;
8
- compute_server_seed_hash: (server_seed: BigUint64Array) => BigUint64Array;
9
- seed_hash_truncated: (server_seed: BigUint64Array) => BigUint64Array;
10
- string_to_user_seed: (input: string) => BigUint64Array;
11
- string_to_user_seed_hex: (input: string) => string;
12
- generate_user_seed: () => string;
13
- goldilocks_fields_to_hex: (fields: BigUint64Array) => string;
14
- goldilocks_modulus: () => bigint;
15
- goldilocks_reduce: (value: bigint) => bigint;
16
- amount_split: (amount: bigint) => Uint32Array;
17
- compute_address_hash: (address_hex: string) => BigUint64Array;
18
- hash_balance_leaf: (raw: BigUint64Array) => BigUint64Array;
19
- make_main_leaf: (balance_hash: BigUint64Array, pk_hash: BigUint64Array, address_hash: BigUint64Array) => BigUint64Array;
20
- compute_payout_dice: (random: BigUint64Array, bet_atomic: bigint, game_mode: number, prediction_lo: number, prediction_hi: number) => BigUint64Array;
21
- compute_roll_dice: (random: BigUint64Array) => number;
22
- compute_multi_dice: (win_numbers: number) => bigint;
4
+ poseidon2_hash: (input: BigUint64Array) => BigUint64Array;
5
+ poseidon2_two_to_one: (left: BigUint64Array, right: BigUint64Array) => BigUint64Array;
6
+ derive_session_key: (sig_bytes: Uint8Array) => BigUint64Array;
7
+ session_public_key: (session_key: BigUint64Array, session_expiry: bigint) => BigUint64Array;
8
+ compute_server_seed_hash: (server_seed: BigUint64Array) => BigUint64Array;
9
+ seed_hash_truncated: (server_seed: BigUint64Array) => BigUint64Array;
10
+ string_to_user_seed: (input: string) => BigUint64Array;
11
+ string_to_user_seed_hex: (input: string) => string;
12
+ generate_user_seed: () => string;
13
+ goldilocks_fields_to_hex: (fields: BigUint64Array) => string;
14
+ goldilocks_modulus: () => bigint;
15
+ goldilocks_reduce: (value: bigint) => bigint;
16
+ amount_split: (amount: bigint) => Uint32Array;
17
+ compute_address_hash: (address_hex: string) => BigUint64Array;
18
+ hash_balance_leaf: (raw: BigUint64Array) => BigUint64Array;
19
+ make_main_leaf: (balance_hash: BigUint64Array, pk_hash: BigUint64Array, address_hash: BigUint64Array) => BigUint64Array;
20
+ compute_prediction_hash: (game_id: number, p0: number, p1: number, p2: number) => BigUint64Array;
21
+ compute_prediction_hash_keno: (game_id: number, risk: number, pick_count: number, selected: Uint8Array) => BigUint64Array;
22
+ compute_user_seed_binding: (game_id: number, bet: bigint, pred_hash: BigUint64Array, secret: BigUint64Array) => BigUint64Array;
23
+ generate_user_secret: () => BigUint64Array;
24
+ compute_payout_dice: (random: BigUint64Array, bet_atomic: bigint, game_mode: number, prediction_lo: number, prediction_hi: number) => BigUint64Array;
25
+ compute_payout_limbo: (random: BigUint64Array, bet_atomic: bigint, prediction_x100: number) => BigUint64Array;
26
+ compute_payout_plinko: (random: BigUint64Array, bet_atomic: bigint, sector: number, rows: number, is_extreme: boolean) => BigUint64Array;
27
+ compute_payout_coinflip: (random: BigUint64Array, bet_atomic: bigint, prediction: number) => BigUint64Array;
28
+ compute_payout_keno: (random: BigUint64Array, bet_atomic: bigint, risk: number, selected: Uint8Array) => BigUint64Array;
29
+ compute_roll_dice: (random: BigUint64Array) => number;
30
+ compute_roll_limbo: (random: BigUint64Array) => number;
31
+ compute_roll_plinko: (random: BigUint64Array, rows: number) => number;
32
+ compute_roll_coinflip: (random: BigUint64Array) => number;
33
+ compute_drawn_keno: (random: BigUint64Array) => Uint8Array;
34
+ compute_multi_dice: (win_numbers: number) => bigint;
35
+ limbo_rtp_percent: () => number;
36
+ coinflip_rtp_percent: () => number;
37
+ coinflip_multiplier_x10000: () => number;
38
+ dice_rtp_percent: () => number;
23
39
  }
24
40
 
25
41
  export function useRollyWasm(): RollyWasmResult;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolly-dev/wasm-signer",
3
- "version": "1.14.0",
3
+ "version": "1.15.0",
4
4
  "description": "Poseidon2 hashing & bet signing for Rolly ZK-Rollup (WASM, Goldilocks field)",
5
5
  "type": "module",
6
6
  "exports": {