@noir-lang/acvm_js 0.42.0 → 0.43.0-0adeb08.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 +121 -70
- package/nodejs/acvm_js.js +426 -292
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +21 -15
- package/package.json +2 -4
- package/web/acvm_js.d.ts +142 -85
- package/web/acvm_js.js +366 -238
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +21 -15
package/nodejs/acvm_js.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const {
|
|
4
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
5
5
|
|
|
6
6
|
const heap = new Array(128).fill(undefined);
|
|
7
7
|
|
|
@@ -23,6 +23,24 @@ function takeObject(idx) {
|
|
|
23
23
|
return ret;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
27
|
+
|
|
28
|
+
cachedTextDecoder.decode();
|
|
29
|
+
|
|
30
|
+
let cachedUint8Memory0 = null;
|
|
31
|
+
|
|
32
|
+
function getUint8Memory0() {
|
|
33
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
34
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
35
|
+
}
|
|
36
|
+
return cachedUint8Memory0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getStringFromWasm0(ptr, len) {
|
|
40
|
+
ptr = ptr >>> 0;
|
|
41
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
42
|
+
}
|
|
43
|
+
|
|
26
44
|
function addHeapObject(obj) {
|
|
27
45
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
28
46
|
const idx = heap_next;
|
|
@@ -32,17 +50,30 @@ function addHeapObject(obj) {
|
|
|
32
50
|
return idx;
|
|
33
51
|
}
|
|
34
52
|
|
|
35
|
-
|
|
53
|
+
function isLikeNone(x) {
|
|
54
|
+
return x === undefined || x === null;
|
|
55
|
+
}
|
|
36
56
|
|
|
37
|
-
let
|
|
57
|
+
let cachedFloat64Memory0 = null;
|
|
38
58
|
|
|
39
|
-
function
|
|
40
|
-
if (
|
|
41
|
-
|
|
59
|
+
function getFloat64Memory0() {
|
|
60
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
61
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
42
62
|
}
|
|
43
|
-
return
|
|
63
|
+
return cachedFloat64Memory0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let cachedInt32Memory0 = null;
|
|
67
|
+
|
|
68
|
+
function getInt32Memory0() {
|
|
69
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
70
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
71
|
+
}
|
|
72
|
+
return cachedInt32Memory0;
|
|
44
73
|
}
|
|
45
74
|
|
|
75
|
+
let WASM_VECTOR_LEN = 0;
|
|
76
|
+
|
|
46
77
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
47
78
|
|
|
48
79
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -96,37 +127,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
96
127
|
return ptr;
|
|
97
128
|
}
|
|
98
129
|
|
|
99
|
-
function isLikeNone(x) {
|
|
100
|
-
return x === undefined || x === null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
let cachedInt32Memory0 = null;
|
|
104
|
-
|
|
105
|
-
function getInt32Memory0() {
|
|
106
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
107
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
108
|
-
}
|
|
109
|
-
return cachedInt32Memory0;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
113
|
-
|
|
114
|
-
cachedTextDecoder.decode();
|
|
115
|
-
|
|
116
|
-
function getStringFromWasm0(ptr, len) {
|
|
117
|
-
ptr = ptr >>> 0;
|
|
118
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
let cachedFloat64Memory0 = null;
|
|
122
|
-
|
|
123
|
-
function getFloat64Memory0() {
|
|
124
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
125
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
126
|
-
}
|
|
127
|
-
return cachedFloat64Memory0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
130
|
let cachedBigInt64Memory0 = null;
|
|
131
131
|
|
|
132
132
|
function getBigInt64Memory0() {
|
|
@@ -229,140 +229,135 @@ function __wbg_adapter_52(arg0, arg1, arg2) {
|
|
|
229
229
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hfdf1d0fa4debaf70(arg0, arg1, addHeapObject(arg2));
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
function
|
|
233
|
-
|
|
234
|
-
getUint8Memory0().
|
|
235
|
-
WASM_VECTOR_LEN = arg.length;
|
|
236
|
-
return ptr;
|
|
232
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
233
|
+
ptr = ptr >>> 0;
|
|
234
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
237
235
|
}
|
|
238
236
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* @param {
|
|
242
|
-
* @
|
|
243
|
-
* @param {Uint8Array} signature
|
|
244
|
-
* @returns {boolean}
|
|
245
|
-
*/
|
|
246
|
-
module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
247
|
-
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
248
|
-
const len0 = WASM_VECTOR_LEN;
|
|
249
|
-
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
|
|
250
|
-
const len1 = WASM_VECTOR_LEN;
|
|
251
|
-
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
|
|
252
|
-
const len2 = WASM_VECTOR_LEN;
|
|
253
|
-
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
254
|
-
const len3 = WASM_VECTOR_LEN;
|
|
255
|
-
const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
256
|
-
return ret !== 0;
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
261
|
-
* @param {Uint8Array} hashed_msg
|
|
262
|
-
* @param {Uint8Array} public_key_x_bytes
|
|
263
|
-
* @param {Uint8Array} public_key_y_bytes
|
|
264
|
-
* @param {Uint8Array} signature
|
|
265
|
-
* @returns {boolean}
|
|
237
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
238
|
+
*
|
|
239
|
+
* @param {WitnessMap} witness_map - A witness map.
|
|
240
|
+
* @returns {Uint8Array} A compressed witness map
|
|
266
241
|
*/
|
|
267
|
-
module.exports.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
242
|
+
module.exports.compressWitness = function(witness_map) {
|
|
243
|
+
try {
|
|
244
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
245
|
+
wasm.compressWitness(retptr, addHeapObject(witness_map));
|
|
246
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
247
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
248
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
249
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
250
|
+
if (r3) {
|
|
251
|
+
throw takeObject(r2);
|
|
252
|
+
}
|
|
253
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
254
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
255
|
+
return v1;
|
|
256
|
+
} finally {
|
|
257
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
258
|
+
}
|
|
278
259
|
};
|
|
279
260
|
|
|
280
|
-
function
|
|
281
|
-
ptr =
|
|
282
|
-
|
|
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;
|
|
283
266
|
}
|
|
284
267
|
/**
|
|
285
|
-
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
268
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
269
|
+
* This should be used to only fetch the witness map for the main function.
|
|
270
|
+
*
|
|
271
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
272
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
288
273
|
*/
|
|
289
|
-
module.exports.
|
|
274
|
+
module.exports.decompressWitness = function(compressed_witness) {
|
|
290
275
|
try {
|
|
291
276
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
292
|
-
const ptr0 = passArray8ToWasm0(
|
|
277
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
293
278
|
const len0 = WASM_VECTOR_LEN;
|
|
294
|
-
wasm.
|
|
279
|
+
wasm.decompressWitness(retptr, ptr0, len0);
|
|
295
280
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
296
281
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
297
|
-
var
|
|
298
|
-
|
|
299
|
-
|
|
282
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
283
|
+
if (r2) {
|
|
284
|
+
throw takeObject(r1);
|
|
285
|
+
}
|
|
286
|
+
return takeObject(r0);
|
|
300
287
|
} finally {
|
|
301
288
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
302
289
|
}
|
|
303
290
|
};
|
|
304
291
|
|
|
305
292
|
/**
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* @
|
|
293
|
+
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
294
|
+
*
|
|
295
|
+
* @param {WitnessStack} witness_stack - A witness stack.
|
|
296
|
+
* @returns {Uint8Array} A compressed witness stack
|
|
309
297
|
*/
|
|
310
|
-
module.exports.
|
|
298
|
+
module.exports.compressWitnessStack = function(witness_stack) {
|
|
311
299
|
try {
|
|
312
300
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
313
|
-
|
|
314
|
-
const len0 = WASM_VECTOR_LEN;
|
|
315
|
-
wasm.blake2s256(retptr, ptr0, len0);
|
|
301
|
+
wasm.compressWitnessStack(retptr, addHeapObject(witness_stack));
|
|
316
302
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
317
303
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
318
|
-
var
|
|
304
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
305
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
306
|
+
if (r3) {
|
|
307
|
+
throw takeObject(r2);
|
|
308
|
+
}
|
|
309
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
319
310
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
320
|
-
return
|
|
311
|
+
return v1;
|
|
321
312
|
} finally {
|
|
322
313
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
323
314
|
}
|
|
324
315
|
};
|
|
325
316
|
|
|
326
317
|
/**
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
* @
|
|
318
|
+
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
319
|
+
*
|
|
320
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
321
|
+
* @returns {WitnessStack} The decompressed witness stack.
|
|
330
322
|
*/
|
|
331
|
-
module.exports.
|
|
323
|
+
module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
332
324
|
try {
|
|
333
325
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
334
|
-
const ptr0 = passArray8ToWasm0(
|
|
326
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
335
327
|
const len0 = WASM_VECTOR_LEN;
|
|
336
|
-
wasm.
|
|
328
|
+
wasm.decompressWitnessStack(retptr, ptr0, len0);
|
|
337
329
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
338
330
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
339
|
-
var
|
|
340
|
-
|
|
341
|
-
|
|
331
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
332
|
+
if (r2) {
|
|
333
|
+
throw takeObject(r1);
|
|
334
|
+
}
|
|
335
|
+
return takeObject(r0);
|
|
342
336
|
} finally {
|
|
343
337
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
344
338
|
}
|
|
345
339
|
};
|
|
346
340
|
|
|
347
341
|
/**
|
|
348
|
-
*
|
|
349
|
-
* @param {string} lhs
|
|
350
|
-
* @param {string} rhs
|
|
351
|
-
* @returns {string}
|
|
342
|
+
* @returns {Promise<WasmBlackBoxFunctionSolver>}
|
|
352
343
|
*/
|
|
353
|
-
module.exports.
|
|
354
|
-
const ret = wasm.
|
|
344
|
+
module.exports.createBlackBoxSolver = function() {
|
|
345
|
+
const ret = wasm.createBlackBoxSolver();
|
|
355
346
|
return takeObject(ret);
|
|
356
347
|
};
|
|
357
348
|
|
|
358
349
|
/**
|
|
359
|
-
*
|
|
360
|
-
*
|
|
361
|
-
* @param {
|
|
362
|
-
* @
|
|
350
|
+
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
351
|
+
*
|
|
352
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
353
|
+
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
354
|
+
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
355
|
+
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
363
356
|
*/
|
|
364
|
-
module.exports.
|
|
365
|
-
const
|
|
357
|
+
module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
|
|
358
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
359
|
+
const len0 = WASM_VECTOR_LEN;
|
|
360
|
+
const ret = wasm.executeCircuit(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
366
361
|
return takeObject(ret);
|
|
367
362
|
};
|
|
368
363
|
|
|
@@ -374,60 +369,74 @@ function _assertClass(instance, klass) {
|
|
|
374
369
|
}
|
|
375
370
|
/**
|
|
376
371
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
372
|
+
* This method also extracts the public return values from the solved witness into its own return witness.
|
|
377
373
|
*
|
|
378
374
|
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
379
375
|
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
380
376
|
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
381
377
|
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
382
|
-
* @returns {
|
|
378
|
+
* @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.
|
|
383
379
|
*/
|
|
384
|
-
module.exports.
|
|
380
|
+
module.exports.executeCircuitWithReturnWitness = function(solver, program, initial_witness, foreign_call_handler) {
|
|
385
381
|
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
386
382
|
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
387
383
|
const len0 = WASM_VECTOR_LEN;
|
|
388
|
-
const ret = wasm.
|
|
384
|
+
const ret = wasm.executeCircuitWithReturnWitness(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
389
385
|
return takeObject(ret);
|
|
390
386
|
};
|
|
391
387
|
|
|
392
388
|
/**
|
|
393
389
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
394
390
|
*
|
|
391
|
+
* @param {&WasmBlackBoxFunctionSolver} solver - A black box solver.
|
|
395
392
|
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
396
393
|
* @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
|
|
397
394
|
* @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
|
|
398
395
|
* @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
|
|
399
396
|
*/
|
|
400
|
-
module.exports.
|
|
397
|
+
module.exports.executeCircuitWithBlackBoxSolver = function(solver, program, initial_witness, foreign_call_handler) {
|
|
398
|
+
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
401
399
|
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
402
400
|
const len0 = WASM_VECTOR_LEN;
|
|
403
|
-
const ret = wasm.
|
|
401
|
+
const ret = wasm.executeCircuitWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
404
402
|
return takeObject(ret);
|
|
405
403
|
};
|
|
406
404
|
|
|
407
405
|
/**
|
|
408
|
-
* @returns {Promise<WasmBlackBoxFunctionSolver>}
|
|
409
406
|
*/
|
|
410
|
-
module.exports.
|
|
411
|
-
const
|
|
407
|
+
module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
|
|
408
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
409
|
+
const len0 = WASM_VECTOR_LEN;
|
|
410
|
+
const ret = wasm.executeProgram(ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_handler));
|
|
412
411
|
return takeObject(ret);
|
|
413
412
|
};
|
|
414
413
|
|
|
415
414
|
/**
|
|
416
|
-
|
|
415
|
+
*/
|
|
416
|
+
module.exports.executeProgramWithBlackBoxSolver = function(solver, program, initial_witness, foreign_call_executor) {
|
|
417
|
+
_assertClass(solver, WasmBlackBoxFunctionSolver);
|
|
418
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
419
|
+
const len0 = WASM_VECTOR_LEN;
|
|
420
|
+
const ret = wasm.executeProgramWithBlackBoxSolver(solver.__wbg_ptr, ptr0, len0, addHeapObject(initial_witness), addHeapObject(foreign_call_executor));
|
|
421
|
+
return takeObject(ret);
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
417
426
|
*
|
|
418
427
|
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
419
428
|
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
420
|
-
* @returns {WitnessMap} A witness map containing the circuit's
|
|
429
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
421
430
|
* @param {Uint8Array} program
|
|
422
|
-
* @param {WitnessMap}
|
|
431
|
+
* @param {WitnessMap} witness_map
|
|
423
432
|
* @returns {WitnessMap}
|
|
424
433
|
*/
|
|
425
|
-
module.exports.
|
|
434
|
+
module.exports.getReturnWitness = function(program, witness_map) {
|
|
426
435
|
try {
|
|
427
436
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
428
437
|
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
429
438
|
const len0 = WASM_VECTOR_LEN;
|
|
430
|
-
wasm.
|
|
439
|
+
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
431
440
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
432
441
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
433
442
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -469,31 +478,167 @@ module.exports.getPublicParametersWitness = function(program, solved_witness) {
|
|
|
469
478
|
};
|
|
470
479
|
|
|
471
480
|
/**
|
|
472
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's
|
|
473
|
-
*
|
|
474
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
475
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
476
|
-
* @returns {WitnessMap} A witness map containing the circuit's
|
|
477
|
-
* @param {Uint8Array} program
|
|
478
|
-
* @param {WitnessMap}
|
|
479
|
-
* @returns {WitnessMap}
|
|
481
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
482
|
+
*
|
|
483
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
484
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
485
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
486
|
+
* @param {Uint8Array} program
|
|
487
|
+
* @param {WitnessMap} solved_witness
|
|
488
|
+
* @returns {WitnessMap}
|
|
489
|
+
*/
|
|
490
|
+
module.exports.getPublicWitness = function(program, solved_witness) {
|
|
491
|
+
try {
|
|
492
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
493
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
494
|
+
const len0 = WASM_VECTOR_LEN;
|
|
495
|
+
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
496
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
497
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
498
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
499
|
+
if (r2) {
|
|
500
|
+
throw takeObject(r1);
|
|
501
|
+
}
|
|
502
|
+
return takeObject(r0);
|
|
503
|
+
} finally {
|
|
504
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
510
|
+
* @param {string} lhs
|
|
511
|
+
* @param {string} rhs
|
|
512
|
+
* @returns {string}
|
|
513
|
+
*/
|
|
514
|
+
module.exports.and = function(lhs, rhs) {
|
|
515
|
+
const ret = wasm.and(addHeapObject(lhs), addHeapObject(rhs));
|
|
516
|
+
return takeObject(ret);
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Performs a bitwise XOR operation between `lhs` and `rhs`
|
|
521
|
+
* @param {string} lhs
|
|
522
|
+
* @param {string} rhs
|
|
523
|
+
* @returns {string}
|
|
524
|
+
*/
|
|
525
|
+
module.exports.xor = function(lhs, rhs) {
|
|
526
|
+
const ret = wasm.xor(addHeapObject(lhs), addHeapObject(rhs));
|
|
527
|
+
return takeObject(ret);
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Calculates the SHA256 hash of the input bytes
|
|
532
|
+
* @param {Uint8Array} inputs
|
|
533
|
+
* @returns {Uint8Array}
|
|
534
|
+
*/
|
|
535
|
+
module.exports.sha256 = function(inputs) {
|
|
536
|
+
try {
|
|
537
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
538
|
+
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
539
|
+
const len0 = WASM_VECTOR_LEN;
|
|
540
|
+
wasm.sha256(retptr, ptr0, len0);
|
|
541
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
542
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
543
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
544
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
545
|
+
return v2;
|
|
546
|
+
} finally {
|
|
547
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
/**
|
|
552
|
+
* Calculates the Blake2s256 hash of the input bytes
|
|
553
|
+
* @param {Uint8Array} inputs
|
|
554
|
+
* @returns {Uint8Array}
|
|
555
|
+
*/
|
|
556
|
+
module.exports.blake2s256 = function(inputs) {
|
|
557
|
+
try {
|
|
558
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
559
|
+
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
560
|
+
const len0 = WASM_VECTOR_LEN;
|
|
561
|
+
wasm.blake2s256(retptr, ptr0, len0);
|
|
562
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
563
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
564
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
565
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
566
|
+
return v2;
|
|
567
|
+
} finally {
|
|
568
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Calculates the Keccak256 hash of the input bytes
|
|
574
|
+
* @param {Uint8Array} inputs
|
|
575
|
+
* @returns {Uint8Array}
|
|
576
|
+
*/
|
|
577
|
+
module.exports.keccak256 = function(inputs) {
|
|
578
|
+
try {
|
|
579
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
580
|
+
const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
|
|
581
|
+
const len0 = WASM_VECTOR_LEN;
|
|
582
|
+
wasm.keccak256(retptr, ptr0, len0);
|
|
583
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
584
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
585
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
586
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
587
|
+
return v2;
|
|
588
|
+
} finally {
|
|
589
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
595
|
+
* @param {Uint8Array} hashed_msg
|
|
596
|
+
* @param {Uint8Array} public_key_x_bytes
|
|
597
|
+
* @param {Uint8Array} public_key_y_bytes
|
|
598
|
+
* @param {Uint8Array} signature
|
|
599
|
+
* @returns {boolean}
|
|
600
|
+
*/
|
|
601
|
+
module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
602
|
+
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
603
|
+
const len0 = WASM_VECTOR_LEN;
|
|
604
|
+
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
|
|
605
|
+
const len1 = WASM_VECTOR_LEN;
|
|
606
|
+
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
|
|
607
|
+
const len2 = WASM_VECTOR_LEN;
|
|
608
|
+
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
609
|
+
const len3 = WASM_VECTOR_LEN;
|
|
610
|
+
const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
611
|
+
return ret !== 0;
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
616
|
+
* @param {Uint8Array} hashed_msg
|
|
617
|
+
* @param {Uint8Array} public_key_x_bytes
|
|
618
|
+
* @param {Uint8Array} public_key_y_bytes
|
|
619
|
+
* @param {Uint8Array} signature
|
|
620
|
+
* @returns {boolean}
|
|
621
|
+
*/
|
|
622
|
+
module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
|
|
623
|
+
const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
|
|
624
|
+
const len0 = WASM_VECTOR_LEN;
|
|
625
|
+
const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
|
|
626
|
+
const len1 = WASM_VECTOR_LEN;
|
|
627
|
+
const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
|
|
628
|
+
const len2 = WASM_VECTOR_LEN;
|
|
629
|
+
const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
|
|
630
|
+
const len3 = WASM_VECTOR_LEN;
|
|
631
|
+
const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
632
|
+
return ret !== 0;
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
637
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
480
638
|
*/
|
|
481
|
-
module.exports.
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
485
|
-
const len0 = WASM_VECTOR_LEN;
|
|
486
|
-
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
487
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
488
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
489
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
490
|
-
if (r2) {
|
|
491
|
-
throw takeObject(r1);
|
|
492
|
-
}
|
|
493
|
-
return takeObject(r0);
|
|
494
|
-
} finally {
|
|
495
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
496
|
-
}
|
|
639
|
+
module.exports.buildInfo = function() {
|
|
640
|
+
const ret = wasm.buildInfo();
|
|
641
|
+
return takeObject(ret);
|
|
497
642
|
};
|
|
498
643
|
|
|
499
644
|
/**
|
|
@@ -517,64 +662,6 @@ module.exports.initLogLevel = function(filter) {
|
|
|
517
662
|
}
|
|
518
663
|
};
|
|
519
664
|
|
|
520
|
-
/**
|
|
521
|
-
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
522
|
-
*
|
|
523
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
524
|
-
* @returns {WitnessMap} The decompressed witness map.
|
|
525
|
-
*/
|
|
526
|
-
module.exports.decompressWitness = function(compressed_witness) {
|
|
527
|
-
try {
|
|
528
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
529
|
-
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
530
|
-
const len0 = WASM_VECTOR_LEN;
|
|
531
|
-
wasm.decompressWitness(retptr, ptr0, len0);
|
|
532
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
533
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
534
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
535
|
-
if (r2) {
|
|
536
|
-
throw takeObject(r1);
|
|
537
|
-
}
|
|
538
|
-
return takeObject(r0);
|
|
539
|
-
} finally {
|
|
540
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
541
|
-
}
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
/**
|
|
545
|
-
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
546
|
-
*
|
|
547
|
-
* @param {Uint8Array} compressed_witness - A witness map.
|
|
548
|
-
* @returns {WitnessMap} A compressed witness map
|
|
549
|
-
*/
|
|
550
|
-
module.exports.compressWitness = function(witness_map) {
|
|
551
|
-
try {
|
|
552
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
553
|
-
wasm.compressWitness(retptr, addHeapObject(witness_map));
|
|
554
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
555
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
556
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
557
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
558
|
-
if (r3) {
|
|
559
|
-
throw takeObject(r2);
|
|
560
|
-
}
|
|
561
|
-
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
562
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
563
|
-
return v1;
|
|
564
|
-
} finally {
|
|
565
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
571
|
-
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
572
|
-
*/
|
|
573
|
-
module.exports.buildInfo = function() {
|
|
574
|
-
const ret = wasm.buildInfo();
|
|
575
|
-
return takeObject(ret);
|
|
576
|
-
};
|
|
577
|
-
|
|
578
665
|
function handleError(f, args) {
|
|
579
666
|
try {
|
|
580
667
|
return f.apply(this, args);
|
|
@@ -582,7 +669,11 @@ function handleError(f, args) {
|
|
|
582
669
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
583
670
|
}
|
|
584
671
|
}
|
|
585
|
-
function
|
|
672
|
+
function __wbg_adapter_134(arg0, arg1, arg2, arg3, arg4) {
|
|
673
|
+
wasm.wasm_bindgen__convert__closures__invoke3_mut__h28a07b2d2a2056af(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
function __wbg_adapter_171(arg0, arg1, arg2, arg3) {
|
|
586
677
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h79f8a29187e94f15(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
587
678
|
}
|
|
588
679
|
|
|
@@ -641,38 +732,29 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
641
732
|
takeObject(arg0);
|
|
642
733
|
};
|
|
643
734
|
|
|
644
|
-
module.exports.
|
|
645
|
-
const ret =
|
|
646
|
-
return addHeapObject(ret);
|
|
647
|
-
};
|
|
648
|
-
|
|
649
|
-
module.exports.__wbg_new_0d2c031c3755a625 = function() {
|
|
650
|
-
const ret = new Map();
|
|
735
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
736
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
651
737
|
return addHeapObject(ret);
|
|
652
738
|
};
|
|
653
739
|
|
|
654
|
-
module.exports.
|
|
655
|
-
const ret = arg0;
|
|
740
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
741
|
+
const ret = getObject(arg0);
|
|
656
742
|
return addHeapObject(ret);
|
|
657
743
|
};
|
|
658
744
|
|
|
659
|
-
module.exports.
|
|
660
|
-
const
|
|
661
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
662
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
663
|
-
var len1 = WASM_VECTOR_LEN;
|
|
664
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
665
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
666
|
-
};
|
|
667
|
-
|
|
668
|
-
module.exports.__wbg_constructor_9a4af6ecd5050c55 = function(arg0) {
|
|
669
|
-
const ret = new Error(takeObject(arg0));
|
|
745
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
746
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
670
747
|
return addHeapObject(ret);
|
|
671
748
|
};
|
|
672
749
|
|
|
673
|
-
module.exports.
|
|
674
|
-
const
|
|
675
|
-
|
|
750
|
+
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
751
|
+
const obj = takeObject(arg0).original;
|
|
752
|
+
if (obj.cnt-- == 1) {
|
|
753
|
+
obj.a = 0;
|
|
754
|
+
return true;
|
|
755
|
+
}
|
|
756
|
+
const ret = false;
|
|
757
|
+
return ret;
|
|
676
758
|
};
|
|
677
759
|
|
|
678
760
|
module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
|
|
@@ -680,9 +762,9 @@ module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
|
|
|
680
762
|
return addHeapObject(ret);
|
|
681
763
|
};
|
|
682
764
|
|
|
683
|
-
module.exports.
|
|
684
|
-
const ret =
|
|
685
|
-
return
|
|
765
|
+
module.exports.__wbindgen_is_array = function(arg0) {
|
|
766
|
+
const ret = Array.isArray(getObject(arg0));
|
|
767
|
+
return ret;
|
|
686
768
|
};
|
|
687
769
|
|
|
688
770
|
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
@@ -702,19 +784,33 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
702
784
|
return ret;
|
|
703
785
|
};
|
|
704
786
|
|
|
705
|
-
module.exports.
|
|
706
|
-
const
|
|
707
|
-
|
|
787
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
788
|
+
const obj = getObject(arg1);
|
|
789
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
790
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
791
|
+
var len1 = WASM_VECTOR_LEN;
|
|
792
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
793
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
708
794
|
};
|
|
709
795
|
|
|
710
|
-
module.exports.
|
|
711
|
-
const
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
const ret =
|
|
717
|
-
return ret;
|
|
796
|
+
module.exports.__wbg_new_e1076c3a38c86fee = function() {
|
|
797
|
+
const ret = new Map();
|
|
798
|
+
return addHeapObject(ret);
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
802
|
+
const ret = arg0;
|
|
803
|
+
return addHeapObject(ret);
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
module.exports.__wbg_new_967d701c7af7cc58 = function() {
|
|
807
|
+
const ret = new Array();
|
|
808
|
+
return addHeapObject(ret);
|
|
809
|
+
};
|
|
810
|
+
|
|
811
|
+
module.exports.__wbg_constructor_885d22c82fec0fdb = function(arg0) {
|
|
812
|
+
const ret = new Error(takeObject(arg0));
|
|
813
|
+
return addHeapObject(ret);
|
|
718
814
|
};
|
|
719
815
|
|
|
720
816
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
@@ -799,6 +895,38 @@ module.exports.__wbg_instanceof_Global_f4b019d2b45e18ab = function(arg0) {
|
|
|
799
895
|
return ret;
|
|
800
896
|
};
|
|
801
897
|
|
|
898
|
+
module.exports.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
|
|
899
|
+
console.debug(getObject(arg0));
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
903
|
+
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
module.exports.__wbg_error_a7e23606158b68b9 = function(arg0) {
|
|
907
|
+
console.error(getObject(arg0));
|
|
908
|
+
};
|
|
909
|
+
|
|
910
|
+
module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
|
|
911
|
+
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
module.exports.__wbg_info_05db236d79f1b785 = function(arg0) {
|
|
915
|
+
console.info(getObject(arg0));
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
|
|
919
|
+
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
920
|
+
};
|
|
921
|
+
|
|
922
|
+
module.exports.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
|
|
923
|
+
console.warn(getObject(arg0));
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
927
|
+
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
928
|
+
};
|
|
929
|
+
|
|
802
930
|
module.exports.__wbg_crypto_c48a774b022d20ac = function(arg0) {
|
|
803
931
|
const ret = getObject(arg0).crypto;
|
|
804
932
|
return addHeapObject(ret);
|
|
@@ -837,38 +965,6 @@ module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handl
|
|
|
837
965
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
838
966
|
}, arguments) };
|
|
839
967
|
|
|
840
|
-
module.exports.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
|
|
841
|
-
console.debug(getObject(arg0));
|
|
842
|
-
};
|
|
843
|
-
|
|
844
|
-
module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
845
|
-
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
846
|
-
};
|
|
847
|
-
|
|
848
|
-
module.exports.__wbg_error_a7e23606158b68b9 = function(arg0) {
|
|
849
|
-
console.error(getObject(arg0));
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
|
|
853
|
-
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
854
|
-
};
|
|
855
|
-
|
|
856
|
-
module.exports.__wbg_info_05db236d79f1b785 = function(arg0) {
|
|
857
|
-
console.info(getObject(arg0));
|
|
858
|
-
};
|
|
859
|
-
|
|
860
|
-
module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
|
|
861
|
-
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
862
|
-
};
|
|
863
|
-
|
|
864
|
-
module.exports.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
|
|
865
|
-
console.warn(getObject(arg0));
|
|
866
|
-
};
|
|
867
|
-
|
|
868
|
-
module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
869
|
-
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
870
|
-
};
|
|
871
|
-
|
|
872
968
|
module.exports.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
|
|
873
969
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
874
970
|
return addHeapObject(ret);
|
|
@@ -894,6 +990,11 @@ module.exports.__wbg_newnoargs_c9e6043b8ad84109 = function(arg0, arg1) {
|
|
|
894
990
|
return addHeapObject(ret);
|
|
895
991
|
};
|
|
896
992
|
|
|
993
|
+
module.exports.__wbg_new_0f2b71ca2f2a6029 = function() {
|
|
994
|
+
const ret = new Map();
|
|
995
|
+
return addHeapObject(ret);
|
|
996
|
+
};
|
|
997
|
+
|
|
897
998
|
module.exports.__wbg_get_f53c921291c381bd = function() { return handleError(function (arg0, arg1) {
|
|
898
999
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
899
1000
|
return addHeapObject(ret);
|
|
@@ -943,11 +1044,34 @@ module.exports.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
|
|
|
943
1044
|
return addHeapObject(ret);
|
|
944
1045
|
};
|
|
945
1046
|
|
|
1047
|
+
module.exports.__wbg_forEach_5ae261259d7517c8 = function(arg0, arg1, arg2) {
|
|
1048
|
+
try {
|
|
1049
|
+
var state0 = {a: arg1, b: arg2};
|
|
1050
|
+
var cb0 = (arg0, arg1, arg2) => {
|
|
1051
|
+
const a = state0.a;
|
|
1052
|
+
state0.a = 0;
|
|
1053
|
+
try {
|
|
1054
|
+
return __wbg_adapter_134(a, state0.b, arg0, arg1, arg2);
|
|
1055
|
+
} finally {
|
|
1056
|
+
state0.a = a;
|
|
1057
|
+
}
|
|
1058
|
+
};
|
|
1059
|
+
getObject(arg0).forEach(cb0);
|
|
1060
|
+
} finally {
|
|
1061
|
+
state0.a = state0.b = 0;
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
|
|
946
1065
|
module.exports.__wbg_push_109cfc26d02582dd = function(arg0, arg1) {
|
|
947
1066
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
948
1067
|
return ret;
|
|
949
1068
|
};
|
|
950
1069
|
|
|
1070
|
+
module.exports.__wbg_reverse_a322332d916e2705 = function(arg0) {
|
|
1071
|
+
const ret = getObject(arg0).reverse();
|
|
1072
|
+
return addHeapObject(ret);
|
|
1073
|
+
};
|
|
1074
|
+
|
|
951
1075
|
module.exports.__wbg_byteLength_1a59a59856fc656a = function(arg0) {
|
|
952
1076
|
const ret = getObject(arg0).byteLength;
|
|
953
1077
|
return ret;
|
|
@@ -1024,7 +1148,7 @@ module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
|
|
|
1024
1148
|
const a = state0.a;
|
|
1025
1149
|
state0.a = 0;
|
|
1026
1150
|
try {
|
|
1027
|
-
return
|
|
1151
|
+
return __wbg_adapter_171(a, state0.b, arg0, arg1);
|
|
1028
1152
|
} finally {
|
|
1029
1153
|
state0.a = a;
|
|
1030
1154
|
}
|
|
@@ -1056,11 +1180,21 @@ module.exports.__wbg_constructor_f2623999a1f453eb = function(arg0) {
|
|
|
1056
1180
|
return addHeapObject(ret);
|
|
1057
1181
|
};
|
|
1058
1182
|
|
|
1183
|
+
module.exports.__wbg_fromEntries_d1b310956d20d858 = function() { return handleError(function (arg0) {
|
|
1184
|
+
const ret = Object.fromEntries(getObject(arg0));
|
|
1185
|
+
return addHeapObject(ret);
|
|
1186
|
+
}, arguments) };
|
|
1187
|
+
|
|
1059
1188
|
module.exports.__wbg_toString_e2b23ac99490a381 = function(arg0) {
|
|
1060
1189
|
const ret = getObject(arg0).toString();
|
|
1061
1190
|
return addHeapObject(ret);
|
|
1062
1191
|
};
|
|
1063
1192
|
|
|
1193
|
+
module.exports.__wbg_values_099fd000c271c313 = function(arg0) {
|
|
1194
|
+
const ret = Object.values(getObject(arg0));
|
|
1195
|
+
return addHeapObject(ret);
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1064
1198
|
module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
|
|
1065
1199
|
try {
|
|
1066
1200
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -1068,7 +1202,7 @@ module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
|
|
|
1068
1202
|
const a = state0.a;
|
|
1069
1203
|
state0.a = 0;
|
|
1070
1204
|
try {
|
|
1071
|
-
return
|
|
1205
|
+
return __wbg_adapter_171(a, state0.b, arg0, arg1);
|
|
1072
1206
|
} finally {
|
|
1073
1207
|
state0.a = a;
|
|
1074
1208
|
}
|
|
@@ -1230,8 +1364,8 @@ module.exports.__wbindgen_function_table = function() {
|
|
|
1230
1364
|
return addHeapObject(ret);
|
|
1231
1365
|
};
|
|
1232
1366
|
|
|
1233
|
-
module.exports.
|
|
1234
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1367
|
+
module.exports.__wbindgen_closure_wrapper2118 = function(arg0, arg1, arg2) {
|
|
1368
|
+
const ret = makeMutClosure(arg0, arg1, 723, __wbg_adapter_52);
|
|
1235
1369
|
return addHeapObject(ret);
|
|
1236
1370
|
};
|
|
1237
1371
|
|