@noir-lang/acvm_js 0.46.0-7936262.nightly → 0.46.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/nodejs/acvm_js.d.ts +74 -74
- package/nodejs/acvm_js.js +629 -246
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +14 -12
- package/package.json +1 -1
- package/web/acvm_js.d.ts +88 -86
- package/web/acvm_js.js +571 -250
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +14 -12
package/nodejs/acvm_js.js
CHANGED
|
@@ -9,28 +9,6 @@ heap.push(undefined, null, true, false);
|
|
|
9
9
|
|
|
10
10
|
function getObject(idx) { return heap[idx]; }
|
|
11
11
|
|
|
12
|
-
function isLikeNone(x) {
|
|
13
|
-
return x === undefined || x === null;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
let cachedFloat64Memory0 = null;
|
|
17
|
-
|
|
18
|
-
function getFloat64Memory0() {
|
|
19
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
20
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
21
|
-
}
|
|
22
|
-
return cachedFloat64Memory0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let cachedInt32Memory0 = null;
|
|
26
|
-
|
|
27
|
-
function getInt32Memory0() {
|
|
28
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
29
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
30
|
-
}
|
|
31
|
-
return cachedInt32Memory0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
12
|
let heap_next = heap.length;
|
|
35
13
|
|
|
36
14
|
function dropObject(idx) {
|
|
@@ -45,15 +23,6 @@ function takeObject(idx) {
|
|
|
45
23
|
return ret;
|
|
46
24
|
}
|
|
47
25
|
|
|
48
|
-
function addHeapObject(obj) {
|
|
49
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
50
|
-
const idx = heap_next;
|
|
51
|
-
heap_next = heap[idx];
|
|
52
|
-
|
|
53
|
-
heap[idx] = obj;
|
|
54
|
-
return idx;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
26
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
58
27
|
|
|
59
28
|
cachedTextDecoder.decode();
|
|
@@ -72,6 +41,15 @@ function getStringFromWasm0(ptr, len) {
|
|
|
72
41
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
73
42
|
}
|
|
74
43
|
|
|
44
|
+
function addHeapObject(obj) {
|
|
45
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
46
|
+
const idx = heap_next;
|
|
47
|
+
heap_next = heap[idx];
|
|
48
|
+
|
|
49
|
+
heap[idx] = obj;
|
|
50
|
+
return idx;
|
|
51
|
+
}
|
|
52
|
+
|
|
75
53
|
let WASM_VECTOR_LEN = 0;
|
|
76
54
|
|
|
77
55
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -127,6 +105,37 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
127
105
|
return ptr;
|
|
128
106
|
}
|
|
129
107
|
|
|
108
|
+
function isLikeNone(x) {
|
|
109
|
+
return x === undefined || x === null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
let cachedInt32Memory0 = null;
|
|
113
|
+
|
|
114
|
+
function getInt32Memory0() {
|
|
115
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
116
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
117
|
+
}
|
|
118
|
+
return cachedInt32Memory0;
|
|
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
|
+
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
|
+
|
|
130
139
|
function debugString(val) {
|
|
131
140
|
// primitive types
|
|
132
141
|
const type = typeof val;
|
|
@@ -216,201 +225,38 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
216
225
|
|
|
217
226
|
return real;
|
|
218
227
|
}
|
|
219
|
-
function
|
|
220
|
-
wasm.
|
|
228
|
+
function __wbg_adapter_52(arg0, arg1, arg2) {
|
|
229
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc5258430255de068(arg0, arg1, addHeapObject(arg2));
|
|
221
230
|
}
|
|
222
231
|
|
|
223
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
224
|
-
ptr = ptr >>> 0;
|
|
225
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
226
|
-
}
|
|
227
|
-
/**
|
|
228
|
-
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
229
|
-
*
|
|
230
|
-
* @param {WitnessMap} witness_map - A witness map.
|
|
231
|
-
* @returns {Uint8Array} A compressed witness map
|
|
232
|
-
*/
|
|
233
|
-
module.exports.compressWitness = function(witness_map) {
|
|
234
|
-
try {
|
|
235
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
236
|
-
wasm.compressWitness(retptr, addHeapObject(witness_map));
|
|
237
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
238
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
239
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
240
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
241
|
-
if (r3) {
|
|
242
|
-
throw takeObject(r2);
|
|
243
|
-
}
|
|
244
|
-
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
245
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
246
|
-
return v1;
|
|
247
|
-
} finally {
|
|
248
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
253
|
-
const ptr = malloc(arg.length * 1) >>> 0;
|
|
254
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
255
|
-
WASM_VECTOR_LEN = arg.length;
|
|
256
|
-
return ptr;
|
|
257
|
-
}
|
|
258
232
|
/**
|
|
259
|
-
*
|
|
260
|
-
* This should be used to only fetch the witness map for the main function.
|
|
261
|
-
*
|
|
262
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
263
|
-
* @returns {WitnessMap} The decompressed witness map.
|
|
264
|
-
*/
|
|
265
|
-
module.exports.decompressWitness = function(compressed_witness) {
|
|
266
|
-
try {
|
|
267
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
268
|
-
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
269
|
-
const len0 = WASM_VECTOR_LEN;
|
|
270
|
-
wasm.decompressWitness(retptr, ptr0, len0);
|
|
271
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
272
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
273
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
274
|
-
if (r2) {
|
|
275
|
-
throw takeObject(r1);
|
|
276
|
-
}
|
|
277
|
-
return takeObject(r0);
|
|
278
|
-
} finally {
|
|
279
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
285
|
-
*
|
|
286
|
-
* @param {WitnessStack} witness_stack - A witness stack.
|
|
287
|
-
* @returns {Uint8Array} A compressed witness stack
|
|
288
|
-
*/
|
|
289
|
-
module.exports.compressWitnessStack = function(witness_stack) {
|
|
290
|
-
try {
|
|
291
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
292
|
-
wasm.compressWitnessStack(retptr, addHeapObject(witness_stack));
|
|
293
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
294
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
295
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
296
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
297
|
-
if (r3) {
|
|
298
|
-
throw takeObject(r2);
|
|
299
|
-
}
|
|
300
|
-
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
301
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
302
|
-
return v1;
|
|
303
|
-
} finally {
|
|
304
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
305
|
-
}
|
|
306
|
-
};
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
310
|
-
*
|
|
311
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
312
|
-
* @returns {WitnessStack} The decompressed witness stack.
|
|
313
|
-
*/
|
|
314
|
-
module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
315
|
-
try {
|
|
316
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
317
|
-
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
318
|
-
const len0 = WASM_VECTOR_LEN;
|
|
319
|
-
wasm.decompressWitnessStack(retptr, ptr0, len0);
|
|
320
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
321
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
322
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
323
|
-
if (r2) {
|
|
324
|
-
throw takeObject(r1);
|
|
325
|
-
}
|
|
326
|
-
return takeObject(r0);
|
|
327
|
-
} finally {
|
|
328
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
334
|
-
*
|
|
335
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
336
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
337
|
-
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
338
|
-
* @param {Uint8Array} program
|
|
339
|
-
* @param {WitnessMap} witness_map
|
|
340
|
-
* @returns {WitnessMap}
|
|
341
|
-
*/
|
|
342
|
-
module.exports.getReturnWitness = function(program, witness_map) {
|
|
343
|
-
try {
|
|
344
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
345
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
346
|
-
const len0 = WASM_VECTOR_LEN;
|
|
347
|
-
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
348
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
349
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
350
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
351
|
-
if (r2) {
|
|
352
|
-
throw takeObject(r1);
|
|
353
|
-
}
|
|
354
|
-
return takeObject(r0);
|
|
355
|
-
} finally {
|
|
356
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
233
|
+
* Sets the package's logging level.
|
|
362
234
|
*
|
|
363
|
-
* @param {
|
|
364
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
365
|
-
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
366
|
-
* @param {Uint8Array} program
|
|
367
|
-
* @param {WitnessMap} solved_witness
|
|
368
|
-
* @returns {WitnessMap}
|
|
235
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
369
236
|
*/
|
|
370
|
-
module.exports.
|
|
237
|
+
module.exports.initLogLevel = function(filter) {
|
|
371
238
|
try {
|
|
372
239
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
373
|
-
const ptr0 =
|
|
240
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
374
241
|
const len0 = WASM_VECTOR_LEN;
|
|
375
|
-
wasm.
|
|
242
|
+
wasm.initLogLevel(retptr, ptr0, len0);
|
|
376
243
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
377
244
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
throw takeObject(r1);
|
|
245
|
+
if (r1) {
|
|
246
|
+
throw takeObject(r0);
|
|
381
247
|
}
|
|
382
|
-
return takeObject(r0);
|
|
383
248
|
} finally {
|
|
384
249
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
385
250
|
}
|
|
386
251
|
};
|
|
387
252
|
|
|
388
253
|
/**
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
392
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
393
|
-
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
394
|
-
* @param {Uint8Array} program
|
|
395
|
-
* @param {WitnessMap} solved_witness
|
|
396
|
-
* @returns {WitnessMap}
|
|
254
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
255
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
397
256
|
*/
|
|
398
|
-
module.exports.
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
402
|
-
const len0 = WASM_VECTOR_LEN;
|
|
403
|
-
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
404
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
405
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
406
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
407
|
-
if (r2) {
|
|
408
|
-
throw takeObject(r1);
|
|
409
|
-
}
|
|
410
|
-
return takeObject(r0);
|
|
411
|
-
} finally {
|
|
412
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
413
|
-
}
|
|
257
|
+
module.exports.buildInfo = function() {
|
|
258
|
+
const ret = wasm.buildInfo();
|
|
259
|
+
return takeObject(ret);
|
|
414
260
|
};
|
|
415
261
|
|
|
416
262
|
/**
|
|
@@ -435,6 +281,17 @@ module.exports.xor = function(lhs, rhs) {
|
|
|
435
281
|
return takeObject(ret);
|
|
436
282
|
};
|
|
437
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
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
292
|
+
ptr = ptr >>> 0;
|
|
293
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
294
|
+
}
|
|
438
295
|
/**
|
|
439
296
|
* Calculates the SHA256 hash of the input bytes
|
|
440
297
|
* @param {Uint8Array} inputs
|
|
@@ -540,6 +397,105 @@ module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes,
|
|
|
540
397
|
return ret !== 0;
|
|
541
398
|
};
|
|
542
399
|
|
|
400
|
+
/**
|
|
401
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
402
|
+
*
|
|
403
|
+
* @param {WitnessMap} witness_map - A witness map.
|
|
404
|
+
* @returns {Uint8Array} A compressed witness map
|
|
405
|
+
*/
|
|
406
|
+
module.exports.compressWitness = function(witness_map) {
|
|
407
|
+
try {
|
|
408
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
409
|
+
wasm.compressWitness(retptr, addHeapObject(witness_map));
|
|
410
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
411
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
412
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
413
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
414
|
+
if (r3) {
|
|
415
|
+
throw takeObject(r2);
|
|
416
|
+
}
|
|
417
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
418
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
419
|
+
return v1;
|
|
420
|
+
} finally {
|
|
421
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
427
|
+
* This should be used to only fetch the witness map for the main function.
|
|
428
|
+
*
|
|
429
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
430
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
431
|
+
*/
|
|
432
|
+
module.exports.decompressWitness = function(compressed_witness) {
|
|
433
|
+
try {
|
|
434
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
435
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
436
|
+
const len0 = WASM_VECTOR_LEN;
|
|
437
|
+
wasm.decompressWitness(retptr, ptr0, len0);
|
|
438
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
439
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
440
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
441
|
+
if (r2) {
|
|
442
|
+
throw takeObject(r1);
|
|
443
|
+
}
|
|
444
|
+
return takeObject(r0);
|
|
445
|
+
} finally {
|
|
446
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
447
|
+
}
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
452
|
+
*
|
|
453
|
+
* @param {WitnessStack} witness_stack - A witness stack.
|
|
454
|
+
* @returns {Uint8Array} A compressed witness stack
|
|
455
|
+
*/
|
|
456
|
+
module.exports.compressWitnessStack = function(witness_stack) {
|
|
457
|
+
try {
|
|
458
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
459
|
+
wasm.compressWitnessStack(retptr, addHeapObject(witness_stack));
|
|
460
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
461
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
462
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
463
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
464
|
+
if (r3) {
|
|
465
|
+
throw takeObject(r2);
|
|
466
|
+
}
|
|
467
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
468
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
469
|
+
return v1;
|
|
470
|
+
} finally {
|
|
471
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
477
|
+
*
|
|
478
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
479
|
+
* @returns {WitnessStack} The decompressed witness stack.
|
|
480
|
+
*/
|
|
481
|
+
module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
482
|
+
try {
|
|
483
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
484
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
485
|
+
const len0 = WASM_VECTOR_LEN;
|
|
486
|
+
wasm.decompressWitnessStack(retptr, ptr0, len0);
|
|
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
|
+
}
|
|
497
|
+
};
|
|
498
|
+
|
|
543
499
|
/**
|
|
544
500
|
* @returns {Promise<WasmBlackBoxFunctionSolver>}
|
|
545
501
|
*/
|
|
@@ -624,39 +580,89 @@ module.exports.executeProgramWithBlackBoxSolver = function(solver, program, init
|
|
|
624
580
|
};
|
|
625
581
|
|
|
626
582
|
/**
|
|
627
|
-
*
|
|
583
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
628
584
|
*
|
|
629
|
-
* @param {
|
|
585
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
586
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
587
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
588
|
+
* @param {Uint8Array} program
|
|
589
|
+
* @param {WitnessMap} witness_map
|
|
590
|
+
* @returns {WitnessMap}
|
|
630
591
|
*/
|
|
631
|
-
module.exports.
|
|
592
|
+
module.exports.getReturnWitness = function(program, witness_map) {
|
|
632
593
|
try {
|
|
633
594
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
634
|
-
const ptr0 =
|
|
595
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
635
596
|
const len0 = WASM_VECTOR_LEN;
|
|
636
|
-
wasm.
|
|
597
|
+
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
637
598
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
638
599
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
639
|
-
|
|
640
|
-
|
|
600
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
601
|
+
if (r2) {
|
|
602
|
+
throw takeObject(r1);
|
|
641
603
|
}
|
|
604
|
+
return takeObject(r0);
|
|
642
605
|
} finally {
|
|
643
606
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
644
607
|
}
|
|
645
608
|
};
|
|
646
609
|
|
|
647
610
|
/**
|
|
648
|
-
*
|
|
649
|
-
*
|
|
611
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
612
|
+
*
|
|
613
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
614
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
615
|
+
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
616
|
+
* @param {Uint8Array} program
|
|
617
|
+
* @param {WitnessMap} solved_witness
|
|
618
|
+
* @returns {WitnessMap}
|
|
650
619
|
*/
|
|
651
|
-
module.exports.
|
|
652
|
-
|
|
653
|
-
|
|
620
|
+
module.exports.getPublicParametersWitness = function(program, solved_witness) {
|
|
621
|
+
try {
|
|
622
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
623
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
624
|
+
const len0 = WASM_VECTOR_LEN;
|
|
625
|
+
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
626
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
627
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
628
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
629
|
+
if (r2) {
|
|
630
|
+
throw takeObject(r1);
|
|
631
|
+
}
|
|
632
|
+
return takeObject(r0);
|
|
633
|
+
} finally {
|
|
634
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
640
|
+
*
|
|
641
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
642
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
643
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
644
|
+
* @param {Uint8Array} program
|
|
645
|
+
* @param {WitnessMap} solved_witness
|
|
646
|
+
* @returns {WitnessMap}
|
|
647
|
+
*/
|
|
648
|
+
module.exports.getPublicWitness = function(program, solved_witness) {
|
|
649
|
+
try {
|
|
650
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
651
|
+
const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
|
|
652
|
+
const len0 = WASM_VECTOR_LEN;
|
|
653
|
+
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
654
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
655
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
656
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
657
|
+
if (r2) {
|
|
658
|
+
throw takeObject(r1);
|
|
659
|
+
}
|
|
660
|
+
return takeObject(r0);
|
|
661
|
+
} finally {
|
|
662
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
663
|
+
}
|
|
654
664
|
};
|
|
655
665
|
|
|
656
|
-
function __wbg_adapter_81(arg0, arg1, arg2, arg3, arg4) {
|
|
657
|
-
wasm.wasm_bindgen__convert__closures__invoke3_mut__h629417323d5efbaa(arg0, arg1, addHeapObject(arg2), arg3, addHeapObject(arg4));
|
|
658
|
-
}
|
|
659
|
-
|
|
660
666
|
function handleError(f, args) {
|
|
661
667
|
try {
|
|
662
668
|
return f.apply(this, args);
|
|
@@ -664,10 +670,39 @@ function handleError(f, args) {
|
|
|
664
670
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
665
671
|
}
|
|
666
672
|
}
|
|
667
|
-
function
|
|
668
|
-
wasm.
|
|
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));
|
|
669
679
|
}
|
|
670
680
|
|
|
681
|
+
/**
|
|
682
|
+
* A struct representing a Trap
|
|
683
|
+
*/
|
|
684
|
+
class Trap {
|
|
685
|
+
|
|
686
|
+
__destroy_into_raw() {
|
|
687
|
+
const ptr = this.__wbg_ptr;
|
|
688
|
+
this.__wbg_ptr = 0;
|
|
689
|
+
|
|
690
|
+
return ptr;
|
|
691
|
+
}
|
|
692
|
+
|
|
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;
|
|
671
706
|
/**
|
|
672
707
|
*/
|
|
673
708
|
class WasmBlackBoxFunctionSolver {
|
|
@@ -694,17 +729,20 @@ class WasmBlackBoxFunctionSolver {
|
|
|
694
729
|
}
|
|
695
730
|
module.exports.WasmBlackBoxFunctionSolver = WasmBlackBoxFunctionSolver;
|
|
696
731
|
|
|
697
|
-
module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
698
|
-
const obj = getObject(arg1);
|
|
699
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
700
|
-
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
701
|
-
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
702
|
-
};
|
|
703
|
-
|
|
704
732
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
705
733
|
takeObject(arg0);
|
|
706
734
|
};
|
|
707
735
|
|
|
736
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
737
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
738
|
+
return addHeapObject(ret);
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
742
|
+
const ret = getObject(arg0);
|
|
743
|
+
return addHeapObject(ret);
|
|
744
|
+
};
|
|
745
|
+
|
|
708
746
|
module.exports.__wbg_new_6f6c75f9324b78e8 = function() {
|
|
709
747
|
const ret = new Map();
|
|
710
748
|
return addHeapObject(ret);
|
|
@@ -729,6 +767,16 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
|
729
767
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
730
768
|
};
|
|
731
769
|
|
|
770
|
+
module.exports.__wbg_wasmblackboxfunctionsolver_new = function(arg0) {
|
|
771
|
+
const ret = WasmBlackBoxFunctionSolver.__wrap(arg0);
|
|
772
|
+
return addHeapObject(ret);
|
|
773
|
+
};
|
|
774
|
+
|
|
775
|
+
module.exports.__wbg_constructor_81b34c49dcbdd2af = function(arg0) {
|
|
776
|
+
const ret = new Error(takeObject(arg0));
|
|
777
|
+
return addHeapObject(ret);
|
|
778
|
+
};
|
|
779
|
+
|
|
732
780
|
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
733
781
|
const obj = takeObject(arg0).original;
|
|
734
782
|
if (obj.cnt-- == 1) {
|
|
@@ -739,9 +787,16 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
739
787
|
return ret;
|
|
740
788
|
};
|
|
741
789
|
|
|
742
|
-
module.exports.
|
|
743
|
-
const ret =
|
|
744
|
-
return
|
|
790
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
791
|
+
const ret = getObject(arg0) === undefined;
|
|
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);
|
|
745
800
|
};
|
|
746
801
|
|
|
747
802
|
module.exports.__wbindgen_is_array = function(arg0) {
|
|
@@ -754,11 +809,6 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
754
809
|
return ret;
|
|
755
810
|
};
|
|
756
811
|
|
|
757
|
-
module.exports.__wbg_constructor_81b34c49dcbdd2af = function(arg0) {
|
|
758
|
-
const ret = new Error(takeObject(arg0));
|
|
759
|
-
return addHeapObject(ret);
|
|
760
|
-
};
|
|
761
|
-
|
|
762
812
|
module.exports.__wbg_new_ee5ac63ff3b0fa4d = function() {
|
|
763
813
|
const ret = new Array();
|
|
764
814
|
return addHeapObject(ret);
|
|
@@ -789,6 +839,63 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
789
839
|
}
|
|
790
840
|
};
|
|
791
841
|
|
|
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
|
+
|
|
792
899
|
module.exports.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
|
|
793
900
|
console.debug(getObject(arg0));
|
|
794
901
|
};
|
|
@@ -821,6 +928,44 @@ module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
|
821
928
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
822
929
|
};
|
|
823
930
|
|
|
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
|
+
|
|
824
969
|
module.exports.__wbg_get_7303ed2ef026b2f5 = function(arg0, arg1) {
|
|
825
970
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
826
971
|
return addHeapObject(ret);
|
|
@@ -836,11 +981,65 @@ module.exports.__wbg_new_0394642eae39db16 = function() {
|
|
|
836
981
|
return addHeapObject(ret);
|
|
837
982
|
};
|
|
838
983
|
|
|
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
|
+
|
|
839
994
|
module.exports.__wbg_new_0f2b71ca2f2a6029 = function() {
|
|
840
995
|
const ret = new Map();
|
|
841
996
|
return addHeapObject(ret);
|
|
842
997
|
};
|
|
843
998
|
|
|
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
|
+
|
|
844
1043
|
module.exports.__wbg_from_6bc98a09a0b58bb1 = function(arg0) {
|
|
845
1044
|
const ret = Array.from(getObject(arg0));
|
|
846
1045
|
return addHeapObject(ret);
|
|
@@ -853,7 +1052,7 @@ module.exports.__wbg_forEach_5ae261259d7517c8 = function(arg0, arg1, arg2) {
|
|
|
853
1052
|
const a = state0.a;
|
|
854
1053
|
state0.a = 0;
|
|
855
1054
|
try {
|
|
856
|
-
return
|
|
1055
|
+
return __wbg_adapter_134(a, state0.b, arg0, arg1, arg2);
|
|
857
1056
|
} finally {
|
|
858
1057
|
state0.a = a;
|
|
859
1058
|
}
|
|
@@ -874,6 +1073,30 @@ module.exports.__wbg_reverse_a322332d916e2705 = function(arg0) {
|
|
|
874
1073
|
return addHeapObject(ret);
|
|
875
1074
|
};
|
|
876
1075
|
|
|
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
|
+
|
|
877
1100
|
module.exports.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
|
|
878
1101
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
879
1102
|
return addHeapObject(ret);
|
|
@@ -883,6 +1106,22 @@ module.exports.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
|
|
|
883
1106
|
getObject(arg0).cause = getObject(arg1);
|
|
884
1107
|
};
|
|
885
1108
|
|
|
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
|
+
|
|
886
1125
|
module.exports.__wbg_call_587b30eea3e09332 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
887
1126
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
888
1127
|
return addHeapObject(ret);
|
|
@@ -893,6 +1132,16 @@ module.exports.__wbg_call_4c73e4aecced6a7d = function() { return handleError(fun
|
|
|
893
1132
|
return addHeapObject(ret);
|
|
894
1133
|
}, arguments) };
|
|
895
1134
|
|
|
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
|
+
|
|
896
1145
|
module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
|
|
897
1146
|
try {
|
|
898
1147
|
var state0 = {a: arg1, b: arg2};
|
|
@@ -900,7 +1149,7 @@ module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
|
|
|
900
1149
|
const a = state0.a;
|
|
901
1150
|
state0.a = 0;
|
|
902
1151
|
try {
|
|
903
|
-
return
|
|
1152
|
+
return __wbg_adapter_171(a, state0.b, arg0, arg1);
|
|
904
1153
|
} finally {
|
|
905
1154
|
state0.a = a;
|
|
906
1155
|
}
|
|
@@ -916,11 +1165,32 @@ module.exports.__wbg_set_da7be7bf0e037b14 = function(arg0, arg1, arg2) {
|
|
|
916
1165
|
return addHeapObject(ret);
|
|
917
1166
|
};
|
|
918
1167
|
|
|
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
|
+
|
|
919
1184
|
module.exports.__wbg_fromEntries_d1b310956d20d858 = function() { return handleError(function (arg0) {
|
|
920
1185
|
const ret = Object.fromEntries(getObject(arg0));
|
|
921
1186
|
return addHeapObject(ret);
|
|
922
1187
|
}, arguments) };
|
|
923
1188
|
|
|
1189
|
+
module.exports.__wbg_toString_e2b23ac99490a381 = function(arg0) {
|
|
1190
|
+
const ret = getObject(arg0).toString();
|
|
1191
|
+
return addHeapObject(ret);
|
|
1192
|
+
};
|
|
1193
|
+
|
|
924
1194
|
module.exports.__wbg_values_099fd000c271c313 = function(arg0) {
|
|
925
1195
|
const ret = Object.values(getObject(arg0));
|
|
926
1196
|
return addHeapObject(ret);
|
|
@@ -933,7 +1203,7 @@ module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
|
|
|
933
1203
|
const a = state0.a;
|
|
934
1204
|
state0.a = 0;
|
|
935
1205
|
try {
|
|
936
|
-
return
|
|
1206
|
+
return __wbg_adapter_171(a, state0.b, arg0, arg1);
|
|
937
1207
|
} finally {
|
|
938
1208
|
state0.a = a;
|
|
939
1209
|
}
|
|
@@ -960,16 +1230,119 @@ module.exports.__wbg_then_835b073a479138e5 = function(arg0, arg1, arg2) {
|
|
|
960
1230
|
return addHeapObject(ret);
|
|
961
1231
|
};
|
|
962
1232
|
|
|
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
|
+
|
|
963
1267
|
module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
|
|
964
1268
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
965
1269
|
return addHeapObject(ret);
|
|
966
1270
|
}, arguments) };
|
|
967
1271
|
|
|
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
|
+
|
|
968
1334
|
module.exports.__wbg_set_07da13cc24b69217 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
969
1335
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
970
1336
|
return ret;
|
|
971
1337
|
}, arguments) };
|
|
972
1338
|
|
|
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
|
+
|
|
973
1346
|
module.exports.__wbindgen_debug_string = function(arg0, arg1) {
|
|
974
1347
|
const ret = debugString(getObject(arg1));
|
|
975
1348
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -982,8 +1355,18 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
|
982
1355
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
983
1356
|
};
|
|
984
1357
|
|
|
985
|
-
module.exports.
|
|
986
|
-
const ret =
|
|
1358
|
+
module.exports.__wbindgen_memory = function() {
|
|
1359
|
+
const ret = wasm.memory;
|
|
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);
|
|
987
1370
|
return addHeapObject(ret);
|
|
988
1371
|
};
|
|
989
1372
|
|