@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/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,7 +23,9 @@ function takeObject(idx) {
|
|
|
23
23
|
return ret;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
let
|
|
26
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
27
|
+
|
|
28
|
+
cachedTextDecoder.decode();
|
|
27
29
|
|
|
28
30
|
let cachedUint8Memory0 = null;
|
|
29
31
|
|
|
@@ -34,6 +36,44 @@ function getUint8Memory0() {
|
|
|
34
36
|
return cachedUint8Memory0;
|
|
35
37
|
}
|
|
36
38
|
|
|
39
|
+
function getStringFromWasm0(ptr, len) {
|
|
40
|
+
ptr = ptr >>> 0;
|
|
41
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
42
|
+
}
|
|
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
|
+
|
|
53
|
+
function isLikeNone(x) {
|
|
54
|
+
return x === undefined || x === null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
let cachedFloat64Memory0 = null;
|
|
58
|
+
|
|
59
|
+
function getFloat64Memory0() {
|
|
60
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
61
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
62
|
+
}
|
|
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;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
let WASM_VECTOR_LEN = 0;
|
|
76
|
+
|
|
37
77
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
38
78
|
|
|
39
79
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -87,46 +127,6 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
87
127
|
return ptr;
|
|
88
128
|
}
|
|
89
129
|
|
|
90
|
-
function isLikeNone(x) {
|
|
91
|
-
return x === undefined || x === null;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
let cachedInt32Memory0 = null;
|
|
95
|
-
|
|
96
|
-
function getInt32Memory0() {
|
|
97
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
98
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
99
|
-
}
|
|
100
|
-
return cachedInt32Memory0;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function addHeapObject(obj) {
|
|
104
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
105
|
-
const idx = heap_next;
|
|
106
|
-
heap_next = heap[idx];
|
|
107
|
-
|
|
108
|
-
heap[idx] = obj;
|
|
109
|
-
return idx;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
let cachedFloat64Memory0 = null;
|
|
113
|
-
|
|
114
|
-
function getFloat64Memory0() {
|
|
115
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
116
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
117
|
-
}
|
|
118
|
-
return cachedFloat64Memory0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
122
|
-
|
|
123
|
-
cachedTextDecoder.decode();
|
|
124
|
-
|
|
125
|
-
function getStringFromWasm0(ptr, len) {
|
|
126
|
-
ptr = ptr >>> 0;
|
|
127
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
128
|
-
}
|
|
129
|
-
|
|
130
130
|
let cachedBigInt64Memory0 = null;
|
|
131
131
|
|
|
132
132
|
function getBigInt64Memory0() {
|
|
@@ -225,115 +225,23 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
225
225
|
|
|
226
226
|
return real;
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
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__h0c6c8312617d6ad4(arg0, arg1, addHeapObject(arg2));
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
233
|
-
const ptr = malloc(arg.length * 1) >>> 0;
|
|
234
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
235
|
-
WASM_VECTOR_LEN = arg.length;
|
|
236
|
-
return ptr;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
240
|
-
*
|
|
241
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
242
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
243
|
-
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
244
|
-
* @param {Uint8Array} circuit
|
|
245
|
-
* @param {WitnessMap} solved_witness
|
|
246
|
-
* @returns {WitnessMap}
|
|
247
|
-
*/
|
|
248
|
-
module.exports.getPublicWitness = function(circuit, solved_witness) {
|
|
249
|
-
try {
|
|
250
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
251
|
-
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
252
|
-
const len0 = WASM_VECTOR_LEN;
|
|
253
|
-
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
254
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
255
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
256
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
257
|
-
if (r2) {
|
|
258
|
-
throw takeObject(r1);
|
|
259
|
-
}
|
|
260
|
-
return takeObject(r0);
|
|
261
|
-
} finally {
|
|
262
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
268
|
-
*
|
|
269
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
270
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
271
|
-
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
272
|
-
* @param {Uint8Array} circuit
|
|
273
|
-
* @param {WitnessMap} solved_witness
|
|
274
|
-
* @returns {WitnessMap}
|
|
275
|
-
*/
|
|
276
|
-
module.exports.getPublicParametersWitness = function(circuit, solved_witness) {
|
|
277
|
-
try {
|
|
278
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
279
|
-
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
280
|
-
const len0 = WASM_VECTOR_LEN;
|
|
281
|
-
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
282
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
283
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
284
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
285
|
-
if (r2) {
|
|
286
|
-
throw takeObject(r1);
|
|
287
|
-
}
|
|
288
|
-
return takeObject(r0);
|
|
289
|
-
} finally {
|
|
290
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
296
|
-
*
|
|
297
|
-
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
298
|
-
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
299
|
-
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
300
|
-
* @param {Uint8Array} circuit
|
|
301
|
-
* @param {WitnessMap} witness_map
|
|
302
|
-
* @returns {WitnessMap}
|
|
303
|
-
*/
|
|
304
|
-
module.exports.getReturnWitness = function(circuit, witness_map) {
|
|
305
|
-
try {
|
|
306
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
307
|
-
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
308
|
-
const len0 = WASM_VECTOR_LEN;
|
|
309
|
-
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
310
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
311
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
312
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
313
|
-
if (r2) {
|
|
314
|
-
throw takeObject(r1);
|
|
315
|
-
}
|
|
316
|
-
return takeObject(r0);
|
|
317
|
-
} finally {
|
|
318
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Sets the package's logging level.
|
|
324
|
-
*
|
|
325
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
326
|
-
*/
|
|
327
|
-
module.exports.initLogLevel = function(level) {
|
|
328
|
-
wasm.initLogLevel(addHeapObject(level));
|
|
329
|
-
};
|
|
330
|
-
|
|
331
232
|
function _assertClass(instance, klass) {
|
|
332
233
|
if (!(instance instanceof klass)) {
|
|
333
234
|
throw new Error(`expected instance of ${klass.name}`);
|
|
334
235
|
}
|
|
335
236
|
return instance.ptr;
|
|
336
237
|
}
|
|
238
|
+
|
|
239
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
240
|
+
const ptr = malloc(arg.length * 1) >>> 0;
|
|
241
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
242
|
+
WASM_VECTOR_LEN = arg.length;
|
|
243
|
+
return ptr;
|
|
244
|
+
}
|
|
337
245
|
/**
|
|
338
246
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
339
247
|
*
|
|
@@ -396,7 +304,6 @@ module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes,
|
|
|
396
304
|
};
|
|
397
305
|
|
|
398
306
|
/**
|
|
399
|
-
* Calculates the Blake2s256 hash of the input bytes and represents these as a single field element.
|
|
400
307
|
* Verifies a ECDSA signature over the secp256k1 curve.
|
|
401
308
|
* @param {Uint8Array} hashed_msg
|
|
402
309
|
* @param {Uint8Array} public_key_x_bytes
|
|
@@ -506,6 +413,17 @@ module.exports.and = function(lhs, rhs) {
|
|
|
506
413
|
return takeObject(ret);
|
|
507
414
|
};
|
|
508
415
|
|
|
416
|
+
/**
|
|
417
|
+
* Sets the package's logging level.
|
|
418
|
+
*
|
|
419
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
420
|
+
*/
|
|
421
|
+
module.exports.initLogLevel = function(filter) {
|
|
422
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
423
|
+
const len0 = WASM_VECTOR_LEN;
|
|
424
|
+
wasm.initLogLevel(ptr0, len0);
|
|
425
|
+
};
|
|
426
|
+
|
|
509
427
|
/**
|
|
510
428
|
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
511
429
|
*
|
|
@@ -564,6 +482,90 @@ module.exports.buildInfo = function() {
|
|
|
564
482
|
return takeObject(ret);
|
|
565
483
|
};
|
|
566
484
|
|
|
485
|
+
/**
|
|
486
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
|
|
487
|
+
*
|
|
488
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
489
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
490
|
+
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
491
|
+
* @param {Uint8Array} circuit
|
|
492
|
+
* @param {WitnessMap} solved_witness
|
|
493
|
+
* @returns {WitnessMap}
|
|
494
|
+
*/
|
|
495
|
+
module.exports.getPublicWitness = function(circuit, solved_witness) {
|
|
496
|
+
try {
|
|
497
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
498
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
499
|
+
const len0 = WASM_VECTOR_LEN;
|
|
500
|
+
wasm.getPublicWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
501
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
502
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
503
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
504
|
+
if (r2) {
|
|
505
|
+
throw takeObject(r1);
|
|
506
|
+
}
|
|
507
|
+
return takeObject(r0);
|
|
508
|
+
} finally {
|
|
509
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
|
|
515
|
+
*
|
|
516
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
517
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
518
|
+
* @returns {WitnessMap} A witness map containing the circuit's public parameters.
|
|
519
|
+
* @param {Uint8Array} circuit
|
|
520
|
+
* @param {WitnessMap} solved_witness
|
|
521
|
+
* @returns {WitnessMap}
|
|
522
|
+
*/
|
|
523
|
+
module.exports.getPublicParametersWitness = function(circuit, solved_witness) {
|
|
524
|
+
try {
|
|
525
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
526
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
527
|
+
const len0 = WASM_VECTOR_LEN;
|
|
528
|
+
wasm.getPublicParametersWitness(retptr, ptr0, len0, addHeapObject(solved_witness));
|
|
529
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
530
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
531
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
532
|
+
if (r2) {
|
|
533
|
+
throw takeObject(r1);
|
|
534
|
+
}
|
|
535
|
+
return takeObject(r0);
|
|
536
|
+
} finally {
|
|
537
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
543
|
+
*
|
|
544
|
+
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
545
|
+
* @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
|
|
546
|
+
* @returns {WitnessMap} A witness map containing the circuit's return values.
|
|
547
|
+
* @param {Uint8Array} circuit
|
|
548
|
+
* @param {WitnessMap} witness_map
|
|
549
|
+
* @returns {WitnessMap}
|
|
550
|
+
*/
|
|
551
|
+
module.exports.getReturnWitness = function(circuit, witness_map) {
|
|
552
|
+
try {
|
|
553
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
554
|
+
const ptr0 = passArray8ToWasm0(circuit, wasm.__wbindgen_malloc);
|
|
555
|
+
const len0 = WASM_VECTOR_LEN;
|
|
556
|
+
wasm.getReturnWitness(retptr, ptr0, len0, addHeapObject(witness_map));
|
|
557
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
558
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
559
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
560
|
+
if (r2) {
|
|
561
|
+
throw takeObject(r1);
|
|
562
|
+
}
|
|
563
|
+
return takeObject(r0);
|
|
564
|
+
} finally {
|
|
565
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
|
|
567
569
|
function handleError(f, args) {
|
|
568
570
|
try {
|
|
569
571
|
return f.apply(this, args);
|
|
@@ -571,8 +573,8 @@ function handleError(f, args) {
|
|
|
571
573
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
572
574
|
}
|
|
573
575
|
}
|
|
574
|
-
function
|
|
575
|
-
wasm.
|
|
576
|
+
function __wbg_adapter_159(arg0, arg1, arg2, arg3) {
|
|
577
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hc5e8ba855f687f9d(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
576
578
|
}
|
|
577
579
|
|
|
578
580
|
/**
|
|
@@ -592,11 +594,11 @@ class Trap {
|
|
|
592
594
|
wasm.__wbg_trap_free(ptr);
|
|
593
595
|
}
|
|
594
596
|
/**
|
|
595
|
-
*
|
|
597
|
+
* A marker method to indicate that an object is an instance of the `Trap`
|
|
598
|
+
* class.
|
|
596
599
|
*/
|
|
597
|
-
static
|
|
598
|
-
|
|
599
|
-
return takeObject(ret);
|
|
600
|
+
static __wbg_wasmer_trap() {
|
|
601
|
+
wasm.trap___wbg_wasmer_trap();
|
|
600
602
|
}
|
|
601
603
|
}
|
|
602
604
|
module.exports.Trap = Trap;
|
|
@@ -640,27 +642,8 @@ module.exports.__wbindgen_is_array = function(arg0) {
|
|
|
640
642
|
return ret;
|
|
641
643
|
};
|
|
642
644
|
|
|
643
|
-
module.exports.
|
|
644
|
-
const
|
|
645
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
646
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
647
|
-
var len1 = WASM_VECTOR_LEN;
|
|
648
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
649
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
650
|
-
};
|
|
651
|
-
|
|
652
|
-
module.exports.__wbindgen_is_string = function(arg0) {
|
|
653
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
654
|
-
return ret;
|
|
655
|
-
};
|
|
656
|
-
|
|
657
|
-
module.exports.__wbg_new_88dbce24756a0c16 = function() {
|
|
658
|
-
const ret = new Map();
|
|
659
|
-
return addHeapObject(ret);
|
|
660
|
-
};
|
|
661
|
-
|
|
662
|
-
module.exports.__wbindgen_number_new = function(arg0) {
|
|
663
|
-
const ret = arg0;
|
|
645
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
646
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
664
647
|
return addHeapObject(ret);
|
|
665
648
|
};
|
|
666
649
|
|
|
@@ -671,26 +654,40 @@ module.exports.__wbindgen_number_get = function(arg0, arg1) {
|
|
|
671
654
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
672
655
|
};
|
|
673
656
|
|
|
657
|
+
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
658
|
+
const ret = getObject(arg0);
|
|
659
|
+
return addHeapObject(ret);
|
|
660
|
+
};
|
|
661
|
+
|
|
674
662
|
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
675
663
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
676
664
|
return addHeapObject(ret);
|
|
677
665
|
};
|
|
678
666
|
|
|
679
|
-
module.exports.
|
|
680
|
-
const ret = getObject(arg0);
|
|
681
|
-
return
|
|
667
|
+
module.exports.__wbindgen_is_string = function(arg0) {
|
|
668
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
669
|
+
return ret;
|
|
682
670
|
};
|
|
683
671
|
|
|
684
|
-
module.exports.
|
|
685
|
-
const ret = new
|
|
672
|
+
module.exports.__wbg_new_0f04ec64d76ed2a2 = function() {
|
|
673
|
+
const ret = new Map();
|
|
686
674
|
return addHeapObject(ret);
|
|
687
675
|
};
|
|
688
676
|
|
|
689
|
-
module.exports.
|
|
690
|
-
const ret =
|
|
677
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
678
|
+
const ret = arg0;
|
|
691
679
|
return addHeapObject(ret);
|
|
692
680
|
};
|
|
693
681
|
|
|
682
|
+
module.exports.__wbindgen_string_get = function(arg0, arg1) {
|
|
683
|
+
const obj = getObject(arg1);
|
|
684
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
685
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
686
|
+
var len1 = WASM_VECTOR_LEN;
|
|
687
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
688
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
689
|
+
};
|
|
690
|
+
|
|
694
691
|
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
695
692
|
const obj = takeObject(arg0).original;
|
|
696
693
|
if (obj.cnt-- == 1) {
|
|
@@ -701,6 +698,11 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
701
698
|
return ret;
|
|
702
699
|
};
|
|
703
700
|
|
|
701
|
+
module.exports.__wbg_constructor_6648e7ae005cd460 = function(arg0) {
|
|
702
|
+
const ret = new Error(takeObject(arg0));
|
|
703
|
+
return addHeapObject(ret);
|
|
704
|
+
};
|
|
705
|
+
|
|
704
706
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
705
707
|
const ret = getObject(arg0) === undefined;
|
|
706
708
|
return ret;
|
|
@@ -766,12 +768,7 @@ module.exports.__wbindgen_is_bigint = function(arg0) {
|
|
|
766
768
|
return ret;
|
|
767
769
|
};
|
|
768
770
|
|
|
769
|
-
module.exports.
|
|
770
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
771
|
-
return ret;
|
|
772
|
-
};
|
|
773
|
-
|
|
774
|
-
module.exports.__wbg_instanceof_Global_f190e0e5a44a62df = function(arg0) {
|
|
771
|
+
module.exports.__wbg_instanceof_Global_1c3b64df1a5c886c = function(arg0) {
|
|
775
772
|
let result;
|
|
776
773
|
try {
|
|
777
774
|
result = getObject(arg0) instanceof WebAssembly.Global;
|
|
@@ -782,19 +779,14 @@ module.exports.__wbg_instanceof_Global_f190e0e5a44a62df = function(arg0) {
|
|
|
782
779
|
return ret;
|
|
783
780
|
};
|
|
784
781
|
|
|
785
|
-
module.exports.
|
|
786
|
-
const
|
|
787
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
782
|
+
module.exports.__wbindgen_is_function = function(arg0) {
|
|
783
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
788
784
|
return ret;
|
|
789
785
|
};
|
|
790
786
|
|
|
791
|
-
module.exports.
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
};
|
|
795
|
-
|
|
796
|
-
module.exports.__wbindgen_is_symbol = function(arg0) {
|
|
797
|
-
const ret = typeof(getObject(arg0)) === 'symbol';
|
|
787
|
+
module.exports.__wbindgen_is_object = function(arg0) {
|
|
788
|
+
const val = getObject(arg0);
|
|
789
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
798
790
|
return ret;
|
|
799
791
|
};
|
|
800
792
|
|
|
@@ -836,6 +828,10 @@ module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function() { return handl
|
|
|
836
828
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
837
829
|
}, arguments) };
|
|
838
830
|
|
|
831
|
+
module.exports.__wbg_debug_e3f6a1578e6d45ca = function(arg0) {
|
|
832
|
+
console.debug(getObject(arg0));
|
|
833
|
+
};
|
|
834
|
+
|
|
839
835
|
module.exports.__wbg_debug_efabe4eb183aa5d4 = function(arg0, arg1, arg2, arg3) {
|
|
840
836
|
console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
841
837
|
};
|
|
@@ -848,12 +844,16 @@ module.exports.__wbg_error_50f42b952a595a23 = function(arg0, arg1, arg2, arg3) {
|
|
|
848
844
|
console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
849
845
|
};
|
|
850
846
|
|
|
847
|
+
module.exports.__wbg_info_05db236d79f1b785 = function(arg0) {
|
|
848
|
+
console.info(getObject(arg0));
|
|
849
|
+
};
|
|
850
|
+
|
|
851
851
|
module.exports.__wbg_info_24d8f53d98f12b95 = function(arg0, arg1, arg2, arg3) {
|
|
852
852
|
console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
853
853
|
};
|
|
854
854
|
|
|
855
|
-
module.exports.
|
|
856
|
-
console.
|
|
855
|
+
module.exports.__wbg_warn_9bdd743e9f5fe1e0 = function(arg0) {
|
|
856
|
+
console.warn(getObject(arg0));
|
|
857
857
|
};
|
|
858
858
|
|
|
859
859
|
module.exports.__wbg_warn_8342bfbc6028193a = function(arg0, arg1, arg2, arg3) {
|
|
@@ -952,6 +952,17 @@ module.exports.__wbg_toString_68dcf9fa017bbb08 = function(arg0, arg1, arg2) {
|
|
|
952
952
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
953
953
|
};
|
|
954
954
|
|
|
955
|
+
module.exports.__wbg_instanceof_Error_fac23a8832b241da = function(arg0) {
|
|
956
|
+
let result;
|
|
957
|
+
try {
|
|
958
|
+
result = getObject(arg0) instanceof Error;
|
|
959
|
+
} catch {
|
|
960
|
+
result = false;
|
|
961
|
+
}
|
|
962
|
+
const ret = result;
|
|
963
|
+
return ret;
|
|
964
|
+
};
|
|
965
|
+
|
|
955
966
|
module.exports.__wbg_new_87297f22973157c8 = function(arg0, arg1) {
|
|
956
967
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
957
968
|
return addHeapObject(ret);
|
|
@@ -961,6 +972,11 @@ module.exports.__wbg_setcause_394738aae0ce9341 = function(arg0, arg1) {
|
|
|
961
972
|
getObject(arg0).cause = getObject(arg1);
|
|
962
973
|
};
|
|
963
974
|
|
|
975
|
+
module.exports.__wbg_message_eab7d45ec69a2135 = function(arg0) {
|
|
976
|
+
const ret = getObject(arg0).message;
|
|
977
|
+
return addHeapObject(ret);
|
|
978
|
+
};
|
|
979
|
+
|
|
964
980
|
module.exports.__wbg_instanceof_Function_8e1bcaacb89c4438 = function(arg0) {
|
|
965
981
|
let result;
|
|
966
982
|
try {
|
|
@@ -999,7 +1015,7 @@ module.exports.__wbg_forEach_942772130a8d06a6 = function(arg0, arg1, arg2) {
|
|
|
999
1015
|
const a = state0.a;
|
|
1000
1016
|
state0.a = 0;
|
|
1001
1017
|
try {
|
|
1002
|
-
return
|
|
1018
|
+
return __wbg_adapter_159(a, state0.b, arg0, arg1);
|
|
1003
1019
|
} finally {
|
|
1004
1020
|
state0.a = a;
|
|
1005
1021
|
}
|
|
@@ -1015,11 +1031,27 @@ module.exports.__wbg_set_da7be7bf0e037b14 = function(arg0, arg1, arg2) {
|
|
|
1015
1031
|
return addHeapObject(ret);
|
|
1016
1032
|
};
|
|
1017
1033
|
|
|
1034
|
+
module.exports.__wbg_instanceof_Object_a9e9e5766628e8b5 = function(arg0) {
|
|
1035
|
+
let result;
|
|
1036
|
+
try {
|
|
1037
|
+
result = getObject(arg0) instanceof Object;
|
|
1038
|
+
} catch {
|
|
1039
|
+
result = false;
|
|
1040
|
+
}
|
|
1041
|
+
const ret = result;
|
|
1042
|
+
return ret;
|
|
1043
|
+
};
|
|
1044
|
+
|
|
1018
1045
|
module.exports.__wbg_constructor_f2623999a1f453eb = function(arg0) {
|
|
1019
1046
|
const ret = getObject(arg0).constructor;
|
|
1020
1047
|
return addHeapObject(ret);
|
|
1021
1048
|
};
|
|
1022
1049
|
|
|
1050
|
+
module.exports.__wbg_toString_e2b23ac99490a381 = function(arg0) {
|
|
1051
|
+
const ret = getObject(arg0).toString();
|
|
1052
|
+
return addHeapObject(ret);
|
|
1053
|
+
};
|
|
1054
|
+
|
|
1023
1055
|
module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
|
|
1024
1056
|
try {
|
|
1025
1057
|
var state0 = {a: arg0, b: arg1};
|
|
@@ -1027,7 +1059,7 @@ module.exports.__wbg_new_2b55e405e4af4986 = function(arg0, arg1) {
|
|
|
1027
1059
|
const a = state0.a;
|
|
1028
1060
|
state0.a = 0;
|
|
1029
1061
|
try {
|
|
1030
|
-
return
|
|
1062
|
+
return __wbg_adapter_159(a, state0.b, arg0, arg1);
|
|
1031
1063
|
} finally {
|
|
1032
1064
|
state0.a = a;
|
|
1033
1065
|
}
|
|
@@ -1189,8 +1221,8 @@ module.exports.__wbindgen_function_table = function() {
|
|
|
1189
1221
|
return addHeapObject(ret);
|
|
1190
1222
|
};
|
|
1191
1223
|
|
|
1192
|
-
module.exports.
|
|
1193
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1224
|
+
module.exports.__wbindgen_closure_wrapper1419 = function(arg0, arg1, arg2) {
|
|
1225
|
+
const ret = makeMutClosure(arg0, arg1, 498, __wbg_adapter_52);
|
|
1194
1226
|
return addHeapObject(ret);
|
|
1195
1227
|
};
|
|
1196
1228
|
|
package/nodejs/acvm_js_bg.wasm
CHANGED
|
Binary file
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noir-lang/acvm_js",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"repository": {
|
|
5
|
-
"type": "git",
|
|
6
|
-
"url": "https://github.com/noir-lang/acvm.git"
|
|
7
|
-
},
|
|
3
|
+
"version": "0.39.0",
|
|
8
4
|
"publishConfig": {
|
|
9
5
|
"access": "public"
|
|
10
6
|
},
|
|
11
|
-
"
|
|
7
|
+
"contributors": [
|
|
12
8
|
"The Noir Team <team@noir-lang.org>"
|
|
13
9
|
],
|
|
10
|
+
"homepage": "https://noir-lang.org/",
|
|
11
|
+
"repository": {
|
|
12
|
+
"url": "https://github.com/noir-lang/noir.git",
|
|
13
|
+
"directory": "acvm_repo/acvm_js",
|
|
14
|
+
"type": "git"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/noir-lang/noir/issues"
|
|
18
|
+
},
|
|
14
19
|
"license": "MIT",
|
|
15
20
|
"main": "./nodejs/acvm_js.js",
|
|
16
21
|
"types": "./web/acvm_js.d.ts",
|