@noir-lang/acvm_js 0.46.0 → 0.47.0-30c50f5.nightly
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/nodejs/acvm_js.d.ts +87 -104
- package/nodejs/acvm_js.js +197 -648
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +12 -18
- package/package.json +1 -1
- package/web/acvm_js.d.ts +99 -122
- package/web/acvm_js.js +178 -565
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +12 -18
package/nodejs/acvm_js.js
CHANGED
|
@@ -127,15 +127,6 @@ function getFloat64Memory0() {
|
|
|
127
127
|
return cachedFloat64Memory0;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
let cachedBigInt64Memory0 = null;
|
|
131
|
-
|
|
132
|
-
function getBigInt64Memory0() {
|
|
133
|
-
if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) {
|
|
134
|
-
cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer);
|
|
135
|
-
}
|
|
136
|
-
return cachedBigInt64Memory0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
130
|
function debugString(val) {
|
|
140
131
|
// primitive types
|
|
141
132
|
const type = typeof val;
|
|
@@ -225,31 +216,10 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
225
216
|
|
|
226
217
|
return real;
|
|
227
218
|
}
|
|
228
|
-
function
|
|
229
|
-
wasm.
|
|
219
|
+
function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
220
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380(arg0, arg1, addHeapObject(arg2));
|
|
230
221
|
}
|
|
231
222
|
|
|
232
|
-
/**
|
|
233
|
-
* Sets the package's logging level.
|
|
234
|
-
*
|
|
235
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
236
|
-
*/
|
|
237
|
-
module.exports.initLogLevel = function(filter) {
|
|
238
|
-
try {
|
|
239
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
240
|
-
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
241
|
-
const len0 = WASM_VECTOR_LEN;
|
|
242
|
-
wasm.initLogLevel(retptr, ptr0, len0);
|
|
243
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
244
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
245
|
-
if (r1) {
|
|
246
|
-
throw takeObject(r0);
|
|
247
|
-
}
|
|
248
|
-
} finally {
|
|
249
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
|
|
253
223
|
/**
|
|
254
224
|
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
255
225
|
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
@@ -259,144 +229,10 @@ module.exports.buildInfo = function() {
|
|
|
259
229
|
return takeObject(ret);
|
|
260
230
|
};
|
|
261
231
|
|
|
262
|
-
/**
|
|
263
|
-
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
264
|
-
* @param {string} lhs
|
|
265
|
-
* @param {string} rhs
|
|
266
|
-
* @returns {string}
|
|
267
|
-
*/
|
|
268
|
-
module.exports.and = function(lhs, rhs) {
|
|
269
|
-
const ret = wasm.and(addHeapObject(lhs), addHeapObject(rhs));
|
|
270
|
-
return takeObject(ret);
|
|
271
|
-
};
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Performs a bitwise XOR operation between `lhs` and `rhs`
|
|
275
|
-
* @param {string} lhs
|
|
276
|
-
* @param {string} rhs
|
|
277
|
-
* @returns {string}
|
|
278
|
-
*/
|
|
279
|
-
module.exports.xor = function(lhs, rhs) {
|
|
280
|
-
const ret = wasm.xor(addHeapObject(lhs), addHeapObject(rhs));
|
|
281
|
-
return takeObject(ret);
|
|
282
|
-
};
|
|
283
|
-
|
|
284
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
285
|
-
const ptr = malloc(arg.length * 1) >>> 0;
|
|
286
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
287
|
-
WASM_VECTOR_LEN = arg.length;
|
|
288
|
-
return ptr;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
232
|
function getArrayU8FromWasm0(ptr, len) {
|
|
292
233
|
ptr = ptr >>> 0;
|
|
293
234
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
294
235
|
}
|
|
295
|
-
/**
|
|
296
|
-
* Calculates the SHA256 hash of the input bytes
|
|
297
|
-
* @param {Uint8Array} inputs
|
|
298
|
-
* @returns {Uint8Array}
|
|
299
|
-
*/
|
|
300
|
-
module.exports.sha256 = function(inputs) {
|
|
301
|
-
try {
|
|
302
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
303
|
-
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
304
|
-
const len0 = WASM_VECTOR_LEN;
|
|
305
|
-
wasm.sha256(retptr, ptr0, len0);
|
|
306
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
307
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
308
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
309
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
310
|
-
return v2;
|
|
311
|
-
} finally {
|
|
312
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
313
|
-
}
|
|
314
|
-
};
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* Calculates the Blake2s256 hash of the input bytes
|
|
318
|
-
* @param {Uint8Array} inputs
|
|
319
|
-
* @returns {Uint8Array}
|
|
320
|
-
*/
|
|
321
|
-
module.exports.blake2s256 = function(inputs) {
|
|
322
|
-
try {
|
|
323
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
324
|
-
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
325
|
-
const len0 = WASM_VECTOR_LEN;
|
|
326
|
-
wasm.blake2s256(retptr, ptr0, len0);
|
|
327
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
328
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
329
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
330
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
331
|
-
return v2;
|
|
332
|
-
} finally {
|
|
333
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Calculates the Keccak256 hash of the input bytes
|
|
339
|
-
* @param {Uint8Array} inputs
|
|
340
|
-
* @returns {Uint8Array}
|
|
341
|
-
*/
|
|
342
|
-
module.exports.keccak256 = function(inputs) {
|
|
343
|
-
try {
|
|
344
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
345
|
-
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
346
|
-
const len0 = WASM_VECTOR_LEN;
|
|
347
|
-
wasm.keccak256(retptr, ptr0, len0);
|
|
348
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
349
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
350
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
351
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
352
|
-
return v2;
|
|
353
|
-
} finally {
|
|
354
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
360
|
-
* @param {Uint8Array} hashed_msg
|
|
361
|
-
* @param {Uint8Array} public_key_x_bytes
|
|
362
|
-
* @param {Uint8Array} public_key_y_bytes
|
|
363
|
-
* @param {Uint8Array} signature
|
|
364
|
-
* @returns {boolean}
|
|
365
|
-
*/
|
|
366
|
-
module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
367
|
-
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
368
|
-
const len0 = WASM_VECTOR_LEN;
|
|
369
|
-
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
|
|
370
|
-
const len1 = WASM_VECTOR_LEN;
|
|
371
|
-
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
|
|
372
|
-
const len2 = WASM_VECTOR_LEN;
|
|
373
|
-
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
374
|
-
const len3 = WASM_VECTOR_LEN;
|
|
375
|
-
const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
376
|
-
return ret !== 0;
|
|
377
|
-
};
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
381
|
-
* @param {Uint8Array} hashed_msg
|
|
382
|
-
* @param {Uint8Array} public_key_x_bytes
|
|
383
|
-
* @param {Uint8Array} public_key_y_bytes
|
|
384
|
-
* @param {Uint8Array} signature
|
|
385
|
-
* @returns {boolean}
|
|
386
|
-
*/
|
|
387
|
-
module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
388
|
-
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
389
|
-
const len0 = WASM_VECTOR_LEN;
|
|
390
|
-
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
|
|
391
|
-
const len1 = WASM_VECTOR_LEN;
|
|
392
|
-
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
|
|
393
|
-
const len2 = WASM_VECTOR_LEN;
|
|
394
|
-
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
395
|
-
const len3 = WASM_VECTOR_LEN;
|
|
396
|
-
const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
397
|
-
return ret !== 0;
|
|
398
|
-
};
|
|
399
|
-
|
|
400
236
|
/**
|
|
401
237
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
402
238
|
*
|
|
@@ -422,6 +258,12 @@ module.exports.compressWitness = function(witness_map) {
|
|
|
422
258
|
}
|
|
423
259
|
};
|
|
424
260
|
|
|
261
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
262
|
+
const ptr = malloc(arg.length * 1) >>> 0;
|
|
263
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
264
|
+
WASM_VECTOR_LEN = arg.length;
|
|
265
|
+
return ptr;
|
|
266
|
+
}
|
|
425
267
|
/**
|
|
426
268
|
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
427
269
|
* This should be used to only fetch the witness map for the main function.
|
|
@@ -496,14 +338,6 @@ module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
|
496
338
|
}
|
|
497
339
|
};
|
|
498
340
|
|
|
499
|
-
/**
|
|
500
|
-
* @returns {Promise<WasmBlackBoxFunctionSolver>}
|
|
501
|
-
*/
|
|
502
|
-
module.exports.createBlackBoxSolver = function() {
|
|
503
|
-
const ret = wasm.createBlackBoxSolver();
|
|
504
|
-
return takeObject(ret);
|
|
505
|
-
};
|
|
506
|
-
|
|
507
341
|
/**
|
|
508
342
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
509
343
|
*
|
|
@@ -519,48 +353,29 @@ module.exports.executeCircuit = function(program, initial_witness, foreign_call_
|
|
|
519
353
|
return takeObject(ret);
|
|
520
354
|
};
|
|
521
355
|
|
|
522
|
-
function _assertClass(instance, klass) {
|
|
523
|
-
if (!(instance instanceof klass)) {
|
|
524
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
525
|
-
}
|
|
526
|
-
return instance.ptr;
|
|
527
|
-
}
|
|
528
356
|
/**
|
|
529
357
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
530
358
|
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
531
359
|
*
|
|
532
|
-
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
533
360
|
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
534
361
|
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
535
362
|
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
536
363
|
* @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
|
|
537
364
|
*/
|
|
538
|
-
module.exports.executeCircuitWithReturnWitness = function(
|
|
539
|
-
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
365
|
+
module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
|
|
540
366
|
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
541
367
|
const len0 = WASM_VECTOR_LEN;
|
|
542
|
-
const ret = wasm.executeCircuitWithReturnWitness(
|
|
368
|
+
const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
543
369
|
return takeObject(ret);
|
|
544
370
|
};
|
|
545
371
|
|
|
546
372
|
/**
|
|
547
373
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
548
374
|
*
|
|
549
|
-
* @param {
|
|
550
|
-
* @param {
|
|
551
|
-
* @param {
|
|
552
|
-
* @
|
|
553
|
-
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
554
|
-
*/
|
|
555
|
-
module.exports.executeCircuitWithBlackBoxSolver = function(solver, program, initial_witness, foreign_call_handler) {
|
|
556
|
-
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
557
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
558
|
-
const len0 = WASM_VECTOR_LEN;
|
|
559
|
-
const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
560
|
-
return takeObject(ret);
|
|
561
|
-
};
|
|
562
|
-
|
|
563
|
-
/**
|
|
375
|
+
* @param {Uint8Array} program - A serialized representation of an ACIR program
|
|
376
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
|
|
377
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
|
|
378
|
+
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
564
379
|
*/
|
|
565
380
|
module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
|
|
566
381
|
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
@@ -569,16 +384,6 @@ module.exports.executeProgram = function(program, initial_witness, foreign_call_
|
|
|
569
384
|
return takeObject(ret);
|
|
570
385
|
};
|
|
571
386
|
|
|
572
|
-
/**
|
|
573
|
-
*/
|
|
574
|
-
module.exports.executeProgramWithBlackBoxSolver = function(solver, program, initial_witness, foreign_call_executor) {
|
|
575
|
-
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
576
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
577
|
-
const len0 = WASM_VECTOR_LEN;
|
|
578
|
-
const ret = wasm.executeProgramWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_executor));
|
|
579
|
-
return takeObject(ret);
|
|
580
|
-
};
|
|
581
|
-
|
|
582
387
|
/**
|
|
583
388
|
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
584
389
|
*
|
|
@@ -663,98 +468,195 @@ module.exports.getPublicWitness = function(program, solved_witness) {
|
|
|
663
468
|
}
|
|
664
469
|
};
|
|
665
470
|
|
|
666
|
-
function handleError(f, args) {
|
|
667
|
-
try {
|
|
668
|
-
return f.apply(this, args);
|
|
669
|
-
} catch (e) {
|
|
670
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
function __wbg_adapter_134(arg0, arg1, arg2, arg3, arg4) {
|
|
674
|
-
wasm.wasm_bindgen__convert__closures__invoke3_mut__h1e7d8ac96c74bd35(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
|
|
678
|
-
wasm.wasm_bindgen__convert__closures__invoke2_mut__h188e918906ff9a40(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
679
|
-
}
|
|
680
|
-
|
|
681
471
|
/**
|
|
682
|
-
*
|
|
472
|
+
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
473
|
+
* @param {string} lhs
|
|
474
|
+
* @param {string} rhs
|
|
475
|
+
* @returns {string}
|
|
683
476
|
*/
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
this.__wbg_ptr = 0;
|
|
689
|
-
|
|
690
|
-
return ptr;
|
|
691
|
-
}
|
|
477
|
+
module.exports.and = function(lhs, rhs) {
|
|
478
|
+
const ret = wasm.and(addHeapObject(lhs), addHeapObject(rhs));
|
|
479
|
+
return takeObject(ret);
|
|
480
|
+
};
|
|
692
481
|
|
|
693
|
-
free() {
|
|
694
|
-
const ptr = this.__destroy_into_raw();
|
|
695
|
-
wasm.__wbg_trap_free(ptr);
|
|
696
|
-
}
|
|
697
|
-
/**
|
|
698
|
-
* A marker method to indicate that an object is an instance of the `Trap`
|
|
699
|
-
* class.
|
|
700
|
-
*/
|
|
701
|
-
static __wbg_wasmer_trap() {
|
|
702
|
-
wasm.trap___wbg_wasmer_trap();
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
module.exports.Trap = Trap;
|
|
706
482
|
/**
|
|
483
|
+
* Performs a bitwise XOR operation between `lhs` and `rhs`
|
|
484
|
+
* @param {string} lhs
|
|
485
|
+
* @param {string} rhs
|
|
486
|
+
* @returns {string}
|
|
707
487
|
*/
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
const obj = Object.create(WasmBlackBoxFunctionSolver.prototype);
|
|
713
|
-
obj.__wbg_ptr = ptr;
|
|
714
|
-
|
|
715
|
-
return obj;
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
__destroy_into_raw() {
|
|
719
|
-
const ptr = this.__wbg_ptr;
|
|
720
|
-
this.__wbg_ptr = 0;
|
|
721
|
-
|
|
722
|
-
return ptr;
|
|
723
|
-
}
|
|
488
|
+
module.exports.xor = function(lhs, rhs) {
|
|
489
|
+
const ret = wasm.xor(addHeapObject(lhs), addHeapObject(rhs));
|
|
490
|
+
return takeObject(ret);
|
|
491
|
+
};
|
|
724
492
|
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
493
|
+
/**
|
|
494
|
+
* Calculates the SHA256 hash of the input bytes
|
|
495
|
+
* @param {Uint8Array} inputs
|
|
496
|
+
* @returns {Uint8Array}
|
|
497
|
+
*/
|
|
498
|
+
module.exports.sha256 = function(inputs) {
|
|
499
|
+
try {
|
|
500
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
501
|
+
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
502
|
+
const len0 = WASM_VECTOR_LEN;
|
|
503
|
+
wasm.sha256(retptr, ptr0, len0);
|
|
504
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
505
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
506
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
507
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
508
|
+
return v2;
|
|
509
|
+
} finally {
|
|
510
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
728
511
|
}
|
|
729
|
-
}
|
|
730
|
-
module.exports.WasmBlackBoxFunctionSolver = WasmBlackBoxFunctionSolver;
|
|
731
|
-
|
|
732
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
733
|
-
takeObject(arg0);
|
|
734
512
|
};
|
|
735
513
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
514
|
+
/**
|
|
515
|
+
* Calculates the Blake2s256 hash of the input bytes
|
|
516
|
+
* @param {Uint8Array} inputs
|
|
517
|
+
* @returns {Uint8Array}
|
|
518
|
+
*/
|
|
519
|
+
module.exports.blake2s256 = function(inputs) {
|
|
520
|
+
try {
|
|
521
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
522
|
+
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
523
|
+
const len0 = WASM_VECTOR_LEN;
|
|
524
|
+
wasm.blake2s256(retptr, ptr0, len0);
|
|
525
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
526
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
527
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
528
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
529
|
+
return v2;
|
|
530
|
+
} finally {
|
|
531
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
532
|
+
}
|
|
533
|
+
};
|
|
740
534
|
|
|
741
|
-
|
|
742
|
-
|
|
535
|
+
/**
|
|
536
|
+
* Calculates the Keccak256 hash of the input bytes
|
|
537
|
+
* @param {Uint8Array} inputs
|
|
538
|
+
* @returns {Uint8Array}
|
|
539
|
+
*/
|
|
540
|
+
module.exports.keccak256 = function(inputs) {
|
|
541
|
+
try {
|
|
542
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
543
|
+
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
544
|
+
const len0 = WASM_VECTOR_LEN;
|
|
545
|
+
wasm.keccak256(retptr, ptr0, len0);
|
|
546
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
547
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
548
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
549
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
550
|
+
return v2;
|
|
551
|
+
} finally {
|
|
552
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
553
|
+
}
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
558
|
+
* @param {Uint8Array} hashed_msg
|
|
559
|
+
* @param {Uint8Array} public_key_x_bytes
|
|
560
|
+
* @param {Uint8Array} public_key_y_bytes
|
|
561
|
+
* @param {Uint8Array} signature
|
|
562
|
+
* @returns {boolean}
|
|
563
|
+
*/
|
|
564
|
+
module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
565
|
+
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
566
|
+
const len0 = WASM_VECTOR_LEN;
|
|
567
|
+
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
|
|
568
|
+
const len1 = WASM_VECTOR_LEN;
|
|
569
|
+
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
|
|
570
|
+
const len2 = WASM_VECTOR_LEN;
|
|
571
|
+
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
572
|
+
const len3 = WASM_VECTOR_LEN;
|
|
573
|
+
const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
574
|
+
return ret !== 0;
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
579
|
+
* @param {Uint8Array} hashed_msg
|
|
580
|
+
* @param {Uint8Array} public_key_x_bytes
|
|
581
|
+
* @param {Uint8Array} public_key_y_bytes
|
|
582
|
+
* @param {Uint8Array} signature
|
|
583
|
+
* @returns {boolean}
|
|
584
|
+
*/
|
|
585
|
+
module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
586
|
+
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
587
|
+
const len0 = WASM_VECTOR_LEN;
|
|
588
|
+
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
|
|
589
|
+
const len1 = WASM_VECTOR_LEN;
|
|
590
|
+
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
|
|
591
|
+
const len2 = WASM_VECTOR_LEN;
|
|
592
|
+
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
593
|
+
const len3 = WASM_VECTOR_LEN;
|
|
594
|
+
const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
595
|
+
return ret !== 0;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Sets the package's logging level.
|
|
600
|
+
*
|
|
601
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
602
|
+
*/
|
|
603
|
+
module.exports.initLogLevel = function(filter) {
|
|
604
|
+
try {
|
|
605
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
606
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
607
|
+
const len0 = WASM_VECTOR_LEN;
|
|
608
|
+
wasm.initLogLevel(retptr, ptr0, len0);
|
|
609
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
610
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
611
|
+
if (r1) {
|
|
612
|
+
throw takeObject(r0);
|
|
613
|
+
}
|
|
614
|
+
} finally {
|
|
615
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
function __wbg_adapter_76(arg0, arg1, arg2, arg3, arg4) {
|
|
620
|
+
wasm.wasm_bindgen__convert__closures__invoke3_mut__h629417323d5efbaa(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
function handleError(f, args) {
|
|
624
|
+
try {
|
|
625
|
+
return f.apply(this, args);
|
|
626
|
+
} catch (e) {
|
|
627
|
+
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
function __wbg_adapter_93(arg0, arg1, arg2, arg3) {
|
|
631
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h4efdd1050cfb3ea7(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
635
|
+
takeObject(arg0);
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
639
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
743
640
|
return addHeapObject(ret);
|
|
744
641
|
};
|
|
745
642
|
|
|
746
|
-
module.exports.
|
|
747
|
-
const ret =
|
|
643
|
+
module.exports.__wbindgen_is_array = function(arg0) {
|
|
644
|
+
const ret = Array.isArray(getObject(arg0));
|
|
645
|
+
return ret;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
module.exports.__wbg_constructor_971e67e66cc5bd6a = function(arg0) {
|
|
649
|
+
const ret = new Error(takeObject(arg0));
|
|
748
650
|
return addHeapObject(ret);
|
|
749
651
|
};
|
|
750
652
|
|
|
751
|
-
module.exports.
|
|
752
|
-
const ret =
|
|
653
|
+
module.exports.__wbg_new_193bac1dd2be232d = function() {
|
|
654
|
+
const ret = new Map();
|
|
753
655
|
return addHeapObject(ret);
|
|
754
656
|
};
|
|
755
657
|
|
|
756
|
-
module.exports.
|
|
757
|
-
const ret =
|
|
658
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
659
|
+
const ret = arg0;
|
|
758
660
|
return addHeapObject(ret);
|
|
759
661
|
};
|
|
760
662
|
|
|
@@ -767,14 +669,11 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
767
669
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
768
670
|
};
|
|
769
671
|
|
|
770
|
-
module.exports.
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
module.exports.__wbg_constructor_81b34c49dcbdd2af = function(arg0) {
|
|
776
|
-
const ret = new Error(takeObject(arg0));
|
|
777
|
-
return addHeapObject(ret);
|
|
672
|
+
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
673
|
+
const obj = getObject(arg1);
|
|
674
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
675
|
+
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
676
|
+
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
778
677
|
};
|
|
779
678
|
|
|
780
679
|
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
@@ -787,21 +686,9 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
787
686
|
return ret;
|
|
788
687
|
};
|
|
789
688
|
|
|
790
|
-
module.exports.
|
|
791
|
-
const ret =
|
|
792
|
-
return ret;
|
|
793
|
-
};
|
|
794
|
-
|
|
795
|
-
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
796
|
-
const obj = getObject(arg1);
|
|
797
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
798
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
799
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
800
|
-
};
|
|
801
|
-
|
|
802
|
-
module.exports.__wbindgen_is_array = function(arg0) {
|
|
803
|
-
const ret = Array.isArray(getObject(arg0));
|
|
804
|
-
return ret;
|
|
689
|
+
module.exports.__wbg_new_f139361aad331bd0 = function() {
|
|
690
|
+
const ret = new Array();
|
|
691
|
+
return addHeapObject(ret);
|
|
805
692
|
};
|
|
806
693
|
|
|
807
694
|
module.exports.__wbindgen_is_string = function(arg0) {
|
|
@@ -809,11 +696,6 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
809
696
|
return ret;
|
|
810
697
|
};
|
|
811
698
|
|
|
812
|
-
module.exports.__wbg_new_ee5ac63ff3b0fa4d = function() {
|
|
813
|
-
const ret = new Array();
|
|
814
|
-
return addHeapObject(ret);
|
|
815
|
-
};
|
|
816
|
-
|
|
817
699
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
818
700
|
const ret = new Error();
|
|
819
701
|
return addHeapObject(ret);
|
|
@@ -839,63 +721,6 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
839
721
|
}
|
|
840
722
|
};
|
|
841
723
|
|
|
842
|
-
module.exports.__wbindgen_ge = function(arg0, arg1) {
|
|
843
|
-
const ret = getObject(arg0) >= getObject(arg1);
|
|
844
|
-
return ret;
|
|
845
|
-
};
|
|
846
|
-
|
|
847
|
-
module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
848
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
849
|
-
return addHeapObject(ret);
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
module.exports.__wbindgen_shr = function(arg0, arg1) {
|
|
853
|
-
const ret = getObject(arg0) >> getObject(arg1);
|
|
854
|
-
return addHeapObject(ret);
|
|
855
|
-
};
|
|
856
|
-
|
|
857
|
-
module.exports.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
858
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
859
|
-
return ret;
|
|
860
|
-
};
|
|
861
|
-
|
|
862
|
-
module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
863
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
864
|
-
return ret;
|
|
865
|
-
};
|
|
866
|
-
|
|
867
|
-
module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
868
|
-
const ret = arg0;
|
|
869
|
-
return addHeapObject(ret);
|
|
870
|
-
};
|
|
871
|
-
|
|
872
|
-
module.exports.__wbindgen_bigint_from_u128 = function(arg0, arg1) {
|
|
873
|
-
const ret = BigInt.asUintN(64, arg0) << BigInt(64) | BigInt.asUintN(64, arg1);
|
|
874
|
-
return addHeapObject(ret);
|
|
875
|
-
};
|
|
876
|
-
|
|
877
|
-
module.exports.__wbindgen_is_object = function(arg0) {
|
|
878
|
-
const val = getObject(arg0);
|
|
879
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
880
|
-
return ret;
|
|
881
|
-
};
|
|
882
|
-
|
|
883
|
-
module.exports.__wbindgen_is_function = function(arg0) {
|
|
884
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
885
|
-
return ret;
|
|
886
|
-
};
|
|
887
|
-
|
|
888
|
-
module.exports.__wbg_instanceof_Global_f4b019d2b45e18ab = function(arg0) {
|
|
889
|
-
let result;
|
|
890
|
-
try {
|
|
891
|
-
result = getObject(arg0) instanceof WebAssembly.Global;
|
|
892
|
-
} catch {
|
|
893
|
-
result = false;
|
|
894
|
-
}
|
|
895
|
-
const ret = result;
|
|
896
|
-
return ret;
|
|
897
|
-
};
|
|
898
|
-
|
|
899
724
|
module.exports.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
|
|
900
725
|
console.debug(getObject(arg0));
|
|
901
726
|
};
|
|
@@ -928,44 +753,6 @@ module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
|
928
753
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
929
754
|
};
|
|
930
755
|
|
|
931
|
-
module.exports.__wbg_crypto_c48a774b022d20ac = function(arg0) {
|
|
932
|
-
const ret = getObject(arg0).crypto;
|
|
933
|
-
return addHeapObject(ret);
|
|
934
|
-
};
|
|
935
|
-
|
|
936
|
-
module.exports.__wbg_process_298734cf255a885d = function(arg0) {
|
|
937
|
-
const ret = getObject(arg0).process;
|
|
938
|
-
return addHeapObject(ret);
|
|
939
|
-
};
|
|
940
|
-
|
|
941
|
-
module.exports.__wbg_versions_e2e78e134e3e5d01 = function(arg0) {
|
|
942
|
-
const ret = getObject(arg0).versions;
|
|
943
|
-
return addHeapObject(ret);
|
|
944
|
-
};
|
|
945
|
-
|
|
946
|
-
module.exports.__wbg_node_1cd7a5d853dbea79 = function(arg0) {
|
|
947
|
-
const ret = getObject(arg0).node;
|
|
948
|
-
return addHeapObject(ret);
|
|
949
|
-
};
|
|
950
|
-
|
|
951
|
-
module.exports.__wbg_msCrypto_bcb970640f50a1e8 = function(arg0) {
|
|
952
|
-
const ret = getObject(arg0).msCrypto;
|
|
953
|
-
return addHeapObject(ret);
|
|
954
|
-
};
|
|
955
|
-
|
|
956
|
-
module.exports.__wbg_require_8f08ceecec0f4fee = function() { return handleError(function () {
|
|
957
|
-
const ret = module.require;
|
|
958
|
-
return addHeapObject(ret);
|
|
959
|
-
}, arguments) };
|
|
960
|
-
|
|
961
|
-
module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
|
|
962
|
-
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
963
|
-
}, arguments) };
|
|
964
|
-
|
|
965
|
-
module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return handleError(function (arg0, arg1) {
|
|
966
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
967
|
-
}, arguments) };
|
|
968
|
-
|
|
969
756
|
module.exports.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
|
|
970
757
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
971
758
|
return addHeapObject(ret);
|
|
@@ -981,65 +768,11 @@ module.exports.__wbg_new_0394642eae39db16 = function() {
|
|
|
981
768
|
return addHeapObject(ret);
|
|
982
769
|
};
|
|
983
770
|
|
|
984
|
-
module.exports.__wbg_BigInt_9523742cb675bb6f = function(arg0) {
|
|
985
|
-
const ret = BigInt(getObject(arg0));
|
|
986
|
-
return addHeapObject(ret);
|
|
987
|
-
};
|
|
988
|
-
|
|
989
|
-
module.exports.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
|
|
990
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
991
|
-
return addHeapObject(ret);
|
|
992
|
-
};
|
|
993
|
-
|
|
994
771
|
module.exports.__wbg_new_0f2b71ca2f2a6029 = function() {
|
|
995
772
|
const ret = new Map();
|
|
996
773
|
return addHeapObject(ret);
|
|
997
774
|
};
|
|
998
775
|
|
|
999
|
-
module.exports.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) {
|
|
1000
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1001
|
-
return addHeapObject(ret);
|
|
1002
|
-
}, arguments) };
|
|
1003
|
-
|
|
1004
|
-
module.exports.__wbg_call_557a2f2deacc4912 = function() { return handleError(function (arg0, arg1) {
|
|
1005
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
1006
|
-
return addHeapObject(ret);
|
|
1007
|
-
}, arguments) };
|
|
1008
|
-
|
|
1009
|
-
module.exports.__wbg_new_2b6fea4ea03b1b95 = function() {
|
|
1010
|
-
const ret = new Object();
|
|
1011
|
-
return addHeapObject(ret);
|
|
1012
|
-
};
|
|
1013
|
-
|
|
1014
|
-
module.exports.__wbg_self_742dd6eab3e9211e = function() { return handleError(function () {
|
|
1015
|
-
const ret = self.self;
|
|
1016
|
-
return addHeapObject(ret);
|
|
1017
|
-
}, arguments) };
|
|
1018
|
-
|
|
1019
|
-
module.exports.__wbg_window_c409e731db53a0e2 = function() { return handleError(function () {
|
|
1020
|
-
const ret = window.window;
|
|
1021
|
-
return addHeapObject(ret);
|
|
1022
|
-
}, arguments) };
|
|
1023
|
-
|
|
1024
|
-
module.exports.__wbg_globalThis_b70c095388441f2d = function() { return handleError(function () {
|
|
1025
|
-
const ret = globalThis.globalThis;
|
|
1026
|
-
return addHeapObject(ret);
|
|
1027
|
-
}, arguments) };
|
|
1028
|
-
|
|
1029
|
-
module.exports.__wbg_global_1c72617491ed7194 = function() { return handleError(function () {
|
|
1030
|
-
const ret = global.global;
|
|
1031
|
-
return addHeapObject(ret);
|
|
1032
|
-
}, arguments) };
|
|
1033
|
-
|
|
1034
|
-
module.exports.__wbg_newwithlength_cd1db47a173e3944 = function(arg0) {
|
|
1035
|
-
const ret = new Array(arg0 >>> 0);
|
|
1036
|
-
return addHeapObject(ret);
|
|
1037
|
-
};
|
|
1038
|
-
|
|
1039
|
-
module.exports.__wbg_set_b4da98d504ac6091 = function(arg0, arg1, arg2) {
|
|
1040
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1041
|
-
};
|
|
1042
|
-
|
|
1043
776
|
module.exports.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
|
|
1044
777
|
const ret = Array.from(getObject(arg0));
|
|
1045
778
|
return addHeapObject(ret);
|
|
@@ -1052,7 +785,7 @@ module.exports.__wbg_forEach_5ae261259d7517c8 = function(arg0, arg1, arg2) {
|
|
|
1052
785
|
const a = state0.a;
|
|
1053
786
|
state0.a = 0;
|
|
1054
787
|
try {
|
|
1055
|
-
return
|
|
788
|
+
return __wbg_adapter_76(a, state0.b, arg0, arg1, arg2);
|
|
1056
789
|
} finally {
|
|
1057
790
|
state0.a = a;
|
|
1058
791
|
}
|
|
@@ -1073,30 +806,6 @@ module.exports.__wbg_reverse_a322332d916e2705 = function(arg0) {
|
|
|
1073
806
|
return addHeapObject(ret);
|
|
1074
807
|
};
|
|
1075
808
|
|
|
1076
|
-
module.exports.__wbg_byteLength_1a59a59856fc656a = function(arg0) {
|
|
1077
|
-
const ret = getObject(arg0).byteLength;
|
|
1078
|
-
return ret;
|
|
1079
|
-
};
|
|
1080
|
-
|
|
1081
|
-
module.exports.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
|
|
1082
|
-
const ret = getObject(arg1).toString(arg2);
|
|
1083
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1084
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1085
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1086
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1087
|
-
};
|
|
1088
|
-
|
|
1089
|
-
module.exports.__wbg_instanceof_Error_fac23a8832b241da = function(arg0) {
|
|
1090
|
-
let result;
|
|
1091
|
-
try {
|
|
1092
|
-
result = getObject(arg0) instanceof Error;
|
|
1093
|
-
} catch {
|
|
1094
|
-
result = false;
|
|
1095
|
-
}
|
|
1096
|
-
const ret = result;
|
|
1097
|
-
return ret;
|
|
1098
|
-
};
|
|
1099
|
-
|
|
1100
809
|
module.exports.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
|
|
1101
810
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1102
811
|
return addHeapObject(ret);
|
|
@@ -1106,22 +815,6 @@ module.exports.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
|
|
|
1106
815
|
getObject(arg0).cause = getObject(arg1);
|
|
1107
816
|
};
|
|
1108
817
|
|
|
1109
|
-
module.exports.__wbg_message_eab7d45ec69a2135 = function(arg0) {
|
|
1110
|
-
const ret = getObject(arg0).message;
|
|
1111
|
-
return addHeapObject(ret);
|
|
1112
|
-
};
|
|
1113
|
-
|
|
1114
|
-
module.exports.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
|
|
1115
|
-
let result;
|
|
1116
|
-
try {
|
|
1117
|
-
result = getObject(arg0) instanceof Function;
|
|
1118
|
-
} catch {
|
|
1119
|
-
result = false;
|
|
1120
|
-
}
|
|
1121
|
-
const ret = result;
|
|
1122
|
-
return ret;
|
|
1123
|
-
};
|
|
1124
|
-
|
|
1125
818
|
module.exports.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1126
819
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
1127
820
|
return addHeapObject(ret);
|
|
@@ -1132,16 +825,6 @@ module.exports.__wbg_call_4c73e4aecced6a7d = function() { return handleError(fun
|
|
|
1132
825
|
return addHeapObject(ret);
|
|
1133
826
|
}, arguments) };
|
|
1134
827
|
|
|
1135
|
-
module.exports.__wbg_bind_7d5ce7224bedd5b8 = function(arg0, arg1, arg2) {
|
|
1136
|
-
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2));
|
|
1137
|
-
return addHeapObject(ret);
|
|
1138
|
-
};
|
|
1139
|
-
|
|
1140
|
-
module.exports.__wbg_bind_f5218b29220675c3 = function(arg0, arg1, arg2, arg3) {
|
|
1141
|
-
const ret = getObject(arg0).bind(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1142
|
-
return addHeapObject(ret);
|
|
1143
|
-
};
|
|
1144
|
-
|
|
1145
828
|
module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
|
|
1146
829
|
try {
|
|
1147
830
|
var state0 = {a: arg1, b: arg2};
|
|
@@ -1149,7 +832,7 @@ module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
|
|
|
1149
832
|
const a = state0.a;
|
|
1150
833
|
state0.a = 0;
|
|
1151
834
|
try {
|
|
1152
|
-
return
|
|
835
|
+
return __wbg_adapter_93(a, state0.b, arg0, arg1);
|
|
1153
836
|
} finally {
|
|
1154
837
|
state0.a = a;
|
|
1155
838
|
}
|
|
@@ -1165,32 +848,11 @@ module.exports.__wbg_set_da7be7bf0e037b14 = function(arg0, arg1, arg2) {
|
|
|
1165
848
|
return addHeapObject(ret);
|
|
1166
849
|
};
|
|
1167
850
|
|
|
1168
|
-
module.exports.__wbg_instanceof_Object_a9e9e5766628e8b5 = function(arg0) {
|
|
1169
|
-
let result;
|
|
1170
|
-
try {
|
|
1171
|
-
result = getObject(arg0) instanceof Object;
|
|
1172
|
-
} catch {
|
|
1173
|
-
result = false;
|
|
1174
|
-
}
|
|
1175
|
-
const ret = result;
|
|
1176
|
-
return ret;
|
|
1177
|
-
};
|
|
1178
|
-
|
|
1179
|
-
module.exports.__wbg_constructor_f2623999a1f453eb = function(arg0) {
|
|
1180
|
-
const ret = getObject(arg0).constructor;
|
|
1181
|
-
return addHeapObject(ret);
|
|
1182
|
-
};
|
|
1183
|
-
|
|
1184
851
|
module.exports.__wbg_fromEntries_d1b310956d20d858 = function() { return handleError(function (arg0) {
|
|
1185
852
|
const ret = Object.fromEntries(getObject(arg0));
|
|
1186
853
|
return addHeapObject(ret);
|
|
1187
854
|
}, arguments) };
|
|
1188
855
|
|
|
1189
|
-
module.exports.__wbg_toString_e2b23ac99490a381 = function(arg0) {
|
|
1190
|
-
const ret = getObject(arg0).toString();
|
|
1191
|
-
return addHeapObject(ret);
|
|
1192
|
-
};
|
|
1193
|
-
|
|
1194
856
|
module.exports.__wbg_values_099fd000c271c313 = function(arg0) {
|
|
1195
857
|
const ret = Object.values(getObject(arg0));
|
|
1196
858
|
return addHeapObject(ret);
|
|
@@ -1203,7 +865,7 @@ module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
|
|
|
1203
865
|
const a = state0.a;
|
|
1204
866
|
state0.a = 0;
|
|
1205
867
|
try {
|
|
1206
|
-
return
|
|
868
|
+
return __wbg_adapter_93(a, state0.b, arg0, arg1);
|
|
1207
869
|
} finally {
|
|
1208
870
|
state0.a = a;
|
|
1209
871
|
}
|
|
@@ -1230,119 +892,16 @@ module.exports.__wbg_then_835b073a479138e5 = function(arg0, arg1, arg2) {
|
|
|
1230
892
|
return addHeapObject(ret);
|
|
1231
893
|
};
|
|
1232
894
|
|
|
1233
|
-
module.exports.__wbg_buffer_55ba7a6b1b92e2ac = function(arg0) {
|
|
1234
|
-
const ret = getObject(arg0).buffer;
|
|
1235
|
-
return addHeapObject(ret);
|
|
1236
|
-
};
|
|
1237
|
-
|
|
1238
|
-
module.exports.__wbg_newwithbyteoffsetandlength_88d1d8be5df94b9b = function(arg0, arg1, arg2) {
|
|
1239
|
-
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
1240
|
-
return addHeapObject(ret);
|
|
1241
|
-
};
|
|
1242
|
-
|
|
1243
|
-
module.exports.__wbg_new_09938a7d020f049b = function(arg0) {
|
|
1244
|
-
const ret = new Uint8Array(getObject(arg0));
|
|
1245
|
-
return addHeapObject(ret);
|
|
1246
|
-
};
|
|
1247
|
-
|
|
1248
|
-
module.exports.__wbg_set_3698e3ca519b3c3c = function(arg0, arg1, arg2) {
|
|
1249
|
-
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
1250
|
-
};
|
|
1251
|
-
|
|
1252
|
-
module.exports.__wbg_length_0aab7ffd65ad19ed = function(arg0) {
|
|
1253
|
-
const ret = getObject(arg0).length;
|
|
1254
|
-
return ret;
|
|
1255
|
-
};
|
|
1256
|
-
|
|
1257
|
-
module.exports.__wbg_newwithlength_89eeca401d8918c2 = function(arg0) {
|
|
1258
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
1259
|
-
return addHeapObject(ret);
|
|
1260
|
-
};
|
|
1261
|
-
|
|
1262
|
-
module.exports.__wbg_subarray_d82be056deb4ad27 = function(arg0, arg1, arg2) {
|
|
1263
|
-
const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1264
|
-
return addHeapObject(ret);
|
|
1265
|
-
};
|
|
1266
|
-
|
|
1267
895
|
module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
|
|
1268
896
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1269
897
|
return addHeapObject(ret);
|
|
1270
898
|
}, arguments) };
|
|
1271
899
|
|
|
1272
|
-
module.exports.__wbg_compile_eefe73dfb19bff3d = function(arg0) {
|
|
1273
|
-
const ret = WebAssembly.compile(getObject(arg0));
|
|
1274
|
-
return addHeapObject(ret);
|
|
1275
|
-
};
|
|
1276
|
-
|
|
1277
|
-
module.exports.__wbg_instantiate_e61ee50cd947cd36 = function(arg0, arg1) {
|
|
1278
|
-
const ret = WebAssembly.instantiate(getObject(arg0), getObject(arg1));
|
|
1279
|
-
return addHeapObject(ret);
|
|
1280
|
-
};
|
|
1281
|
-
|
|
1282
|
-
module.exports.__wbg_exports_311291a1333429a3 = function(arg0) {
|
|
1283
|
-
const ret = getObject(arg0).exports;
|
|
1284
|
-
return addHeapObject(ret);
|
|
1285
|
-
};
|
|
1286
|
-
|
|
1287
|
-
module.exports.__wbg_exports_12505982ae149cb0 = function(arg0) {
|
|
1288
|
-
const ret = WebAssembly.Module.exports(getObject(arg0));
|
|
1289
|
-
return addHeapObject(ret);
|
|
1290
|
-
};
|
|
1291
|
-
|
|
1292
|
-
module.exports.__wbg_instanceof_Table_b0af5234a12a19f9 = function(arg0) {
|
|
1293
|
-
let result;
|
|
1294
|
-
try {
|
|
1295
|
-
result = getObject(arg0) instanceof WebAssembly.Table;
|
|
1296
|
-
} catch {
|
|
1297
|
-
result = false;
|
|
1298
|
-
}
|
|
1299
|
-
const ret = result;
|
|
1300
|
-
return ret;
|
|
1301
|
-
};
|
|
1302
|
-
|
|
1303
|
-
module.exports.__wbg_get_b5def15f90c3e295 = function() { return handleError(function (arg0, arg1) {
|
|
1304
|
-
const ret = getObject(arg0).get(arg1 >>> 0);
|
|
1305
|
-
return addHeapObject(ret);
|
|
1306
|
-
}, arguments) };
|
|
1307
|
-
|
|
1308
|
-
module.exports.__wbg_instanceof_Memory_331618ccd3fa615d = function(arg0) {
|
|
1309
|
-
let result;
|
|
1310
|
-
try {
|
|
1311
|
-
result = getObject(arg0) instanceof WebAssembly.Memory;
|
|
1312
|
-
} catch {
|
|
1313
|
-
result = false;
|
|
1314
|
-
}
|
|
1315
|
-
const ret = result;
|
|
1316
|
-
return ret;
|
|
1317
|
-
};
|
|
1318
|
-
|
|
1319
|
-
module.exports.__wbg_new_e40873b83efb2dcd = function() { return handleError(function (arg0) {
|
|
1320
|
-
const ret = new WebAssembly.Memory(getObject(arg0));
|
|
1321
|
-
return addHeapObject(ret);
|
|
1322
|
-
}, arguments) };
|
|
1323
|
-
|
|
1324
|
-
module.exports.__wbg_apply_46ea2bb0ad750196 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1325
|
-
const ret = Reflect.apply(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1326
|
-
return addHeapObject(ret);
|
|
1327
|
-
}, arguments) };
|
|
1328
|
-
|
|
1329
|
-
module.exports.__wbg_getPrototypeOf_7dc7a2328db2bc0e = function() { return handleError(function (arg0) {
|
|
1330
|
-
const ret = Reflect.getPrototypeOf(getObject(arg0));
|
|
1331
|
-
return addHeapObject(ret);
|
|
1332
|
-
}, arguments) };
|
|
1333
|
-
|
|
1334
900
|
module.exports.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1335
901
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1336
902
|
return ret;
|
|
1337
903
|
}, arguments) };
|
|
1338
904
|
|
|
1339
|
-
module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
1340
|
-
const v = getObject(arg1);
|
|
1341
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
1342
|
-
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
1343
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
1344
|
-
};
|
|
1345
|
-
|
|
1346
905
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
1347
906
|
const ret = debugString(getObject(arg1));
|
|
1348
907
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1355,18 +914,8 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
|
1355
914
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1356
915
|
};
|
|
1357
916
|
|
|
1358
|
-
module.exports.
|
|
1359
|
-
const ret =
|
|
1360
|
-
return addHeapObject(ret);
|
|
1361
|
-
};
|
|
1362
|
-
|
|
1363
|
-
module.exports.__wbindgen_function_table = function() {
|
|
1364
|
-
const ret = wasm.__wbindgen_export_2;
|
|
1365
|
-
return addHeapObject(ret);
|
|
1366
|
-
};
|
|
1367
|
-
|
|
1368
|
-
module.exports.__wbindgen_closure_wrapper2147 = function(arg0, arg1, arg2) {
|
|
1369
|
-
const ret = makeMutClosure(arg0, arg1, 720, __wbg_adapter_52);
|
|
917
|
+
module.exports.__wbindgen_closure_wrapper748 = function(arg0, arg1, arg2) {
|
|
918
|
+
const ret = makeMutClosure(arg0, arg1, 246, __wbg_adapter_22);
|
|
1370
919
|
return addHeapObject(ret);
|
|
1371
920
|
};
|
|
1372
921
|
|