@aztec/noir-acvm_js 3.0.0-nightly.20251115 → 3.0.0-nightly.20251118

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.
@@ -63,11 +63,29 @@ export function executeProgram(program: Uint8Array, initial_witness: WitnessMap,
63
63
  */
64
64
  export function buildInfo(): BuildInfo;
65
65
  /**
66
- * Sets the package's logging level.
66
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
67
67
  *
68
- * @param {LogLevel} level - The maximum level of logging to be emitted.
68
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
69
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
70
+ * @returns {WitnessMap} A witness map containing the circuit's return values.
69
71
  */
70
- export function initLogLevel(filter: string): void;
72
+ export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
73
+ /**
74
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
75
+ *
76
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
77
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
78
+ * @returns {WitnessMap} A witness map containing the circuit's public parameters.
79
+ */
80
+ export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
81
+ /**
82
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
83
+ *
84
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
85
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
86
+ * @returns {WitnessMap} A witness map containing the circuit's public inputs.
87
+ */
88
+ export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
71
89
  /**
72
90
  * Performs a bitwise AND operation between `lhs` and `rhs`
73
91
  */
@@ -93,44 +111,11 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
93
111
  */
94
112
  export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
95
113
  /**
96
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
97
- *
98
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
99
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
100
- * @returns {WitnessMap} A witness map containing the circuit's return values.
101
- */
102
- export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
103
- /**
104
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
105
- *
106
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
107
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
108
- * @returns {WitnessMap} A witness map containing the circuit's public parameters.
109
- */
110
- export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
111
- /**
112
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
114
+ * Sets the package's logging level.
113
115
  *
114
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
115
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
116
- * @returns {WitnessMap} A witness map containing the circuit's public inputs.
117
- */
118
- export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
119
-
120
- // Map from witness index to hex string value of witness.
121
- export type WitnessMap = Map<number, string>;
122
-
123
- /**
124
- * An execution result containing two witnesses.
125
- * 1. The full solved witness of the execution.
126
- * 2. The return witness which contains the given public return values within the full witness.
116
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
127
117
  */
128
- export type SolvedAndReturnWitness = {
129
- solvedWitness: WitnessMap;
130
- returnWitness: WitnessMap;
131
- }
132
-
133
-
118
+ export function initLogLevel(filter: string): void;
134
119
 
135
120
  /**
136
121
  * @typedef {Object} BuildInfo - Information about how the installed package was built
@@ -160,6 +145,21 @@ export type ExecutionError = Error & {
160
145
 
161
146
 
162
147
 
148
+ // Map from witness index to hex string value of witness.
149
+ export type WitnessMap = Map<number, string>;
150
+
151
+ /**
152
+ * An execution result containing two witnesses.
153
+ * 1. The full solved witness of the execution.
154
+ * 2. The return witness which contains the given public return values within the full witness.
155
+ */
156
+ export type SolvedAndReturnWitness = {
157
+ solvedWitness: WitnessMap;
158
+ returnWitness: WitnessMap;
159
+ }
160
+
161
+
162
+
163
163
  export type ForeignCallInput = string[]
164
164
  export type ForeignCallOutput = string | string[]
165
165
 
package/nodejs/acvm_js.js CHANGED
@@ -339,17 +339,63 @@ module.exports.buildInfo = function() {
339
339
  };
340
340
 
341
341
  /**
342
- * Sets the package's logging level.
342
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
343
343
  *
344
- * @param {LogLevel} level - The maximum level of logging to be emitted.
344
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
345
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
346
+ * @returns {WitnessMap} A witness map containing the circuit's return values.
347
+ * @param {Uint8Array} program
348
+ * @param {WitnessMap} witness_map
349
+ * @returns {WitnessMap}
345
350
  */
346
- module.exports.initLogLevel = function(filter) {
347
- const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
351
+ module.exports.getReturnWitness = function(program, witness_map) {
352
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
348
353
  const len0 = WASM_VECTOR_LEN;
349
- const ret = wasm.initLogLevel(ptr0, len0);
350
- if (ret[1]) {
351
- throw takeFromExternrefTable0(ret[0]);
354
+ const ret = wasm.getReturnWitness(ptr0, len0, witness_map);
355
+ if (ret[2]) {
356
+ throw takeFromExternrefTable0(ret[1]);
357
+ }
358
+ return takeFromExternrefTable0(ret[0]);
359
+ };
360
+
361
+ /**
362
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
363
+ *
364
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
365
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
366
+ * @returns {WitnessMap} A witness map containing the circuit's public parameters.
367
+ * @param {Uint8Array} program
368
+ * @param {WitnessMap} solved_witness
369
+ * @returns {WitnessMap}
370
+ */
371
+ module.exports.getPublicParametersWitness = function(program, solved_witness) {
372
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
373
+ const len0 = WASM_VECTOR_LEN;
374
+ const ret = wasm.getPublicParametersWitness(ptr0, len0, solved_witness);
375
+ if (ret[2]) {
376
+ throw takeFromExternrefTable0(ret[1]);
377
+ }
378
+ return takeFromExternrefTable0(ret[0]);
379
+ };
380
+
381
+ /**
382
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
383
+ *
384
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
385
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
386
+ * @returns {WitnessMap} A witness map containing the circuit's public inputs.
387
+ * @param {Uint8Array} program
388
+ * @param {WitnessMap} solved_witness
389
+ * @returns {WitnessMap}
390
+ */
391
+ module.exports.getPublicWitness = function(program, solved_witness) {
392
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
393
+ const len0 = WASM_VECTOR_LEN;
394
+ const ret = wasm.getPublicWitness(ptr0, len0, solved_witness);
395
+ if (ret[2]) {
396
+ throw takeFromExternrefTable0(ret[1]);
352
397
  }
398
+ return takeFromExternrefTable0(ret[0]);
353
399
  };
354
400
 
355
401
  /**
@@ -468,75 +514,29 @@ module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes,
468
514
  };
469
515
 
470
516
  /**
471
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
472
- *
473
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
474
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
475
- * @returns {WitnessMap} A witness map containing the circuit's return values.
476
- * @param {Uint8Array} program
477
- * @param {WitnessMap} witness_map
478
- * @returns {WitnessMap}
479
- */
480
- module.exports.getReturnWitness = function(program, witness_map) {
481
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
482
- const len0 = WASM_VECTOR_LEN;
483
- const ret = wasm.getReturnWitness(ptr0, len0, witness_map);
484
- if (ret[2]) {
485
- throw takeFromExternrefTable0(ret[1]);
486
- }
487
- return takeFromExternrefTable0(ret[0]);
488
- };
489
-
490
- /**
491
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
492
- *
493
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
494
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
495
- * @returns {WitnessMap} A witness map containing the circuit's public parameters.
496
- * @param {Uint8Array} program
497
- * @param {WitnessMap} solved_witness
498
- * @returns {WitnessMap}
499
- */
500
- module.exports.getPublicParametersWitness = function(program, solved_witness) {
501
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
502
- const len0 = WASM_VECTOR_LEN;
503
- const ret = wasm.getPublicParametersWitness(ptr0, len0, solved_witness);
504
- if (ret[2]) {
505
- throw takeFromExternrefTable0(ret[1]);
506
- }
507
- return takeFromExternrefTable0(ret[0]);
508
- };
509
-
510
- /**
511
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
517
+ * Sets the package's logging level.
512
518
  *
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 inputs.
516
- * @param {Uint8Array} program
517
- * @param {WitnessMap} solved_witness
518
- * @returns {WitnessMap}
519
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
519
520
  */
520
- module.exports.getPublicWitness = function(program, solved_witness) {
521
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
521
+ module.exports.initLogLevel = function(filter) {
522
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
522
523
  const len0 = WASM_VECTOR_LEN;
523
- const ret = wasm.getPublicWitness(ptr0, len0, solved_witness);
524
- if (ret[2]) {
525
- throw takeFromExternrefTable0(ret[1]);
524
+ const ret = wasm.initLogLevel(ptr0, len0);
525
+ if (ret[1]) {
526
+ throw takeFromExternrefTable0(ret[0]);
526
527
  }
527
- return takeFromExternrefTable0(ret[0]);
528
528
  };
529
529
 
530
530
  function __wbg_adapter_30(arg0, arg1, arg2) {
531
- wasm.closure588_externref_shim(arg0, arg1, arg2);
531
+ wasm.closure577_externref_shim(arg0, arg1, arg2);
532
532
  }
533
533
 
534
534
  function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
535
- wasm.closure1183_externref_shim(arg0, arg1, arg2, arg3, arg4);
535
+ wasm.closure1172_externref_shim(arg0, arg1, arg2, arg3, arg4);
536
536
  }
537
537
 
538
538
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
539
- wasm.closure1187_externref_shim(arg0, arg1, arg2, arg3);
539
+ wasm.closure1176_externref_shim(arg0, arg1, arg2, arg3);
540
540
  }
541
541
 
542
542
  module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
@@ -814,8 +814,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
814
814
  return ret;
815
815
  };
816
816
 
817
- module.exports.__wbindgen_closure_wrapper1982 = function(arg0, arg1, arg2) {
818
- const ret = makeMutClosure(arg0, arg1, 589, __wbg_adapter_30);
817
+ module.exports.__wbindgen_closure_wrapper1979 = function(arg0, arg1, arg2) {
818
+ const ret = makeMutClosure(arg0, arg1, 578, __wbg_adapter_30);
819
819
  return ret;
820
820
  };
821
821
 
Binary file
@@ -9,16 +9,16 @@ export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
9
9
  export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
10
10
  export const executeProgram: (a: number, b: number, c: any, d: any) => any;
11
11
  export const buildInfo: () => any;
12
- export const initLogLevel: (a: number, b: number) => [number, number];
12
+ export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
13
+ export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
14
+ export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
13
15
  export const and: (a: any, b: any) => any;
14
16
  export const xor: (a: any, b: any) => any;
15
17
  export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
16
18
  export const blake2s256: (a: number, b: number) => [number, number];
17
19
  export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
18
20
  export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
19
- export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
20
- export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
21
- export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
21
+ export const initLogLevel: (a: number, b: number) => [number, number];
22
22
  export const __wbindgen_exn_store: (a: number) => void;
23
23
  export const __externref_table_alloc: () => number;
24
24
  export const __wbindgen_export_2: WebAssembly.Table;
@@ -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 closure588_externref_shim: (a: number, b: number, c: any) => void;
31
- export const closure1183_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
- export const closure1187_externref_shim: (a: number, b: number, c: any, d: any) => void;
30
+ export const closure577_externref_shim: (a: number, b: number, c: any) => void;
31
+ export const closure1172_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
+ export const closure1176_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": "3.0.0-nightly.20251115",
3
+ "version": "3.0.0-nightly.20251118",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/web/acvm_js.d.ts CHANGED
@@ -63,11 +63,29 @@ export function executeProgram(program: Uint8Array, initial_witness: WitnessMap,
63
63
  */
64
64
  export function buildInfo(): BuildInfo;
65
65
  /**
66
- * Sets the package's logging level.
66
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
67
67
  *
68
- * @param {LogLevel} level - The maximum level of logging to be emitted.
68
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
69
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
70
+ * @returns {WitnessMap} A witness map containing the circuit's return values.
69
71
  */
70
- export function initLogLevel(filter: string): void;
72
+ export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
73
+ /**
74
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
75
+ *
76
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
77
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
78
+ * @returns {WitnessMap} A witness map containing the circuit's public parameters.
79
+ */
80
+ export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
81
+ /**
82
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
83
+ *
84
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
85
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
86
+ * @returns {WitnessMap} A witness map containing the circuit's public inputs.
87
+ */
88
+ export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
71
89
  /**
72
90
  * Performs a bitwise AND operation between `lhs` and `rhs`
73
91
  */
@@ -93,44 +111,11 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
93
111
  */
94
112
  export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
95
113
  /**
96
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
97
- *
98
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
99
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
100
- * @returns {WitnessMap} A witness map containing the circuit's return values.
101
- */
102
- export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
103
- /**
104
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
105
- *
106
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
107
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
108
- * @returns {WitnessMap} A witness map containing the circuit's public parameters.
109
- */
110
- export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
111
- /**
112
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
114
+ * Sets the package's logging level.
113
115
  *
114
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
115
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
116
- * @returns {WitnessMap} A witness map containing the circuit's public inputs.
117
- */
118
- export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
119
-
120
- // Map from witness index to hex string value of witness.
121
- export type WitnessMap = Map<number, string>;
122
-
123
- /**
124
- * An execution result containing two witnesses.
125
- * 1. The full solved witness of the execution.
126
- * 2. The return witness which contains the given public return values within the full witness.
116
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
127
117
  */
128
- export type SolvedAndReturnWitness = {
129
- solvedWitness: WitnessMap;
130
- returnWitness: WitnessMap;
131
- }
132
-
133
-
118
+ export function initLogLevel(filter: string): void;
134
119
 
135
120
  /**
136
121
  * @typedef {Object} BuildInfo - Information about how the installed package was built
@@ -160,6 +145,21 @@ export type ExecutionError = Error & {
160
145
 
161
146
 
162
147
 
148
+ // Map from witness index to hex string value of witness.
149
+ export type WitnessMap = Map<number, string>;
150
+
151
+ /**
152
+ * An execution result containing two witnesses.
153
+ * 1. The full solved witness of the execution.
154
+ * 2. The return witness which contains the given public return values within the full witness.
155
+ */
156
+ export type SolvedAndReturnWitness = {
157
+ solvedWitness: WitnessMap;
158
+ returnWitness: WitnessMap;
159
+ }
160
+
161
+
162
+
163
163
  export type ForeignCallInput = string[]
164
164
  export type ForeignCallOutput = string | string[]
165
165
 
@@ -195,16 +195,16 @@ export interface InitOutput {
195
195
  readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
196
196
  readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
197
197
  readonly buildInfo: () => any;
198
- readonly initLogLevel: (a: number, b: number) => [number, number];
198
+ readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
199
+ readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
200
+ readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
199
201
  readonly and: (a: any, b: any) => any;
200
202
  readonly xor: (a: any, b: any) => any;
201
203
  readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
202
204
  readonly blake2s256: (a: number, b: number) => [number, number];
203
205
  readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
204
206
  readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
205
- readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
206
- readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
207
- readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
207
+ readonly initLogLevel: (a: number, b: number) => [number, number];
208
208
  readonly __wbindgen_exn_store: (a: number) => void;
209
209
  readonly __externref_table_alloc: () => number;
210
210
  readonly __wbindgen_export_2: WebAssembly.Table;
@@ -213,9 +213,9 @@ export interface InitOutput {
213
213
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
214
214
  readonly __wbindgen_export_6: WebAssembly.Table;
215
215
  readonly __externref_table_dealloc: (a: number) => void;
216
- readonly closure588_externref_shim: (a: number, b: number, c: any) => void;
217
- readonly closure1183_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
218
- readonly closure1187_externref_shim: (a: number, b: number, c: any, d: any) => void;
216
+ readonly closure577_externref_shim: (a: number, b: number, c: any) => void;
217
+ readonly closure1172_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
218
+ readonly closure1176_externref_shim: (a: number, b: number, c: any, d: any) => void;
219
219
  readonly __wbindgen_start: () => void;
220
220
  }
221
221
 
package/web/acvm_js.js CHANGED
@@ -335,17 +335,63 @@ export function buildInfo() {
335
335
  }
336
336
 
337
337
  /**
338
- * Sets the package's logging level.
338
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
339
339
  *
340
- * @param {LogLevel} level - The maximum level of logging to be emitted.
340
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
341
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
342
+ * @returns {WitnessMap} A witness map containing the circuit's return values.
343
+ * @param {Uint8Array} program
344
+ * @param {WitnessMap} witness_map
345
+ * @returns {WitnessMap}
341
346
  */
342
- export function initLogLevel(filter) {
343
- const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
347
+ export function getReturnWitness(program, witness_map) {
348
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
344
349
  const len0 = WASM_VECTOR_LEN;
345
- const ret = wasm.initLogLevel(ptr0, len0);
346
- if (ret[1]) {
347
- throw takeFromExternrefTable0(ret[0]);
350
+ const ret = wasm.getReturnWitness(ptr0, len0, witness_map);
351
+ if (ret[2]) {
352
+ throw takeFromExternrefTable0(ret[1]);
353
+ }
354
+ return takeFromExternrefTable0(ret[0]);
355
+ }
356
+
357
+ /**
358
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
359
+ *
360
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
361
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
362
+ * @returns {WitnessMap} A witness map containing the circuit's public parameters.
363
+ * @param {Uint8Array} program
364
+ * @param {WitnessMap} solved_witness
365
+ * @returns {WitnessMap}
366
+ */
367
+ export function getPublicParametersWitness(program, solved_witness) {
368
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
369
+ const len0 = WASM_VECTOR_LEN;
370
+ const ret = wasm.getPublicParametersWitness(ptr0, len0, solved_witness);
371
+ if (ret[2]) {
372
+ throw takeFromExternrefTable0(ret[1]);
373
+ }
374
+ return takeFromExternrefTable0(ret[0]);
375
+ }
376
+
377
+ /**
378
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
379
+ *
380
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
381
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
382
+ * @returns {WitnessMap} A witness map containing the circuit's public inputs.
383
+ * @param {Uint8Array} program
384
+ * @param {WitnessMap} solved_witness
385
+ * @returns {WitnessMap}
386
+ */
387
+ export function getPublicWitness(program, solved_witness) {
388
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
389
+ const len0 = WASM_VECTOR_LEN;
390
+ const ret = wasm.getPublicWitness(ptr0, len0, solved_witness);
391
+ if (ret[2]) {
392
+ throw takeFromExternrefTable0(ret[1]);
348
393
  }
394
+ return takeFromExternrefTable0(ret[0]);
349
395
  }
350
396
 
351
397
  /**
@@ -464,75 +510,29 @@ export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_ke
464
510
  }
465
511
 
466
512
  /**
467
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
468
- *
469
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
470
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
471
- * @returns {WitnessMap} A witness map containing the circuit's return values.
472
- * @param {Uint8Array} program
473
- * @param {WitnessMap} witness_map
474
- * @returns {WitnessMap}
475
- */
476
- export function getReturnWitness(program, witness_map) {
477
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
478
- const len0 = WASM_VECTOR_LEN;
479
- const ret = wasm.getReturnWitness(ptr0, len0, witness_map);
480
- if (ret[2]) {
481
- throw takeFromExternrefTable0(ret[1]);
482
- }
483
- return takeFromExternrefTable0(ret[0]);
484
- }
485
-
486
- /**
487
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
488
- *
489
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
490
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
491
- * @returns {WitnessMap} A witness map containing the circuit's public parameters.
492
- * @param {Uint8Array} program
493
- * @param {WitnessMap} solved_witness
494
- * @returns {WitnessMap}
495
- */
496
- export function getPublicParametersWitness(program, solved_witness) {
497
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
498
- const len0 = WASM_VECTOR_LEN;
499
- const ret = wasm.getPublicParametersWitness(ptr0, len0, solved_witness);
500
- if (ret[2]) {
501
- throw takeFromExternrefTable0(ret[1]);
502
- }
503
- return takeFromExternrefTable0(ret[0]);
504
- }
505
-
506
- /**
507
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
513
+ * Sets the package's logging level.
508
514
  *
509
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
510
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
511
- * @returns {WitnessMap} A witness map containing the circuit's public inputs.
512
- * @param {Uint8Array} program
513
- * @param {WitnessMap} solved_witness
514
- * @returns {WitnessMap}
515
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
515
516
  */
516
- export function getPublicWitness(program, solved_witness) {
517
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
517
+ export function initLogLevel(filter) {
518
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
518
519
  const len0 = WASM_VECTOR_LEN;
519
- const ret = wasm.getPublicWitness(ptr0, len0, solved_witness);
520
- if (ret[2]) {
521
- throw takeFromExternrefTable0(ret[1]);
520
+ const ret = wasm.initLogLevel(ptr0, len0);
521
+ if (ret[1]) {
522
+ throw takeFromExternrefTable0(ret[0]);
522
523
  }
523
- return takeFromExternrefTable0(ret[0]);
524
524
  }
525
525
 
526
526
  function __wbg_adapter_30(arg0, arg1, arg2) {
527
- wasm.closure588_externref_shim(arg0, arg1, arg2);
527
+ wasm.closure577_externref_shim(arg0, arg1, arg2);
528
528
  }
529
529
 
530
530
  function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
531
- wasm.closure1183_externref_shim(arg0, arg1, arg2, arg3, arg4);
531
+ wasm.closure1172_externref_shim(arg0, arg1, arg2, arg3, arg4);
532
532
  }
533
533
 
534
534
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
535
- wasm.closure1187_externref_shim(arg0, arg1, arg2, arg3);
535
+ wasm.closure1176_externref_shim(arg0, arg1, arg2, arg3);
536
536
  }
537
537
 
538
538
  async function __wbg_load(module, imports) {
@@ -798,8 +798,8 @@ function __wbg_get_imports() {
798
798
  const ret = false;
799
799
  return ret;
800
800
  };
801
- imports.wbg.__wbindgen_closure_wrapper1982 = function(arg0, arg1, arg2) {
802
- const ret = makeMutClosure(arg0, arg1, 589, __wbg_adapter_30);
801
+ imports.wbg.__wbindgen_closure_wrapper1979 = function(arg0, arg1, arg2) {
802
+ const ret = makeMutClosure(arg0, arg1, 578, __wbg_adapter_30);
803
803
  return ret;
804
804
  };
805
805
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -9,16 +9,16 @@ export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
9
9
  export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
10
10
  export const executeProgram: (a: number, b: number, c: any, d: any) => any;
11
11
  export const buildInfo: () => any;
12
- export const initLogLevel: (a: number, b: number) => [number, number];
12
+ export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
13
+ export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
14
+ export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
13
15
  export const and: (a: any, b: any) => any;
14
16
  export const xor: (a: any, b: any) => any;
15
17
  export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
16
18
  export const blake2s256: (a: number, b: number) => [number, number];
17
19
  export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
18
20
  export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
19
- export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
20
- export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
21
- export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
21
+ export const initLogLevel: (a: number, b: number) => [number, number];
22
22
  export const __wbindgen_exn_store: (a: number) => void;
23
23
  export const __externref_table_alloc: () => number;
24
24
  export const __wbindgen_export_2: WebAssembly.Table;
@@ -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 closure588_externref_shim: (a: number, b: number, c: any) => void;
31
- export const closure1183_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
- export const closure1187_externref_shim: (a: number, b: number, c: any, d: any) => void;
30
+ export const closure577_externref_shim: (a: number, b: number, c: any) => void;
31
+ export const closure1172_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
+ export const closure1176_externref_shim: (a: number, b: number, c: any, d: any) => void;
33
33
  export const __wbindgen_start: () => void;