@rolly-dev/wasm-signer 1.9.0 → 1.12.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 +54 -0
- package/dist/node/rolly_wasm_signer.js +142 -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 +54 -0
- package/dist/node-inline/rolly_wasm_signer.js +143 -1
- package/dist/node-inline/rolly_wasm_signer.mjs +139 -2
- package/dist/node-inline/rolly_wasm_signer_bg.wasm.d.ts +5 -0
- package/dist/web/rolly_wasm_signer.d.ts +59 -0
- package/dist/web/rolly_wasm_signer.js +137 -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.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
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const amount_split: (a: number, b: bigint) => void;
|
|
5
5
|
export const compute_address_hash: (a: number, b: number, c: number) => void;
|
|
6
|
+
export const compute_drawn_keno: (a: number, b: number, c: number) => void;
|
|
6
7
|
export const compute_multi_dice: (a: number) => bigint;
|
|
7
8
|
export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
8
9
|
export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
10
|
+
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, f: number) => void;
|
|
9
12
|
export const compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
10
13
|
export const compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
14
|
+
export const compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
11
15
|
export const compute_roll_coinflip: (a: number, b: number) => number;
|
|
12
16
|
export const compute_roll_dice: (a: number, b: number) => number;
|
|
17
|
+
export const compute_roll_limbo: (a: number, b: number, c: number) => number;
|
|
13
18
|
export const compute_roll_plinko: (a: number, b: number, c: number) => number;
|
|
14
19
|
export const compute_server_seed_hash: (a: number, b: number, c: number) => void;
|
|
15
20
|
export const compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
|
|
@@ -18,6 +18,15 @@ export function amount_split(amount: bigint): Uint32Array;
|
|
|
18
18
|
*/
|
|
19
19
|
export function compute_address_hash(address_hex: string): BigUint64Array;
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Extract the 10 drawn numbers from Poseidon2 random output using
|
|
23
|
+
* the combinatorial number system: `combo_index = random[0] % C(40,10)`.
|
|
24
|
+
*
|
|
25
|
+
* `random` must be exactly 4 elements.
|
|
26
|
+
* Returns `Uint8Array` of length 10 (sorted ascending, each in [0, 39]).
|
|
27
|
+
*/
|
|
28
|
+
export function compute_drawn_keno(random: BigUint64Array): Uint8Array;
|
|
29
|
+
|
|
21
30
|
/**
|
|
22
31
|
* Compute dice multiplier × 10000 from win_numbers count.
|
|
23
32
|
*
|
|
@@ -49,6 +58,30 @@ export function compute_payout_coinflip(random: BigUint64Array, bet_atomic: bigi
|
|
|
49
58
|
*/
|
|
50
59
|
export function compute_payout_dice(random: BigUint64Array, bet_atomic: bigint, game_mode: number, prediction_lo: number, prediction_hi: number): BigUint64Array;
|
|
51
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Full keno payout computation — pure integer arithmetic, zero floats.
|
|
63
|
+
*
|
|
64
|
+
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
65
|
+
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
66
|
+
* `risk`: 0=low, 1=medium, 2=high.
|
|
67
|
+
* `selected`: player-chosen numbers (0-indexed, each in [0, 39]).
|
|
68
|
+
*
|
|
69
|
+
* Returns `BigUint64Array[4]`: `[win_amount, match_count, is_win (0|1), multiplier×10000]`.
|
|
70
|
+
*/
|
|
71
|
+
export function compute_payout_keno(random: BigUint64Array, bet_atomic: bigint, risk: number, selected: Uint8Array): BigUint64Array;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Full limbo payout computation — pure integer arithmetic, zero floats.
|
|
75
|
+
*
|
|
76
|
+
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
77
|
+
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
78
|
+
* `prediction_x100`: target multiplier × 100 (101..999999, i.e. 1.01x–9999.99x).
|
|
79
|
+
* `rtp_numer`: RTP numerator for this bet (90–99). Stored per-bet, included in prediction_hash.
|
|
80
|
+
*
|
|
81
|
+
* Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier×10000]`.
|
|
82
|
+
*/
|
|
83
|
+
export function compute_payout_limbo(random: BigUint64Array, bet_atomic: bigint, prediction_x100: number, rtp_numer: number): BigUint64Array;
|
|
84
|
+
|
|
52
85
|
/**
|
|
53
86
|
* Full plinko payout computation — pure integer arithmetic, zero floats.
|
|
54
87
|
*
|
|
@@ -69,12 +102,24 @@ export function compute_payout_plinko(random: BigUint64Array, bet_atomic: bigint
|
|
|
69
102
|
* and the in-circuit `build_prediction_hash`.
|
|
70
103
|
*
|
|
71
104
|
* Semantics of p0–p2 depend on the game:
|
|
105
|
+
* Limbo: `(rtp_numer, prediction_x100, 0)`
|
|
72
106
|
* Dice: `(mode, pred_lo, pred_hi)`
|
|
73
107
|
* Plinko: `(sector, rows, is_extreme)`
|
|
74
108
|
* CoinFlip: `(prediction, 0, 0)`
|
|
75
109
|
*/
|
|
76
110
|
export function compute_prediction_hash(game_id: number, p0: number, p1: number, p2: number): BigUint64Array;
|
|
77
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Compute Keno prediction hash with extended 13-input format:
|
|
114
|
+
* `Poseidon2(game_id, risk, pick_count, selected[0], …, selected[9])`.
|
|
115
|
+
*
|
|
116
|
+
* Selected numbers are sorted internally for deterministic output.
|
|
117
|
+
* Unused slots (when pick_count < 10) are filled with 0.
|
|
118
|
+
*
|
|
119
|
+
* Returns `BigUint64Array` of length 4 (one `HashOut`).
|
|
120
|
+
*/
|
|
121
|
+
export function compute_prediction_hash_keno(game_id: number, risk: number, pick_count: number, selected: Uint8Array): BigUint64Array;
|
|
122
|
+
|
|
78
123
|
/**
|
|
79
124
|
* Extract coinflip roll (0 or 1) from Poseidon2 random output.
|
|
80
125
|
*
|
|
@@ -89,6 +134,15 @@ export function compute_roll_coinflip(random: BigUint64Array): number;
|
|
|
89
134
|
*/
|
|
90
135
|
export function compute_roll_dice(random: BigUint64Array): number;
|
|
91
136
|
|
|
137
|
+
/**
|
|
138
|
+
* Extract limbo result multiplier × 100 from Poseidon2 random output.
|
|
139
|
+
*
|
|
140
|
+
* `random` must be exactly 4 elements.
|
|
141
|
+
* `rtp_numer` must be in [90, 99].
|
|
142
|
+
* Returns the clamped multiplier × 100 (101..999999).
|
|
143
|
+
*/
|
|
144
|
+
export function compute_roll_limbo(random: BigUint64Array, rtp_numer: number): number;
|
|
145
|
+
|
|
92
146
|
/**
|
|
93
147
|
* Extract plinko bucket index from Poseidon2 random output.
|
|
94
148
|
*
|
|
@@ -312,13 +366,18 @@ export interface InitOutput {
|
|
|
312
366
|
readonly memory: WebAssembly.Memory;
|
|
313
367
|
readonly amount_split: (a: number, b: bigint) => void;
|
|
314
368
|
readonly compute_address_hash: (a: number, b: number, c: number) => void;
|
|
369
|
+
readonly compute_drawn_keno: (a: number, b: number, c: number) => void;
|
|
315
370
|
readonly compute_multi_dice: (a: number) => bigint;
|
|
316
371
|
readonly compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
317
372
|
readonly compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
373
|
+
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, f: number) => void;
|
|
318
375
|
readonly compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
319
376
|
readonly compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
377
|
+
readonly compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
320
378
|
readonly compute_roll_coinflip: (a: number, b: number) => number;
|
|
321
379
|
readonly compute_roll_dice: (a: number, b: number) => number;
|
|
380
|
+
readonly compute_roll_limbo: (a: number, b: number, c: number) => number;
|
|
322
381
|
readonly compute_roll_plinko: (a: number, b: number, c: number) => number;
|
|
323
382
|
readonly compute_server_seed_hash: (a: number, b: number, c: number) => void;
|
|
324
383
|
readonly compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
|
|
@@ -47,6 +47,31 @@ export function compute_address_hash(address_hex) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Extract the 10 drawn numbers from Poseidon2 random output using
|
|
52
|
+
* the combinatorial number system: `combo_index = random[0] % C(40,10)`.
|
|
53
|
+
*
|
|
54
|
+
* `random` must be exactly 4 elements.
|
|
55
|
+
* Returns `Uint8Array` of length 10 (sorted ascending, each in [0, 39]).
|
|
56
|
+
* @param {BigUint64Array} random
|
|
57
|
+
* @returns {Uint8Array}
|
|
58
|
+
*/
|
|
59
|
+
export function compute_drawn_keno(random) {
|
|
60
|
+
try {
|
|
61
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
62
|
+
const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
|
|
63
|
+
const len0 = WASM_VECTOR_LEN;
|
|
64
|
+
wasm.compute_drawn_keno(retptr, ptr0, len0);
|
|
65
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
66
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
67
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
68
|
+
wasm.__wbindgen_export2(r0, r1 * 1, 1);
|
|
69
|
+
return v2;
|
|
70
|
+
} finally {
|
|
71
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
50
75
|
/**
|
|
51
76
|
* Compute dice multiplier × 10000 from win_numbers count.
|
|
52
77
|
*
|
|
@@ -121,6 +146,70 @@ export function compute_payout_dice(random, bet_atomic, game_mode, prediction_lo
|
|
|
121
146
|
}
|
|
122
147
|
}
|
|
123
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Full keno payout computation — pure integer arithmetic, zero floats.
|
|
151
|
+
*
|
|
152
|
+
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
153
|
+
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
154
|
+
* `risk`: 0=low, 1=medium, 2=high.
|
|
155
|
+
* `selected`: player-chosen numbers (0-indexed, each in [0, 39]).
|
|
156
|
+
*
|
|
157
|
+
* Returns `BigUint64Array[4]`: `[win_amount, match_count, is_win (0|1), multiplier×10000]`.
|
|
158
|
+
* @param {BigUint64Array} random
|
|
159
|
+
* @param {bigint} bet_atomic
|
|
160
|
+
* @param {number} risk
|
|
161
|
+
* @param {Uint8Array} selected
|
|
162
|
+
* @returns {BigUint64Array}
|
|
163
|
+
*/
|
|
164
|
+
export function compute_payout_keno(random, bet_atomic, risk, selected) {
|
|
165
|
+
try {
|
|
166
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
167
|
+
const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
|
|
168
|
+
const len0 = WASM_VECTOR_LEN;
|
|
169
|
+
const ptr1 = passArray8ToWasm0(selected, wasm.__wbindgen_export3);
|
|
170
|
+
const len1 = WASM_VECTOR_LEN;
|
|
171
|
+
wasm.compute_payout_keno(retptr, ptr0, len0, bet_atomic, risk, ptr1, len1);
|
|
172
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
173
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
174
|
+
var v3 = getArrayU64FromWasm0(r0, r1).slice();
|
|
175
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
176
|
+
return v3;
|
|
177
|
+
} finally {
|
|
178
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Full limbo payout computation — pure integer arithmetic, zero floats.
|
|
184
|
+
*
|
|
185
|
+
* `random`: 4 Goldilocks field elements (Poseidon2 output).
|
|
186
|
+
* `bet_atomic`: bet in atomic units (1 USDT = 1_000_000).
|
|
187
|
+
* `prediction_x100`: target multiplier × 100 (101..999999, i.e. 1.01x–9999.99x).
|
|
188
|
+
* `rtp_numer`: RTP numerator for this bet (90–99). Stored per-bet, included in prediction_hash.
|
|
189
|
+
*
|
|
190
|
+
* Returns `BigUint64Array[4]`: `[win_amount, multiplier_x100, is_win (0|1), payout_multiplier×10000]`.
|
|
191
|
+
* @param {BigUint64Array} random
|
|
192
|
+
* @param {bigint} bet_atomic
|
|
193
|
+
* @param {number} prediction_x100
|
|
194
|
+
* @param {number} rtp_numer
|
|
195
|
+
* @returns {BigUint64Array}
|
|
196
|
+
*/
|
|
197
|
+
export function compute_payout_limbo(random, bet_atomic, prediction_x100, rtp_numer) {
|
|
198
|
+
try {
|
|
199
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
200
|
+
const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
|
|
201
|
+
const len0 = WASM_VECTOR_LEN;
|
|
202
|
+
wasm.compute_payout_limbo(retptr, ptr0, len0, bet_atomic, prediction_x100, rtp_numer);
|
|
203
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
204
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
205
|
+
var v2 = getArrayU64FromWasm0(r0, r1).slice();
|
|
206
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
207
|
+
return v2;
|
|
208
|
+
} finally {
|
|
209
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
124
213
|
/**
|
|
125
214
|
* Full plinko payout computation — pure integer arithmetic, zero floats.
|
|
126
215
|
*
|
|
@@ -161,6 +250,7 @@ export function compute_payout_plinko(random, bet_atomic, sector, rows, is_extre
|
|
|
161
250
|
* and the in-circuit `build_prediction_hash`.
|
|
162
251
|
*
|
|
163
252
|
* Semantics of p0–p2 depend on the game:
|
|
253
|
+
* Limbo: `(rtp_numer, prediction_x100, 0)`
|
|
164
254
|
* Dice: `(mode, pred_lo, pred_hi)`
|
|
165
255
|
* Plinko: `(sector, rows, is_extreme)`
|
|
166
256
|
* CoinFlip: `(prediction, 0, 0)`
|
|
@@ -184,6 +274,36 @@ export function compute_prediction_hash(game_id, p0, p1, p2) {
|
|
|
184
274
|
}
|
|
185
275
|
}
|
|
186
276
|
|
|
277
|
+
/**
|
|
278
|
+
* Compute Keno prediction hash with extended 13-input format:
|
|
279
|
+
* `Poseidon2(game_id, risk, pick_count, selected[0], …, selected[9])`.
|
|
280
|
+
*
|
|
281
|
+
* Selected numbers are sorted internally for deterministic output.
|
|
282
|
+
* Unused slots (when pick_count < 10) are filled with 0.
|
|
283
|
+
*
|
|
284
|
+
* Returns `BigUint64Array` of length 4 (one `HashOut`).
|
|
285
|
+
* @param {number} game_id
|
|
286
|
+
* @param {number} risk
|
|
287
|
+
* @param {number} pick_count
|
|
288
|
+
* @param {Uint8Array} selected
|
|
289
|
+
* @returns {BigUint64Array}
|
|
290
|
+
*/
|
|
291
|
+
export function compute_prediction_hash_keno(game_id, risk, pick_count, selected) {
|
|
292
|
+
try {
|
|
293
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
294
|
+
const ptr0 = passArray8ToWasm0(selected, wasm.__wbindgen_export3);
|
|
295
|
+
const len0 = WASM_VECTOR_LEN;
|
|
296
|
+
wasm.compute_prediction_hash_keno(retptr, game_id, risk, pick_count, ptr0, len0);
|
|
297
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
298
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
299
|
+
var v2 = getArrayU64FromWasm0(r0, r1).slice();
|
|
300
|
+
wasm.__wbindgen_export2(r0, r1 * 8, 8);
|
|
301
|
+
return v2;
|
|
302
|
+
} finally {
|
|
303
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
187
307
|
/**
|
|
188
308
|
* Extract coinflip roll (0 or 1) from Poseidon2 random output.
|
|
189
309
|
*
|
|
@@ -212,6 +332,23 @@ export function compute_roll_dice(random) {
|
|
|
212
332
|
return ret >>> 0;
|
|
213
333
|
}
|
|
214
334
|
|
|
335
|
+
/**
|
|
336
|
+
* Extract limbo result multiplier × 100 from Poseidon2 random output.
|
|
337
|
+
*
|
|
338
|
+
* `random` must be exactly 4 elements.
|
|
339
|
+
* `rtp_numer` must be in [90, 99].
|
|
340
|
+
* Returns the clamped multiplier × 100 (101..999999).
|
|
341
|
+
* @param {BigUint64Array} random
|
|
342
|
+
* @param {number} rtp_numer
|
|
343
|
+
* @returns {number}
|
|
344
|
+
*/
|
|
345
|
+
export function compute_roll_limbo(random, rtp_numer) {
|
|
346
|
+
const ptr0 = passArray64ToWasm0(random, wasm.__wbindgen_export3);
|
|
347
|
+
const len0 = WASM_VECTOR_LEN;
|
|
348
|
+
const ret = wasm.compute_roll_limbo(ptr0, len0, rtp_numer);
|
|
349
|
+
return ret >>> 0;
|
|
350
|
+
}
|
|
351
|
+
|
|
215
352
|
/**
|
|
216
353
|
* Extract plinko bucket index from Poseidon2 random output.
|
|
217
354
|
*
|
|
Binary file
|
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const amount_split: (a: number, b: bigint) => void;
|
|
5
5
|
export const compute_address_hash: (a: number, b: number, c: number) => void;
|
|
6
|
+
export const compute_drawn_keno: (a: number, b: number, c: number) => void;
|
|
6
7
|
export const compute_multi_dice: (a: number) => bigint;
|
|
7
8
|
export const compute_payout_coinflip: (a: number, b: number, c: number, d: bigint, e: number) => void;
|
|
8
9
|
export const compute_payout_dice: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
10
|
+
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, f: number) => void;
|
|
9
12
|
export const compute_payout_plinko: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number) => void;
|
|
10
13
|
export const compute_prediction_hash: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
14
|
+
export const compute_prediction_hash_keno: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
11
15
|
export const compute_roll_coinflip: (a: number, b: number) => number;
|
|
12
16
|
export const compute_roll_dice: (a: number, b: number) => number;
|
|
17
|
+
export const compute_roll_limbo: (a: number, b: number, c: number) => number;
|
|
13
18
|
export const compute_roll_plinko: (a: number, b: number, c: number) => number;
|
|
14
19
|
export const compute_server_seed_hash: (a: number, b: number, c: number) => void;
|
|
15
20
|
export const compute_user_seed_binding: (a: number, b: number, c: bigint, d: number, e: number, f: number, g: number) => void;
|
package/js/browser.mjs
CHANGED
|
@@ -3,13 +3,18 @@ export { default as init } from '../dist/web/rolly_wasm_signer.js';
|
|
|
3
3
|
export {
|
|
4
4
|
amount_split,
|
|
5
5
|
compute_address_hash,
|
|
6
|
+
compute_drawn_keno,
|
|
6
7
|
compute_multi_dice,
|
|
7
8
|
compute_payout_coinflip,
|
|
8
9
|
compute_payout_dice,
|
|
10
|
+
compute_payout_keno,
|
|
11
|
+
compute_payout_limbo,
|
|
9
12
|
compute_payout_plinko,
|
|
10
13
|
compute_prediction_hash,
|
|
14
|
+
compute_prediction_hash_keno,
|
|
11
15
|
compute_roll_coinflip,
|
|
12
16
|
compute_roll_dice,
|
|
17
|
+
compute_roll_limbo,
|
|
13
18
|
compute_roll_plinko,
|
|
14
19
|
compute_server_seed_hash,
|
|
15
20
|
compute_user_seed_binding,
|
package/js/index.d.ts
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
export {
|
|
2
2
|
amount_split,
|
|
3
3
|
compute_address_hash,
|
|
4
|
+
compute_drawn_keno,
|
|
4
5
|
compute_multi_dice,
|
|
5
6
|
compute_payout_coinflip,
|
|
6
7
|
compute_payout_dice,
|
|
8
|
+
compute_payout_keno,
|
|
9
|
+
compute_payout_limbo,
|
|
7
10
|
compute_payout_plinko,
|
|
8
11
|
compute_prediction_hash,
|
|
12
|
+
compute_prediction_hash_keno,
|
|
9
13
|
compute_roll_coinflip,
|
|
10
14
|
compute_roll_dice,
|
|
15
|
+
compute_roll_limbo,
|
|
11
16
|
compute_roll_plinko,
|
|
12
17
|
compute_server_seed_hash,
|
|
13
18
|
compute_user_seed_binding,
|
package/js/node-inline.cjs
CHANGED
|
@@ -5,13 +5,18 @@ const wasm = require('../dist/node-inline/rolly_wasm_signer.js');
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
amount_split: wasm.amount_split,
|
|
7
7
|
compute_address_hash: wasm.compute_address_hash,
|
|
8
|
+
compute_drawn_keno: wasm.compute_drawn_keno,
|
|
8
9
|
compute_multi_dice: wasm.compute_multi_dice,
|
|
9
10
|
compute_payout_coinflip: wasm.compute_payout_coinflip,
|
|
10
11
|
compute_payout_dice: wasm.compute_payout_dice,
|
|
12
|
+
compute_payout_keno: wasm.compute_payout_keno,
|
|
13
|
+
compute_payout_limbo: wasm.compute_payout_limbo,
|
|
11
14
|
compute_payout_plinko: wasm.compute_payout_plinko,
|
|
12
15
|
compute_prediction_hash: wasm.compute_prediction_hash,
|
|
16
|
+
compute_prediction_hash_keno:wasm.compute_prediction_hash_keno,
|
|
13
17
|
compute_roll_coinflip: wasm.compute_roll_coinflip,
|
|
14
18
|
compute_roll_dice: wasm.compute_roll_dice,
|
|
19
|
+
compute_roll_limbo: wasm.compute_roll_limbo,
|
|
15
20
|
compute_roll_plinko: wasm.compute_roll_plinko,
|
|
16
21
|
compute_server_seed_hash: wasm.compute_server_seed_hash,
|
|
17
22
|
compute_user_seed_binding: wasm.compute_user_seed_binding,
|
package/js/node-inline.mjs
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
export {
|
|
2
2
|
amount_split,
|
|
3
3
|
compute_address_hash,
|
|
4
|
+
compute_drawn_keno,
|
|
4
5
|
compute_multi_dice,
|
|
5
6
|
compute_payout_coinflip,
|
|
6
7
|
compute_payout_dice,
|
|
8
|
+
compute_payout_keno,
|
|
9
|
+
compute_payout_limbo,
|
|
7
10
|
compute_payout_plinko,
|
|
8
11
|
compute_prediction_hash,
|
|
12
|
+
compute_prediction_hash_keno,
|
|
9
13
|
compute_roll_coinflip,
|
|
10
14
|
compute_roll_dice,
|
|
15
|
+
compute_roll_limbo,
|
|
11
16
|
compute_roll_plinko,
|
|
12
17
|
compute_server_seed_hash,
|
|
13
18
|
compute_user_seed_binding,
|
package/js/node.cjs
CHANGED
|
@@ -5,13 +5,18 @@ const wasm = require('../dist/node/rolly_wasm_signer.js');
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
amount_split: wasm.amount_split,
|
|
7
7
|
compute_address_hash: wasm.compute_address_hash,
|
|
8
|
+
compute_drawn_keno: wasm.compute_drawn_keno,
|
|
8
9
|
compute_multi_dice: wasm.compute_multi_dice,
|
|
9
10
|
compute_payout_coinflip: wasm.compute_payout_coinflip,
|
|
10
11
|
compute_payout_dice: wasm.compute_payout_dice,
|
|
12
|
+
compute_payout_keno: wasm.compute_payout_keno,
|
|
13
|
+
compute_payout_limbo: wasm.compute_payout_limbo,
|
|
11
14
|
compute_payout_plinko: wasm.compute_payout_plinko,
|
|
12
15
|
compute_prediction_hash: wasm.compute_prediction_hash,
|
|
16
|
+
compute_prediction_hash_keno:wasm.compute_prediction_hash_keno,
|
|
13
17
|
compute_roll_coinflip: wasm.compute_roll_coinflip,
|
|
14
18
|
compute_roll_dice: wasm.compute_roll_dice,
|
|
19
|
+
compute_roll_limbo: wasm.compute_roll_limbo,
|
|
15
20
|
compute_roll_plinko: wasm.compute_roll_plinko,
|
|
16
21
|
compute_server_seed_hash: wasm.compute_server_seed_hash,
|
|
17
22
|
compute_user_seed_binding: wasm.compute_user_seed_binding,
|
package/js/node.mjs
CHANGED
|
@@ -6,13 +6,18 @@ const wasm = require('../dist/node/rolly_wasm_signer.js');
|
|
|
6
6
|
export const {
|
|
7
7
|
amount_split,
|
|
8
8
|
compute_address_hash,
|
|
9
|
+
compute_drawn_keno,
|
|
9
10
|
compute_multi_dice,
|
|
10
11
|
compute_payout_coinflip,
|
|
11
12
|
compute_payout_dice,
|
|
13
|
+
compute_payout_keno,
|
|
14
|
+
compute_payout_limbo,
|
|
12
15
|
compute_payout_plinko,
|
|
13
16
|
compute_prediction_hash,
|
|
17
|
+
compute_prediction_hash_keno,
|
|
14
18
|
compute_roll_coinflip,
|
|
15
19
|
compute_roll_dice,
|
|
20
|
+
compute_roll_limbo,
|
|
16
21
|
compute_roll_plinko,
|
|
17
22
|
compute_server_seed_hash,
|
|
18
23
|
compute_user_seed_binding,
|
package/js/react.mjs
CHANGED
|
@@ -2,13 +2,18 @@ import { useState, useEffect } from 'react';
|
|
|
2
2
|
import init, {
|
|
3
3
|
amount_split,
|
|
4
4
|
compute_address_hash,
|
|
5
|
+
compute_drawn_keno,
|
|
5
6
|
compute_multi_dice,
|
|
6
7
|
compute_payout_coinflip,
|
|
7
8
|
compute_payout_dice,
|
|
9
|
+
compute_payout_keno,
|
|
10
|
+
compute_payout_limbo,
|
|
8
11
|
compute_payout_plinko,
|
|
9
12
|
compute_prediction_hash,
|
|
13
|
+
compute_prediction_hash_keno,
|
|
10
14
|
compute_roll_coinflip,
|
|
11
15
|
compute_roll_dice,
|
|
16
|
+
compute_roll_limbo,
|
|
12
17
|
compute_roll_plinko,
|
|
13
18
|
compute_server_seed_hash,
|
|
14
19
|
compute_user_seed_binding,
|
|
@@ -41,13 +46,18 @@ function guard(fn) {
|
|
|
41
46
|
const fns = {
|
|
42
47
|
amount_split: guard(amount_split),
|
|
43
48
|
compute_address_hash: guard(compute_address_hash),
|
|
49
|
+
compute_drawn_keno: guard(compute_drawn_keno),
|
|
44
50
|
compute_multi_dice: guard(compute_multi_dice),
|
|
45
51
|
compute_payout_coinflip: guard(compute_payout_coinflip),
|
|
46
52
|
compute_payout_dice: guard(compute_payout_dice),
|
|
53
|
+
compute_payout_keno: guard(compute_payout_keno),
|
|
54
|
+
compute_payout_limbo: guard(compute_payout_limbo),
|
|
47
55
|
compute_payout_plinko: guard(compute_payout_plinko),
|
|
48
56
|
compute_prediction_hash: guard(compute_prediction_hash),
|
|
57
|
+
compute_prediction_hash_keno:guard(compute_prediction_hash_keno),
|
|
49
58
|
compute_roll_coinflip: guard(compute_roll_coinflip),
|
|
50
59
|
compute_roll_dice: guard(compute_roll_dice),
|
|
60
|
+
compute_roll_limbo: guard(compute_roll_limbo),
|
|
51
61
|
compute_roll_plinko: guard(compute_roll_plinko),
|
|
52
62
|
compute_server_seed_hash: guard(compute_server_seed_hash),
|
|
53
63
|
compute_user_seed_binding: guard(compute_user_seed_binding),
|