@aztec/noir-acvm_js 0.0.0-test.0 → 0.0.1-commit.0208eb9

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.
@@ -1,33 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
5
- *
6
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
7
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
8
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
9
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
10
- */
11
- export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
12
- /**
13
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
14
- * This method also extracts the public return values from the solved witness into its own return witness.
15
- *
16
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
17
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
18
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
19
- * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
20
- */
21
- export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
22
- /**
23
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
24
- *
25
- * @param {Uint8Array} program - A serialized representation of an ACIR program
26
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
27
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
28
- * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
4
+ * Returns the `BuildInfo` object containing information about how the installed package was built.
5
+ * @returns {BuildInfo} - Information on how the installed package was built.
29
6
  */
30
- export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
7
+ export function buildInfo(): BuildInfo;
31
8
  /**
32
9
  * Compresses a `WitnessMap` into the binary format outputted by Nargo.
33
10
  *
@@ -57,12 +34,6 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
57
34
  * @returns {WitnessStack} The decompressed witness stack.
58
35
  */
59
36
  export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
60
- /**
61
- * Sets the package's logging level.
62
- *
63
- * @param {LogLevel} level - The maximum level of logging to be emitted.
64
- */
65
- export function initLogLevel(filter: string): void;
66
37
  /**
67
38
  * Performs a bitwise AND operation between `lhs` and `rhs`
68
39
  */
@@ -88,10 +59,39 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
88
59
  */
89
60
  export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
90
61
  /**
91
- * Returns the `BuildInfo` object containing information about how the installed package was built.
92
- * @returns {BuildInfo} - Information on how the installed package was built.
62
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
63
+ *
64
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
65
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
66
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
67
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
93
68
  */
94
- export function buildInfo(): BuildInfo;
69
+ export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
70
+ /**
71
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
72
+ * This method also extracts the public return values from the solved witness into its own return witness.
73
+ *
74
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
75
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
76
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
77
+ * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
78
+ */
79
+ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
80
+ /**
81
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
82
+ *
83
+ * @param {Uint8Array} program - A serialized representation of an ACIR program
84
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
85
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
86
+ * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
87
+ */
88
+ export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
89
+ /**
90
+ * Sets the package's logging level.
91
+ *
92
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
93
+ */
94
+ export function initLogLevel(filter: string): void;
95
95
  /**
96
96
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
97
97
  *
@@ -117,19 +117,6 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
117
117
  */
118
118
  export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
119
119
 
120
- export type RawAssertionPayload = {
121
- selector: string;
122
- data: string[];
123
- };
124
-
125
- export type ExecutionError = Error & {
126
- callStack?: string[];
127
- rawAssertionPayload?: RawAssertionPayload;
128
- brilligFunctionId?: number;
129
- };
130
-
131
-
132
-
133
120
  export type StackItem = {
134
121
  index: number;
135
122
  witness: WitnessMap;
@@ -167,6 +154,20 @@ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => P
167
154
 
168
155
 
169
156
 
157
+ export type RawAssertionPayload = {
158
+ selector: string;
159
+ data: string[];
160
+ };
161
+
162
+ export type ExecutionError = Error & {
163
+ callStack?: string[];
164
+ rawAssertionPayload?: RawAssertionPayload;
165
+ acirFunctionId?: number;
166
+ brilligFunctionId?: number;
167
+ };
168
+
169
+
170
+
170
171
  // Map from witness index to hex string value of witness.
171
172
  export type WitnessMap = Map<number, string>;
172
173
 
package/nodejs/acvm_js.js CHANGED
@@ -201,56 +201,12 @@ function debugString(val) {
201
201
  // TODO we could test for more things here, like `Set`s and `Map`s.
202
202
  return className;
203
203
  }
204
-
205
- function passArray8ToWasm0(arg, malloc) {
206
- const ptr = malloc(arg.length * 1, 1) >>> 0;
207
- getUint8ArrayMemory0().set(arg, ptr / 1);
208
- WASM_VECTOR_LEN = arg.length;
209
- return ptr;
210
- }
211
- /**
212
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
213
- *
214
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
215
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
216
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
217
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
218
- */
219
- module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
220
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
221
- const len0 = WASM_VECTOR_LEN;
222
- const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
223
- return ret;
224
- };
225
-
226
- /**
227
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
228
- * This method also extracts the public return values from the solved witness into its own return witness.
229
- *
230
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
231
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
232
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
233
- * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
234
- */
235
- module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
236
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
237
- const len0 = WASM_VECTOR_LEN;
238
- const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
239
- return ret;
240
- };
241
-
242
204
  /**
243
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
244
- *
245
- * @param {Uint8Array} program - A serialized representation of an ACIR program
246
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
247
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
248
- * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
205
+ * Returns the `BuildInfo` object containing information about how the installed package was built.
206
+ * @returns {BuildInfo} - Information on how the installed package was built.
249
207
  */
250
- module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
251
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
252
- const len0 = WASM_VECTOR_LEN;
253
- const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
208
+ module.exports.buildInfo = function() {
209
+ const ret = wasm.buildInfo();
254
210
  return ret;
255
211
  };
256
212
 
@@ -280,6 +236,12 @@ module.exports.compressWitness = function(witness_map) {
280
236
  return v1;
281
237
  };
282
238
 
239
+ function passArray8ToWasm0(arg, malloc) {
240
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
241
+ getUint8ArrayMemory0().set(arg, ptr / 1);
242
+ WASM_VECTOR_LEN = arg.length;
243
+ return ptr;
244
+ }
283
245
  /**
284
246
  * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
285
247
  * This should be used to only fetch the witness map for the main function.
@@ -329,20 +291,6 @@ module.exports.decompressWitnessStack = function(compressed_witness) {
329
291
  return takeFromExternrefTable0(ret[0]);
330
292
  };
331
293
 
332
- /**
333
- * Sets the package's logging level.
334
- *
335
- * @param {LogLevel} level - The maximum level of logging to be emitted.
336
- */
337
- module.exports.initLogLevel = function(filter) {
338
- const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
339
- const len0 = WASM_VECTOR_LEN;
340
- const ret = wasm.initLogLevel(ptr0, len0);
341
- if (ret[1]) {
342
- throw takeFromExternrefTable0(ret[0]);
343
- }
344
- };
345
-
346
294
  /**
347
295
  * Performs a bitwise AND operation between `lhs` and `rhs`
348
296
  * @param {string} lhs
@@ -459,14 +407,65 @@ module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes,
459
407
  };
460
408
 
461
409
  /**
462
- * Returns the `BuildInfo` object containing information about how the installed package was built.
463
- * @returns {BuildInfo} - Information on how the installed package was built.
410
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
411
+ *
412
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
413
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
414
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
415
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
464
416
  */
465
- module.exports.buildInfo = function() {
466
- const ret = wasm.buildInfo();
417
+ module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
418
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
419
+ const len0 = WASM_VECTOR_LEN;
420
+ const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
467
421
  return ret;
468
422
  };
469
423
 
424
+ /**
425
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
426
+ * This method also extracts the public return values from the solved witness into its own return witness.
427
+ *
428
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
429
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
430
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
431
+ * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
432
+ */
433
+ module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
434
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
435
+ const len0 = WASM_VECTOR_LEN;
436
+ const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
437
+ return ret;
438
+ };
439
+
440
+ /**
441
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
442
+ *
443
+ * @param {Uint8Array} program - A serialized representation of an ACIR program
444
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
445
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
446
+ * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
447
+ */
448
+ module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
449
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
450
+ const len0 = WASM_VECTOR_LEN;
451
+ const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
452
+ return ret;
453
+ };
454
+
455
+ /**
456
+ * Sets the package's logging level.
457
+ *
458
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
459
+ */
460
+ module.exports.initLogLevel = function(filter) {
461
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
+ const len0 = WASM_VECTOR_LEN;
463
+ const ret = wasm.initLogLevel(ptr0, len0);
464
+ if (ret[1]) {
465
+ throw takeFromExternrefTable0(ret[0]);
466
+ }
467
+ };
468
+
470
469
  /**
471
470
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
472
471
  *
@@ -528,15 +527,15 @@ module.exports.getPublicWitness = function(program, solved_witness) {
528
527
  };
529
528
 
530
529
  function __wbg_adapter_30(arg0, arg1, arg2) {
531
- wasm.closure265_externref_shim(arg0, arg1, arg2);
530
+ wasm.closure448_externref_shim(arg0, arg1, arg2);
532
531
  }
533
532
 
534
533
  function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
535
- wasm.closure826_externref_shim(arg0, arg1, arg2, arg3, arg4);
534
+ wasm.closure933_externref_shim(arg0, arg1, arg2, arg3, arg4);
536
535
  }
537
536
 
538
537
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
539
- wasm.closure830_externref_shim(arg0, arg1, arg2, arg3);
538
+ wasm.closure937_externref_shim(arg0, arg1, arg2, arg3);
540
539
  }
541
540
 
542
541
  module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
@@ -554,12 +553,12 @@ module.exports.__wbg_call_833bed5770ea2041 = function() { return handleError(fun
554
553
  return ret;
555
554
  }, arguments) };
556
555
 
557
- module.exports.__wbg_constructor_003f4a4118e07291 = function(arg0) {
556
+ module.exports.__wbg_constructor_536364f6bcd4616b = function(arg0) {
558
557
  const ret = new Error(arg0);
559
558
  return ret;
560
559
  };
561
560
 
562
- module.exports.__wbg_constructor_c456dcccc52847dd = function(arg0) {
561
+ module.exports.__wbg_constructor_66e92e9c3ecae9e8 = function(arg0) {
563
562
  const ret = new Error(arg0);
564
563
  return ret;
565
564
  };
@@ -675,11 +674,6 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
675
674
  }
676
675
  };
677
676
 
678
- module.exports.__wbg_new_3f4c5c451d69e970 = function() {
679
- const ret = new Map();
680
- return ret;
681
- };
682
-
683
677
  module.exports.__wbg_new_5e0be73521bc8c17 = function() {
684
678
  const ret = new Map();
685
679
  return ret;
@@ -695,7 +689,7 @@ module.exports.__wbg_new_8a6f238a6ece86ea = function() {
695
689
  return ret;
696
690
  };
697
691
 
698
- module.exports.__wbg_new_a324c5957dd8b845 = function() {
692
+ module.exports.__wbg_new_9f501325818b4158 = function() {
699
693
  const ret = new Array();
700
694
  return ret;
701
695
  };
@@ -705,6 +699,11 @@ module.exports.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
705
699
  return ret;
706
700
  };
707
701
 
702
+ module.exports.__wbg_new_ec40611a7805f1f0 = function() {
703
+ const ret = new Map();
704
+ return ret;
705
+ };
706
+
708
707
  module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
709
708
  const ret = new Function(getStringFromWasm0(arg0, arg1));
710
709
  return ret;
@@ -814,8 +813,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
814
813
  return ret;
815
814
  };
816
815
 
817
- module.exports.__wbindgen_closure_wrapper740 = function(arg0, arg1, arg2) {
818
- const ret = makeMutClosure(arg0, arg1, 266, __wbg_adapter_30);
816
+ module.exports.__wbindgen_closure_wrapper1445 = function(arg0, arg1, arg2) {
817
+ const ret = makeMutClosure(arg0, arg1, 449, __wbg_adapter_30);
819
818
  return ret;
820
819
  };
821
820
 
Binary file
@@ -1,21 +1,21 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
5
- export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
6
- export const executeProgram: (a: number, b: number, c: any, d: any) => any;
4
+ export const buildInfo: () => any;
7
5
  export const compressWitness: (a: any) => [number, number, number, number];
8
6
  export const decompressWitness: (a: number, b: number) => [number, number, number];
9
7
  export const compressWitnessStack: (a: any) => [number, number, number, number];
10
8
  export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
11
- export const initLogLevel: (a: number, b: number) => [number, number];
12
9
  export const and: (a: any, b: any) => any;
13
10
  export const xor: (a: any, b: any) => any;
14
11
  export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
15
12
  export const blake2s256: (a: number, b: number) => [number, number];
16
13
  export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
17
14
  export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
18
- export const buildInfo: () => any;
15
+ export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
16
+ export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
17
+ export const executeProgram: (a: number, b: number, c: any, d: any) => any;
18
+ export const initLogLevel: (a: number, b: number) => [number, number];
19
19
  export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
20
20
  export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
21
21
  export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
@@ -27,7 +27,7 @@ export const __wbindgen_malloc: (a: number, b: number) => number;
27
27
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
28
28
  export const __wbindgen_export_6: WebAssembly.Table;
29
29
  export const __externref_table_dealloc: (a: number) => void;
30
- export const closure265_externref_shim: (a: number, b: number, c: any) => void;
31
- export const closure826_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
- export const closure830_externref_shim: (a: number, b: number, c: any, d: any) => void;
30
+ export const closure448_externref_shim: (a: number, b: number, c: any) => void;
31
+ export const closure933_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
+ export const closure937_externref_shim: (a: number, b: number, c: any, d: any) => void;
33
33
  export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/noir-acvm_js",
3
- "version": "0.0.0-test.0",
3
+ "version": "0.0.1-commit.0208eb9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -26,27 +26,27 @@
26
26
  "package.json"
27
27
  ],
28
28
  "sideEffects": false,
29
- "packageManager": "yarn@3.5.1",
29
+ "packageManager": "yarn@4.5.2",
30
30
  "scripts": {
31
31
  "build": "bash ./build.sh",
32
32
  "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
33
33
  "test:browser": "web-test-runner",
34
- "lint": "NODE_NO_WARNINGS=1 eslint . --ext .ts --ignore-path ./.eslintignore --max-warnings 0",
34
+ "lint": "NODE_NO_WARNINGS=1 eslint . --max-warnings 0",
35
35
  "publish": "echo 📡 publishing `$npm_package_name` && yarn npm publish",
36
36
  "nightly:version": "jq --arg new_version \"-$(git rev-parse --short HEAD)$1\" '.version = .version + $new_version' package.json > package-tmp.json && mv package-tmp.json package.json",
37
37
  "clean": "chmod u+w web nodejs || true && rm -rf web nodejs"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@esm-bundle/chai": "^4.3.4-fix.0",
41
- "@web/dev-server-esbuild": "^0.3.6",
42
- "@web/test-runner": "^0.18.1",
43
- "@web/test-runner-playwright": "^0.11.0",
44
- "chai": "^4.4.1",
45
- "eslint": "^8.57.0",
46
- "eslint-plugin-prettier": "^5.1.3",
47
- "mocha": "^10.2.0",
48
- "prettier": "3.2.5",
49
- "ts-node": "^10.9.1",
50
- "typescript": "^5.4.2"
41
+ "@web/dev-server-esbuild": "^1.0.4",
42
+ "@web/test-runner": "^0.20.2",
43
+ "@web/test-runner-playwright": "^0.11.1",
44
+ "chai": "^6.2.2",
45
+ "eslint": "^9.39.2",
46
+ "eslint-plugin-prettier": "^5.5.5",
47
+ "mocha": "^11.7.5",
48
+ "prettier": "3.8.1",
49
+ "ts-node": "^10.9.2",
50
+ "typescript": "^5.8.3"
51
51
  }
52
52
  }
package/web/acvm_js.d.ts CHANGED
@@ -1,33 +1,10 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
5
- *
6
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
7
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
8
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
9
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
10
- */
11
- export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
12
- /**
13
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
14
- * This method also extracts the public return values from the solved witness into its own return witness.
15
- *
16
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
17
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
18
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
19
- * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
20
- */
21
- export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
22
- /**
23
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
24
- *
25
- * @param {Uint8Array} program - A serialized representation of an ACIR program
26
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
27
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
28
- * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
4
+ * Returns the `BuildInfo` object containing information about how the installed package was built.
5
+ * @returns {BuildInfo} - Information on how the installed package was built.
29
6
  */
30
- export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
7
+ export function buildInfo(): BuildInfo;
31
8
  /**
32
9
  * Compresses a `WitnessMap` into the binary format outputted by Nargo.
33
10
  *
@@ -57,12 +34,6 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
57
34
  * @returns {WitnessStack} The decompressed witness stack.
58
35
  */
59
36
  export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
60
- /**
61
- * Sets the package's logging level.
62
- *
63
- * @param {LogLevel} level - The maximum level of logging to be emitted.
64
- */
65
- export function initLogLevel(filter: string): void;
66
37
  /**
67
38
  * Performs a bitwise AND operation between `lhs` and `rhs`
68
39
  */
@@ -88,10 +59,39 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
88
59
  */
89
60
  export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
90
61
  /**
91
- * Returns the `BuildInfo` object containing information about how the installed package was built.
92
- * @returns {BuildInfo} - Information on how the installed package was built.
62
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
63
+ *
64
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
65
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
66
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
67
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
93
68
  */
94
- export function buildInfo(): BuildInfo;
69
+ export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
70
+ /**
71
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
72
+ * This method also extracts the public return values from the solved witness into its own return witness.
73
+ *
74
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
75
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
76
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
77
+ * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
78
+ */
79
+ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
80
+ /**
81
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
82
+ *
83
+ * @param {Uint8Array} program - A serialized representation of an ACIR program
84
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
85
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
86
+ * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
87
+ */
88
+ export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
89
+ /**
90
+ * Sets the package's logging level.
91
+ *
92
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
93
+ */
94
+ export function initLogLevel(filter: string): void;
95
95
  /**
96
96
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
97
97
  *
@@ -117,19 +117,6 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
117
117
  */
118
118
  export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
119
119
 
120
- export type RawAssertionPayload = {
121
- selector: string;
122
- data: string[];
123
- };
124
-
125
- export type ExecutionError = Error & {
126
- callStack?: string[];
127
- rawAssertionPayload?: RawAssertionPayload;
128
- brilligFunctionId?: number;
129
- };
130
-
131
-
132
-
133
120
  export type StackItem = {
134
121
  index: number;
135
122
  witness: WitnessMap;
@@ -167,6 +154,20 @@ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => P
167
154
 
168
155
 
169
156
 
157
+ export type RawAssertionPayload = {
158
+ selector: string;
159
+ data: string[];
160
+ };
161
+
162
+ export type ExecutionError = Error & {
163
+ callStack?: string[];
164
+ rawAssertionPayload?: RawAssertionPayload;
165
+ acirFunctionId?: number;
166
+ brilligFunctionId?: number;
167
+ };
168
+
169
+
170
+
170
171
  // Map from witness index to hex string value of witness.
171
172
  export type WitnessMap = Map<number, string>;
172
173
 
@@ -186,21 +187,21 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
186
187
 
187
188
  export interface InitOutput {
188
189
  readonly memory: WebAssembly.Memory;
189
- readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
190
- readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
191
- readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
190
+ readonly buildInfo: () => any;
192
191
  readonly compressWitness: (a: any) => [number, number, number, number];
193
192
  readonly decompressWitness: (a: number, b: number) => [number, number, number];
194
193
  readonly compressWitnessStack: (a: any) => [number, number, number, number];
195
194
  readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
196
- readonly initLogLevel: (a: number, b: number) => [number, number];
197
195
  readonly and: (a: any, b: any) => any;
198
196
  readonly xor: (a: any, b: any) => any;
199
197
  readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
200
198
  readonly blake2s256: (a: number, b: number) => [number, number];
201
199
  readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
202
200
  readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
203
- readonly buildInfo: () => any;
201
+ readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
202
+ readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
203
+ readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
204
+ readonly initLogLevel: (a: number, b: number) => [number, number];
204
205
  readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
205
206
  readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
206
207
  readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
@@ -212,9 +213,9 @@ export interface InitOutput {
212
213
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
213
214
  readonly __wbindgen_export_6: WebAssembly.Table;
214
215
  readonly __externref_table_dealloc: (a: number) => void;
215
- readonly closure265_externref_shim: (a: number, b: number, c: any) => void;
216
- readonly closure826_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
217
- readonly closure830_externref_shim: (a: number, b: number, c: any, d: any) => void;
216
+ readonly closure448_externref_shim: (a: number, b: number, c: any) => void;
217
+ readonly closure933_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
218
+ readonly closure937_externref_shim: (a: number, b: number, c: any, d: any) => void;
218
219
  readonly __wbindgen_start: () => void;
219
220
  }
220
221
 
package/web/acvm_js.js CHANGED
@@ -197,56 +197,12 @@ function debugString(val) {
197
197
  // TODO we could test for more things here, like `Set`s and `Map`s.
198
198
  return className;
199
199
  }
200
-
201
- function passArray8ToWasm0(arg, malloc) {
202
- const ptr = malloc(arg.length * 1, 1) >>> 0;
203
- getUint8ArrayMemory0().set(arg, ptr / 1);
204
- WASM_VECTOR_LEN = arg.length;
205
- return ptr;
206
- }
207
200
  /**
208
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
209
- *
210
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
211
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
212
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
213
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
214
- */
215
- export function executeCircuit(program, initial_witness, foreign_call_handler) {
216
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
217
- const len0 = WASM_VECTOR_LEN;
218
- const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
219
- return ret;
220
- }
221
-
222
- /**
223
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
224
- * This method also extracts the public return values from the solved witness into its own return witness.
225
- *
226
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
227
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
228
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
229
- * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
230
- */
231
- export function executeCircuitWithReturnWitness(program, initial_witness, foreign_call_handler) {
232
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
233
- const len0 = WASM_VECTOR_LEN;
234
- const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
235
- return ret;
236
- }
237
-
238
- /**
239
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
240
- *
241
- * @param {Uint8Array} program - A serialized representation of an ACIR program
242
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
243
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
244
- * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
201
+ * Returns the `BuildInfo` object containing information about how the installed package was built.
202
+ * @returns {BuildInfo} - Information on how the installed package was built.
245
203
  */
246
- export function executeProgram(program, initial_witness, foreign_call_handler) {
247
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
248
- const len0 = WASM_VECTOR_LEN;
249
- const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
204
+ export function buildInfo() {
205
+ const ret = wasm.buildInfo();
250
206
  return ret;
251
207
  }
252
208
 
@@ -276,6 +232,12 @@ export function compressWitness(witness_map) {
276
232
  return v1;
277
233
  }
278
234
 
235
+ function passArray8ToWasm0(arg, malloc) {
236
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
237
+ getUint8ArrayMemory0().set(arg, ptr / 1);
238
+ WASM_VECTOR_LEN = arg.length;
239
+ return ptr;
240
+ }
279
241
  /**
280
242
  * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
281
243
  * This should be used to only fetch the witness map for the main function.
@@ -325,20 +287,6 @@ export function decompressWitnessStack(compressed_witness) {
325
287
  return takeFromExternrefTable0(ret[0]);
326
288
  }
327
289
 
328
- /**
329
- * Sets the package's logging level.
330
- *
331
- * @param {LogLevel} level - The maximum level of logging to be emitted.
332
- */
333
- export function initLogLevel(filter) {
334
- const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
335
- const len0 = WASM_VECTOR_LEN;
336
- const ret = wasm.initLogLevel(ptr0, len0);
337
- if (ret[1]) {
338
- throw takeFromExternrefTable0(ret[0]);
339
- }
340
- }
341
-
342
290
  /**
343
291
  * Performs a bitwise AND operation between `lhs` and `rhs`
344
292
  * @param {string} lhs
@@ -455,14 +403,65 @@ export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_ke
455
403
  }
456
404
 
457
405
  /**
458
- * Returns the `BuildInfo` object containing information about how the installed package was built.
459
- * @returns {BuildInfo} - Information on how the installed package was built.
406
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
407
+ *
408
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
409
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
410
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
411
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
460
412
  */
461
- export function buildInfo() {
462
- const ret = wasm.buildInfo();
413
+ export function executeCircuit(program, initial_witness, foreign_call_handler) {
414
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
415
+ const len0 = WASM_VECTOR_LEN;
416
+ const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
417
+ return ret;
418
+ }
419
+
420
+ /**
421
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
422
+ * This method also extracts the public return values from the solved witness into its own return witness.
423
+ *
424
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
425
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
426
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
427
+ * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
428
+ */
429
+ export function executeCircuitWithReturnWitness(program, initial_witness, foreign_call_handler) {
430
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
431
+ const len0 = WASM_VECTOR_LEN;
432
+ const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
433
+ return ret;
434
+ }
435
+
436
+ /**
437
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
438
+ *
439
+ * @param {Uint8Array} program - A serialized representation of an ACIR program
440
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
441
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
442
+ * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
443
+ */
444
+ export function executeProgram(program, initial_witness, foreign_call_handler) {
445
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
446
+ const len0 = WASM_VECTOR_LEN;
447
+ const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
463
448
  return ret;
464
449
  }
465
450
 
451
+ /**
452
+ * Sets the package's logging level.
453
+ *
454
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
455
+ */
456
+ export function initLogLevel(filter) {
457
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
458
+ const len0 = WASM_VECTOR_LEN;
459
+ const ret = wasm.initLogLevel(ptr0, len0);
460
+ if (ret[1]) {
461
+ throw takeFromExternrefTable0(ret[0]);
462
+ }
463
+ }
464
+
466
465
  /**
467
466
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
468
467
  *
@@ -524,15 +523,15 @@ export function getPublicWitness(program, solved_witness) {
524
523
  }
525
524
 
526
525
  function __wbg_adapter_30(arg0, arg1, arg2) {
527
- wasm.closure265_externref_shim(arg0, arg1, arg2);
526
+ wasm.closure448_externref_shim(arg0, arg1, arg2);
528
527
  }
529
528
 
530
529
  function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
531
- wasm.closure826_externref_shim(arg0, arg1, arg2, arg3, arg4);
530
+ wasm.closure933_externref_shim(arg0, arg1, arg2, arg3, arg4);
532
531
  }
533
532
 
534
533
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
535
- wasm.closure830_externref_shim(arg0, arg1, arg2, arg3);
534
+ wasm.closure937_externref_shim(arg0, arg1, arg2, arg3);
536
535
  }
537
536
 
538
537
  async function __wbg_load(module, imports) {
@@ -581,11 +580,11 @@ function __wbg_get_imports() {
581
580
  const ret = arg0.call(arg1, arg2, arg3);
582
581
  return ret;
583
582
  }, arguments) };
584
- imports.wbg.__wbg_constructor_003f4a4118e07291 = function(arg0) {
583
+ imports.wbg.__wbg_constructor_536364f6bcd4616b = function(arg0) {
585
584
  const ret = new Error(arg0);
586
585
  return ret;
587
586
  };
588
- imports.wbg.__wbg_constructor_c456dcccc52847dd = function(arg0) {
587
+ imports.wbg.__wbg_constructor_66e92e9c3ecae9e8 = function(arg0) {
589
588
  const ret = new Error(arg0);
590
589
  return ret;
591
590
  };
@@ -686,10 +685,6 @@ function __wbg_get_imports() {
686
685
  state0.a = state0.b = 0;
687
686
  }
688
687
  };
689
- imports.wbg.__wbg_new_3f4c5c451d69e970 = function() {
690
- const ret = new Map();
691
- return ret;
692
- };
693
688
  imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
694
689
  const ret = new Map();
695
690
  return ret;
@@ -702,7 +697,7 @@ function __wbg_get_imports() {
702
697
  const ret = new Error();
703
698
  return ret;
704
699
  };
705
- imports.wbg.__wbg_new_a324c5957dd8b845 = function() {
700
+ imports.wbg.__wbg_new_9f501325818b4158 = function() {
706
701
  const ret = new Array();
707
702
  return ret;
708
703
  };
@@ -710,6 +705,10 @@ function __wbg_get_imports() {
710
705
  const ret = new Error(getStringFromWasm0(arg0, arg1));
711
706
  return ret;
712
707
  };
708
+ imports.wbg.__wbg_new_ec40611a7805f1f0 = function() {
709
+ const ret = new Map();
710
+ return ret;
711
+ };
713
712
  imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
714
713
  const ret = new Function(getStringFromWasm0(arg0, arg1));
715
714
  return ret;
@@ -798,8 +797,8 @@ function __wbg_get_imports() {
798
797
  const ret = false;
799
798
  return ret;
800
799
  };
801
- imports.wbg.__wbindgen_closure_wrapper740 = function(arg0, arg1, arg2) {
802
- const ret = makeMutClosure(arg0, arg1, 266, __wbg_adapter_30);
800
+ imports.wbg.__wbindgen_closure_wrapper1445 = function(arg0, arg1, arg2) {
801
+ const ret = makeMutClosure(arg0, arg1, 449, __wbg_adapter_30);
803
802
  return ret;
804
803
  };
805
804
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -1,21 +1,21 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
5
- export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
6
- export const executeProgram: (a: number, b: number, c: any, d: any) => any;
4
+ export const buildInfo: () => any;
7
5
  export const compressWitness: (a: any) => [number, number, number, number];
8
6
  export const decompressWitness: (a: number, b: number) => [number, number, number];
9
7
  export const compressWitnessStack: (a: any) => [number, number, number, number];
10
8
  export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
11
- export const initLogLevel: (a: number, b: number) => [number, number];
12
9
  export const and: (a: any, b: any) => any;
13
10
  export const xor: (a: any, b: any) => any;
14
11
  export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
15
12
  export const blake2s256: (a: number, b: number) => [number, number];
16
13
  export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
17
14
  export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
18
- export const buildInfo: () => any;
15
+ export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
16
+ export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
17
+ export const executeProgram: (a: number, b: number, c: any, d: any) => any;
18
+ export const initLogLevel: (a: number, b: number) => [number, number];
19
19
  export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
20
20
  export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
21
21
  export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
@@ -27,7 +27,7 @@ export const __wbindgen_malloc: (a: number, b: number) => number;
27
27
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
28
28
  export const __wbindgen_export_6: WebAssembly.Table;
29
29
  export const __externref_table_dealloc: (a: number) => void;
30
- export const closure265_externref_shim: (a: number, b: number, c: any) => void;
31
- export const closure826_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
- export const closure830_externref_shim: (a: number, b: number, c: any, d: any) => void;
30
+ export const closure448_externref_shim: (a: number, b: number, c: any) => void;
31
+ export const closure933_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
+ export const closure937_externref_shim: (a: number, b: number, c: any, d: any) => void;
33
33
  export const __wbindgen_start: () => void;