@noir-lang/acvm_js 0.38.0 → 0.39.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 +50 -65
- package/nodejs/acvm_js.js +232 -200
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +7 -7
- package/package.json +11 -6
- package/web/acvm_js.d.ts +57 -72
- package/web/acvm_js.js +221 -193
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +7 -7
package/web/acvm_js.js
CHANGED
|
@@ -20,7 +20,9 @@ function takeObject(idx) {
|
|
|
20
20
|
return ret;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
24
|
+
|
|
25
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
24
26
|
|
|
25
27
|
let cachedUint8Memory0 = null;
|
|
26
28
|
|
|
@@ -31,6 +33,44 @@ function getUint8Memory0() {
|
|
|
31
33
|
return cachedUint8Memory0;
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
function getStringFromWasm0(ptr, len) {
|
|
37
|
+
ptr = ptr >>> 0;
|
|
38
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function addHeapObject(obj) {
|
|
42
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
43
|
+
const idx = heap_next;
|
|
44
|
+
heap_next = heap[idx];
|
|
45
|
+
|
|
46
|
+
heap[idx] = obj;
|
|
47
|
+
return idx;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function isLikeNone(x) {
|
|
51
|
+
return x === undefined || x === null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let cachedFloat64Memory0 = null;
|
|
55
|
+
|
|
56
|
+
function getFloat64Memory0() {
|
|
57
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
58
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
59
|
+
}
|
|
60
|
+
return cachedFloat64Memory0;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
let cachedInt32Memory0 = null;
|
|
64
|
+
|
|
65
|
+
function getInt32Memory0() {
|
|
66
|
+
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
67
|
+
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
68
|
+
}
|
|
69
|
+
return cachedInt32Memory0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let WASM_VECTOR_LEN = 0;
|
|
73
|
+
|
|
34
74
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
35
75
|
|
|
36
76
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -84,46 +124,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
84
124
|
return ptr;
|
|
85
125
|
}
|
|
86
126
|
|
|
87
|
-
function isLikeNone(x) {
|
|
88
|
-
return x === undefined || x === null;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
let cachedInt32Memory0 = null;
|
|
92
|
-
|
|
93
|
-
function getInt32Memory0() {
|
|
94
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
95
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
96
|
-
}
|
|
97
|
-
return cachedInt32Memory0;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function addHeapObject(obj) {
|
|
101
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
102
|
-
const idx = heap_next;
|
|
103
|
-
heap_next = heap[idx];
|
|
104
|
-
|
|
105
|
-
heap[idx] = obj;
|
|
106
|
-
return idx;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
let cachedFloat64Memory0 = null;
|
|
110
|
-
|
|
111
|
-
function getFloat64Memory0() {
|
|
112
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
113
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
114
|
-
}
|
|
115
|
-
return cachedFloat64Memory0;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
119
|
-
|
|
120
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
121
|
-
|
|
122
|
-
function getStringFromWasm0(ptr, len) {
|
|
123
|
-
ptr = ptr >>> 0;
|
|
124
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
125
|
-
}
|
|
126
|
-
|
|
127
127
|
let cachedBigInt64Memory0 = null;
|
|
128
128
|
|
|
129
129
|
function getBigInt64Memory0() {
|
|
@@ -222,107 +222,8 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
222
222
|
|
|
223
223
|
return real;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
wasm.
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
230
|
-
const ptr = malloc(arg.length * 1) >>> 0;
|
|
231
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
232
|
-
WASM_VECTOR_LEN = arg.length;
|
|
233
|
-
return ptr;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
237
|
-
*
|
|
238
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
239
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
240
|
-
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
241
|
-
* @param {Uint8Array} circuit
|
|
242
|
-
* @param {WitnessMap} solved_witness
|
|
243
|
-
* @returns {WitnessMap}
|
|
244
|
-
*/
|
|
245
|
-
export function getPublicWitness(circuit, solved_witness) {
|
|
246
|
-
try {
|
|
247
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
248
|
-
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
249
|
-
const len0 = WASM_VECTOR_LEN;
|
|
250
|
-
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
251
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
252
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
253
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
254
|
-
if (r2) {
|
|
255
|
-
throw takeObject(r1);
|
|
256
|
-
}
|
|
257
|
-
return takeObject(r0);
|
|
258
|
-
} finally {
|
|
259
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
265
|
-
*
|
|
266
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
267
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
268
|
-
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
269
|
-
* @param {Uint8Array} circuit
|
|
270
|
-
* @param {WitnessMap} solved_witness
|
|
271
|
-
* @returns {WitnessMap}
|
|
272
|
-
*/
|
|
273
|
-
export function getPublicParametersWitness(circuit, solved_witness) {
|
|
274
|
-
try {
|
|
275
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
276
|
-
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
277
|
-
const len0 = WASM_VECTOR_LEN;
|
|
278
|
-
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
279
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
280
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
281
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
282
|
-
if (r2) {
|
|
283
|
-
throw takeObject(r1);
|
|
284
|
-
}
|
|
285
|
-
return takeObject(r0);
|
|
286
|
-
} finally {
|
|
287
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
293
|
-
*
|
|
294
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
295
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
296
|
-
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
297
|
-
* @param {Uint8Array} circuit
|
|
298
|
-
* @param {WitnessMap} witness_map
|
|
299
|
-
* @returns {WitnessMap}
|
|
300
|
-
*/
|
|
301
|
-
export function getReturnWitness(circuit, witness_map) {
|
|
302
|
-
try {
|
|
303
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
304
|
-
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
305
|
-
const len0 = WASM_VECTOR_LEN;
|
|
306
|
-
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
307
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
308
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
309
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
310
|
-
if (r2) {
|
|
311
|
-
throw takeObject(r1);
|
|
312
|
-
}
|
|
313
|
-
return takeObject(r0);
|
|
314
|
-
} finally {
|
|
315
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Sets the package's logging level.
|
|
321
|
-
*
|
|
322
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
323
|
-
*/
|
|
324
|
-
export function initLogLevel(level) {
|
|
325
|
-
wasm.initLogLevel(addHeapObject(level));
|
|
225
|
+
function __wbg_adapter_52(arg0, arg1, arg2) {
|
|
226
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0c6c8312617d6ad4(arg0, arg1, addHeapObject(arg2));
|
|
326
227
|
}
|
|
327
228
|
|
|
328
229
|
function _assertClass(instance, klass) {
|
|
@@ -331,6 +232,13 @@ function _assertClass(instance, klass) {
|
|
|
331
232
|
}
|
|
332
233
|
return instance.ptr;
|
|
333
234
|
}
|
|
235
|
+
|
|
236
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
237
|
+
const ptr = malloc(arg.length * 1) >>> 0;
|
|
238
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
239
|
+
WASM_VECTOR_LEN = arg.length;
|
|
240
|
+
return ptr;
|
|
241
|
+
}
|
|
334
242
|
/**
|
|
335
243
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
336
244
|
*
|
|
@@ -393,7 +301,6 @@ export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_ke
|
|
|
393
301
|
}
|
|
394
302
|
|
|
395
303
|
/**
|
|
396
|
-
* Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
|
|
397
304
|
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
398
305
|
* @param {Uint8Array} hashed_msg
|
|
399
306
|
* @param {Uint8Array} public_key_x_bytes
|
|
@@ -503,6 +410,17 @@ export function and(lhs, rhs) {
|
|
|
503
410
|
return takeObject(ret);
|
|
504
411
|
}
|
|
505
412
|
|
|
413
|
+
/**
|
|
414
|
+
* Sets the package's logging level.
|
|
415
|
+
*
|
|
416
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
417
|
+
*/
|
|
418
|
+
export function initLogLevel(filter) {
|
|
419
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
420
|
+
const len0 = WASM_VECTOR_LEN;
|
|
421
|
+
wasm.initLogLevel(ptr0, len0);
|
|
422
|
+
}
|
|
423
|
+
|
|
506
424
|
/**
|
|
507
425
|
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
508
426
|
*
|
|
@@ -561,6 +479,90 @@ export function buildInfo() {
|
|
|
561
479
|
return takeObject(ret);
|
|
562
480
|
}
|
|
563
481
|
|
|
482
|
+
/**
|
|
483
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
484
|
+
*
|
|
485
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
486
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
487
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
488
|
+
* @param {Uint8Array} circuit
|
|
489
|
+
* @param {WitnessMap} solved_witness
|
|
490
|
+
* @returns {WitnessMap}
|
|
491
|
+
*/
|
|
492
|
+
export function getPublicWitness(circuit, solved_witness) {
|
|
493
|
+
try {
|
|
494
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
495
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
496
|
+
const len0 = WASM_VECTOR_LEN;
|
|
497
|
+
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
498
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
499
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
500
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
501
|
+
if (r2) {
|
|
502
|
+
throw takeObject(r1);
|
|
503
|
+
}
|
|
504
|
+
return takeObject(r0);
|
|
505
|
+
} finally {
|
|
506
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
512
|
+
*
|
|
513
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
514
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
515
|
+
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
516
|
+
* @param {Uint8Array} circuit
|
|
517
|
+
* @param {WitnessMap} solved_witness
|
|
518
|
+
* @returns {WitnessMap}
|
|
519
|
+
*/
|
|
520
|
+
export function getPublicParametersWitness(circuit, solved_witness) {
|
|
521
|
+
try {
|
|
522
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
523
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
524
|
+
const len0 = WASM_VECTOR_LEN;
|
|
525
|
+
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
526
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
527
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
528
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
529
|
+
if (r2) {
|
|
530
|
+
throw takeObject(r1);
|
|
531
|
+
}
|
|
532
|
+
return takeObject(r0);
|
|
533
|
+
} finally {
|
|
534
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
540
|
+
*
|
|
541
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
542
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
543
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
544
|
+
* @param {Uint8Array} circuit
|
|
545
|
+
* @param {WitnessMap} witness_map
|
|
546
|
+
* @returns {WitnessMap}
|
|
547
|
+
*/
|
|
548
|
+
export function getReturnWitness(circuit, witness_map) {
|
|
549
|
+
try {
|
|
550
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
551
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
552
|
+
const len0 = WASM_VECTOR_LEN;
|
|
553
|
+
wasm.getReturnWitness(retptr, ptr0, len0, 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
|
+
if (r2) {
|
|
558
|
+
throw takeObject(r1);
|
|
559
|
+
}
|
|
560
|
+
return takeObject(r0);
|
|
561
|
+
} finally {
|
|
562
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
564
566
|
function handleError(f, args) {
|
|
565
567
|
try {
|
|
566
568
|
return f.apply(this, args);
|
|
@@ -568,8 +570,8 @@ function handleError(f, args) {
|
|
|
568
570
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
569
571
|
}
|
|
570
572
|
}
|
|
571
|
-
function
|
|
572
|
-
wasm.
|
|
573
|
+
function __wbg_adapter_159(arg0, arg1, arg2, arg3) {
|
|
574
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hc5e8ba855f687f9d(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
573
575
|
}
|
|
574
576
|
|
|
575
577
|
/**
|
|
@@ -589,11 +591,11 @@ export class Trap {
|
|
|
589
591
|
wasm.__wbg_trap_free(ptr);
|
|
590
592
|
}
|
|
591
593
|
/**
|
|
592
|
-
*
|
|
594
|
+
* A marker method to indicate that an object is an instance of the `Trap`
|
|
595
|
+
* class.
|
|
593
596
|
*/
|
|
594
|
-
static
|
|
595
|
-
|
|
596
|
-
return takeObject(ret);
|
|
597
|
+
static __wbg_wasmer_trap() {
|
|
598
|
+
wasm.trap___wbg_wasmer_trap();
|
|
597
599
|
}
|
|
598
600
|
}
|
|
599
601
|
/**
|
|
@@ -666,24 +668,8 @@ function __wbg_get_imports() {
|
|
|
666
668
|
const ret = Array.isArray(getObject(arg0));
|
|
667
669
|
return ret;
|
|
668
670
|
};
|
|
669
|
-
imports.wbg.
|
|
670
|
-
const
|
|
671
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
672
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
673
|
-
var len1 = WASM_VECTOR_LEN;
|
|
674
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
675
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
676
|
-
};
|
|
677
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
678
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
679
|
-
return ret;
|
|
680
|
-
};
|
|
681
|
-
imports.wbg.__wbg_new_88dbce24756a0c16 = function() {
|
|
682
|
-
const ret = new Map();
|
|
683
|
-
return addHeapObject(ret);
|
|
684
|
-
};
|
|
685
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
686
|
-
const ret = arg0;
|
|
671
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
672
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
687
673
|
return addHeapObject(ret);
|
|
688
674
|
};
|
|
689
675
|
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
@@ -692,22 +678,34 @@ function __wbg_get_imports() {
|
|
|
692
678
|
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
693
679
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
694
680
|
};
|
|
681
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
682
|
+
const ret = getObject(arg0);
|
|
683
|
+
return addHeapObject(ret);
|
|
684
|
+
};
|
|
695
685
|
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
696
686
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
697
687
|
return addHeapObject(ret);
|
|
698
688
|
};
|
|
699
|
-
imports.wbg.
|
|
700
|
-
const ret = getObject(arg0);
|
|
701
|
-
return
|
|
689
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
690
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
691
|
+
return ret;
|
|
702
692
|
};
|
|
703
|
-
imports.wbg.
|
|
704
|
-
const ret = new
|
|
693
|
+
imports.wbg.__wbg_new_0f04ec64d76ed2a2 = function() {
|
|
694
|
+
const ret = new Map();
|
|
705
695
|
return addHeapObject(ret);
|
|
706
696
|
};
|
|
707
|
-
imports.wbg.
|
|
708
|
-
const ret =
|
|
697
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
698
|
+
const ret = arg0;
|
|
709
699
|
return addHeapObject(ret);
|
|
710
700
|
};
|
|
701
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
702
|
+
const obj = getObject(arg1);
|
|
703
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
704
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
705
|
+
var len1 = WASM_VECTOR_LEN;
|
|
706
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
707
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
708
|
+
};
|
|
711
709
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
712
710
|
const obj = takeObject(arg0).original;
|
|
713
711
|
if (obj.cnt-- == 1) {
|
|
@@ -717,6 +715,10 @@ function __wbg_get_imports() {
|
|
|
717
715
|
const ret = false;
|
|
718
716
|
return ret;
|
|
719
717
|
};
|
|
718
|
+
imports.wbg.__wbg_constructor_6648e7ae005cd460 = function(arg0) {
|
|
719
|
+
const ret = new Error(takeObject(arg0));
|
|
720
|
+
return addHeapObject(ret);
|
|
721
|
+
};
|
|
720
722
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
721
723
|
const ret = getObject(arg0) === undefined;
|
|
722
724
|
return ret;
|
|
@@ -771,11 +773,7 @@ function __wbg_get_imports() {
|
|
|
771
773
|
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
772
774
|
return ret;
|
|
773
775
|
};
|
|
774
|
-
imports.wbg.
|
|
775
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
776
|
-
return ret;
|
|
777
|
-
};
|
|
778
|
-
imports.wbg.__wbg_instanceof_Global_f190e0e5a44a62df = function(arg0) {
|
|
776
|
+
imports.wbg.__wbg_instanceof_Global_1c3b64df1a5c886c = function(arg0) {
|
|
779
777
|
let result;
|
|
780
778
|
try {
|
|
781
779
|
result = getObject(arg0) instanceof WebAssembly.Global;
|
|
@@ -785,19 +783,15 @@ function __wbg_get_imports() {
|
|
|
785
783
|
const ret = result;
|
|
786
784
|
return ret;
|
|
787
785
|
};
|
|
786
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
787
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
788
|
+
return ret;
|
|
789
|
+
};
|
|
788
790
|
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
789
791
|
const val = getObject(arg0);
|
|
790
792
|
const ret = typeof(val) === 'object' && val !== null;
|
|
791
793
|
return ret;
|
|
792
794
|
};
|
|
793
|
-
imports.wbg.__wbg_static_accessor_SYMBOL_45d4d15e3c4aeb33 = function() {
|
|
794
|
-
const ret = Symbol;
|
|
795
|
-
return addHeapObject(ret);
|
|
796
|
-
};
|
|
797
|
-
imports.wbg.__wbindgen_is_symbol = function(arg0) {
|
|
798
|
-
const ret = typeof(getObject(arg0)) === 'symbol';
|
|
799
|
-
return ret;
|
|
800
|
-
};
|
|
801
795
|
imports.wbg.__wbg_crypto_c48a774b022d20ac = function(arg0) {
|
|
802
796
|
const ret = getObject(arg0).crypto;
|
|
803
797
|
return addHeapObject(ret);
|
|
@@ -828,6 +822,9 @@ function __wbg_get_imports() {
|
|
|
828
822
|
imports.wbg.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handleError(function (arg0, arg1) {
|
|
829
823
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
830
824
|
}, arguments) };
|
|
825
|
+
imports.wbg.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
|
|
826
|
+
console.debug(getObject(arg0));
|
|
827
|
+
};
|
|
831
828
|
imports.wbg.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
832
829
|
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
833
830
|
};
|
|
@@ -837,11 +834,14 @@ function __wbg_get_imports() {
|
|
|
837
834
|
imports.wbg.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
|
|
838
835
|
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
839
836
|
};
|
|
837
|
+
imports.wbg.__wbg_info_05db236d79f1b785 = function(arg0) {
|
|
838
|
+
console.info(getObject(arg0));
|
|
839
|
+
};
|
|
840
840
|
imports.wbg.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
|
|
841
841
|
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
842
842
|
};
|
|
843
|
-
imports.wbg.
|
|
844
|
-
console.
|
|
843
|
+
imports.wbg.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
|
|
844
|
+
console.warn(getObject(arg0));
|
|
845
845
|
};
|
|
846
846
|
imports.wbg.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
847
847
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
@@ -920,6 +920,16 @@ function __wbg_get_imports() {
|
|
|
920
920
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
921
921
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
922
922
|
};
|
|
923
|
+
imports.wbg.__wbg_instanceof_Error_fac23a8832b241da = function(arg0) {
|
|
924
|
+
let result;
|
|
925
|
+
try {
|
|
926
|
+
result = getObject(arg0) instanceof Error;
|
|
927
|
+
} catch {
|
|
928
|
+
result = false;
|
|
929
|
+
}
|
|
930
|
+
const ret = result;
|
|
931
|
+
return ret;
|
|
932
|
+
};
|
|
923
933
|
imports.wbg.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
|
|
924
934
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
925
935
|
return addHeapObject(ret);
|
|
@@ -927,6 +937,10 @@ function __wbg_get_imports() {
|
|
|
927
937
|
imports.wbg.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
|
|
928
938
|
getObject(arg0).cause = getObject(arg1);
|
|
929
939
|
};
|
|
940
|
+
imports.wbg.__wbg_message_eab7d45ec69a2135 = function(arg0) {
|
|
941
|
+
const ret = getObject(arg0).message;
|
|
942
|
+
return addHeapObject(ret);
|
|
943
|
+
};
|
|
930
944
|
imports.wbg.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
|
|
931
945
|
let result;
|
|
932
946
|
try {
|
|
@@ -960,7 +974,7 @@ function __wbg_get_imports() {
|
|
|
960
974
|
const a = state0.a;
|
|
961
975
|
state0.a = 0;
|
|
962
976
|
try {
|
|
963
|
-
return
|
|
977
|
+
return __wbg_adapter_159(a, state0.b, arg0, arg1);
|
|
964
978
|
} finally {
|
|
965
979
|
state0.a = a;
|
|
966
980
|
}
|
|
@@ -974,10 +988,24 @@ function __wbg_get_imports() {
|
|
|
974
988
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
975
989
|
return addHeapObject(ret);
|
|
976
990
|
};
|
|
991
|
+
imports.wbg.__wbg_instanceof_Object_a9e9e5766628e8b5 = function(arg0) {
|
|
992
|
+
let result;
|
|
993
|
+
try {
|
|
994
|
+
result = getObject(arg0) instanceof Object;
|
|
995
|
+
} catch {
|
|
996
|
+
result = false;
|
|
997
|
+
}
|
|
998
|
+
const ret = result;
|
|
999
|
+
return ret;
|
|
1000
|
+
};
|
|
977
1001
|
imports.wbg.__wbg_constructor_f2623999a1f453eb = function(arg0) {
|
|
978
1002
|
const ret = getObject(arg0).constructor;
|
|
979
1003
|
return addHeapObject(ret);
|
|
980
1004
|
};
|
|
1005
|
+
imports.wbg.__wbg_toString_e2b23ac99490a381 = function(arg0) {
|
|
1006
|
+
const ret = getObject(arg0).toString();
|
|
1007
|
+
return addHeapObject(ret);
|
|
1008
|
+
};
|
|
981
1009
|
imports.wbg.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
|
|
982
1010
|
try {
|
|
983
1011
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -985,7 +1013,7 @@ function __wbg_get_imports() {
|
|
|
985
1013
|
const a = state0.a;
|
|
986
1014
|
state0.a = 0;
|
|
987
1015
|
try {
|
|
988
|
-
return
|
|
1016
|
+
return __wbg_adapter_159(a, state0.b, arg0, arg1);
|
|
989
1017
|
} finally {
|
|
990
1018
|
state0.a = a;
|
|
991
1019
|
}
|
|
@@ -1119,8 +1147,8 @@ function __wbg_get_imports() {
|
|
|
1119
1147
|
const ret = wasm.__wbindgen_export_2;
|
|
1120
1148
|
return addHeapObject(ret);
|
|
1121
1149
|
};
|
|
1122
|
-
imports.wbg.
|
|
1123
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1150
|
+
imports.wbg.__wbindgen_closure_wrapper1419 = function(arg0, arg1, arg2) {
|
|
1151
|
+
const ret = makeMutClosure(arg0, arg1, 498, __wbg_adapter_52);
|
|
1124
1152
|
return addHeapObject(ret);
|
|
1125
1153
|
};
|
|
1126
1154
|
|
package/web/acvm_js_bg.wasm
CHANGED
|
Binary file
|
package/web/acvm_js_bg.wasm.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export function getPublicWitness(a: number, b: number, c: number, d: number): void;
|
|
5
|
-
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
|
|
6
|
-
export function getReturnWitness(a: number, b: number, c: number, d: number): void;
|
|
7
|
-
export function initLogLevel(a: number): void;
|
|
8
4
|
export function executeCircuitWithBlackBoxSolver(a: number, b: number, c: number, d: number, e: number): number;
|
|
9
5
|
export function executeCircuit(a: number, b: number, c: number, d: number): number;
|
|
10
6
|
export function createBlackBoxSolver(): number;
|
|
@@ -16,16 +12,20 @@ export function blake2s256(a: number, b: number, c: number): void;
|
|
|
16
12
|
export function sha256(a: number, b: number, c: number): void;
|
|
17
13
|
export function xor(a: number, b: number): number;
|
|
18
14
|
export function and(a: number, b: number): number;
|
|
15
|
+
export function initLogLevel(a: number, b: number): void;
|
|
19
16
|
export function decompressWitness(a: number, b: number, c: number): void;
|
|
20
17
|
export function compressWitness(a: number, b: number): void;
|
|
21
18
|
export function buildInfo(): number;
|
|
19
|
+
export function getPublicWitness(a: number, b: number, c: number, d: number): void;
|
|
20
|
+
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
|
|
21
|
+
export function getReturnWitness(a: number, b: number, c: number, d: number): void;
|
|
22
22
|
export function __wbg_trap_free(a: number): void;
|
|
23
|
-
export function
|
|
23
|
+
export function trap___wbg_wasmer_trap(): void;
|
|
24
24
|
export function __wbindgen_malloc(a: number): number;
|
|
25
25
|
export function __wbindgen_realloc(a: number, b: number, c: number): number;
|
|
26
26
|
export const __wbindgen_export_2: WebAssembly.Table;
|
|
27
|
-
export function
|
|
27
|
+
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0c6c8312617d6ad4(a: number, b: number, c: number): void;
|
|
28
28
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
|
29
29
|
export function __wbindgen_free(a: number, b: number): void;
|
|
30
30
|
export function __wbindgen_exn_store(a: number): void;
|
|
31
|
-
export function
|
|
31
|
+
export function wasm_bindgen__convert__closures__invoke2_mut__hc5e8ba855f687f9d(a: number, b: number, c: number, d: number): void;
|