@noir-lang/acvm_js 1.0.0-beta.15-d2c71c4.nightly → 1.0.0-beta.15-155db34.nightly

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.
@@ -57,35 +57,6 @@ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_wit
57
57
  * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
58
58
  */
59
59
  export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
60
- /**
61
- * Returns the `BuildInfo` object containing information about how the installed package was built.
62
- * @returns {BuildInfo} - Information on how the installed package was built.
63
- */
64
- export function buildInfo(): BuildInfo;
65
- /**
66
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
67
- *
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.
71
- */
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;
89
60
  /**
90
61
  * Performs a bitwise AND operation between `lhs` and `rhs`
91
62
  */
@@ -116,6 +87,58 @@ export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_byte
116
87
  * @param {LogLevel} level - The maximum level of logging to be emitted.
117
88
  */
118
89
  export function initLogLevel(filter: string): void;
90
+ /**
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.
93
+ */
94
+ export function buildInfo(): BuildInfo;
95
+ /**
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.
113
+ *
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
+ export type StackItem = {
121
+ index: number;
122
+ witness: WitnessMap;
123
+ }
124
+
125
+ export type WitnessStack = Array<StackItem>;
126
+
127
+
128
+
129
+ export type ForeignCallInput = string[]
130
+ export type ForeignCallOutput = string | string[]
131
+
132
+ /**
133
+ * A callback which performs an foreign call and returns the response.
134
+ * @callback ForeignCallHandler
135
+ * @param {string} name - The identifier for the type of foreign call being performed.
136
+ * @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
137
+ * @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
138
+ */
139
+ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
140
+
141
+
119
142
 
120
143
  /**
121
144
  * @typedef {Object} BuildInfo - Information about how the installed package was built
@@ -159,26 +182,3 @@ export type SolvedAndReturnWitness = {
159
182
  }
160
183
 
161
184
 
162
-
163
- export type ForeignCallInput = string[]
164
- export type ForeignCallOutput = string | string[]
165
-
166
- /**
167
- * A callback which performs an foreign call and returns the response.
168
- * @callback ForeignCallHandler
169
- * @param {string} name - The identifier for the type of foreign call being performed.
170
- * @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
171
- * @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
172
- */
173
- export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
174
-
175
-
176
-
177
- export type StackItem = {
178
- index: number;
179
- witness: WitnessMap;
180
- }
181
-
182
- export type WitnessStack = Array<StackItem>;
183
-
184
-
package/nodejs/acvm_js.js CHANGED
@@ -329,75 +329,6 @@ module.exports.executeProgram = function(program, initial_witness, foreign_call_
329
329
  return ret;
330
330
  };
331
331
 
332
- /**
333
- * Returns the `BuildInfo` object containing information about how the installed package was built.
334
- * @returns {BuildInfo} - Information on how the installed package was built.
335
- */
336
- module.exports.buildInfo = function() {
337
- const ret = wasm.buildInfo();
338
- return ret;
339
- };
340
-
341
- /**
342
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
343
- *
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}
350
- */
351
- module.exports.getReturnWitness = function(program, witness_map) {
352
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
353
- const len0 = WASM_VECTOR_LEN;
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]);
397
- }
398
- return takeFromExternrefTable0(ret[0]);
399
- };
400
-
401
332
  /**
402
333
  * Performs a bitwise AND operation between `lhs` and `rhs`
403
334
  * @param {string} lhs
@@ -527,16 +458,85 @@ module.exports.initLogLevel = function(filter) {
527
458
  }
528
459
  };
529
460
 
461
+ /**
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.
464
+ */
465
+ module.exports.buildInfo = function() {
466
+ const ret = wasm.buildInfo();
467
+ return ret;
468
+ };
469
+
470
+ /**
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.
512
+ *
513
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
514
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
515
+ * @returns {WitnessMap} A witness map containing the circuit's public inputs.
516
+ * @param {Uint8Array} program
517
+ * @param {WitnessMap} solved_witness
518
+ * @returns {WitnessMap}
519
+ */
520
+ module.exports.getPublicWitness = function(program, solved_witness) {
521
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
522
+ const len0 = WASM_VECTOR_LEN;
523
+ const ret = wasm.getPublicWitness(ptr0, len0, solved_witness);
524
+ if (ret[2]) {
525
+ throw takeFromExternrefTable0(ret[1]);
526
+ }
527
+ return takeFromExternrefTable0(ret[0]);
528
+ };
529
+
530
530
  function __wbg_adapter_30(arg0, arg1, arg2) {
531
- wasm.closure577_externref_shim(arg0, arg1, arg2);
531
+ wasm.closure576_externref_shim(arg0, arg1, arg2);
532
532
  }
533
533
 
534
534
  function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
535
- wasm.closure1172_externref_shim(arg0, arg1, arg2, arg3, arg4);
535
+ wasm.closure1171_externref_shim(arg0, arg1, arg2, arg3, arg4);
536
536
  }
537
537
 
538
538
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
539
- wasm.closure1176_externref_shim(arg0, arg1, arg2, arg3);
539
+ wasm.closure1175_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_wrapper1979 = function(arg0, arg1, arg2) {
818
- const ret = makeMutClosure(arg0, arg1, 578, __wbg_adapter_30);
817
+ module.exports.__wbindgen_closure_wrapper1982 = function(arg0, arg1, arg2) {
818
+ const ret = makeMutClosure(arg0, arg1, 577, __wbg_adapter_30);
819
819
  return ret;
820
820
  };
821
821
 
Binary file
@@ -8,10 +8,6 @@ export const decompressWitnessStack: (a: number, b: number) => [number, number,
8
8
  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
- export const buildInfo: () => any;
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];
15
11
  export const and: (a: any, b: any) => any;
16
12
  export const xor: (a: any, b: any) => any;
17
13
  export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
@@ -19,6 +15,10 @@ export const blake2s256: (a: number, b: number) => [number, number];
19
15
  export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
20
16
  export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
21
17
  export const initLogLevel: (a: number, b: number) => [number, number];
18
+ export const buildInfo: () => any;
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];
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 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;
30
+ export const closure576_externref_shim: (a: number, b: number, c: any) => void;
31
+ export const closure1171_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
+ export const closure1175_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": "@noir-lang/acvm_js",
3
- "version": "1.0.0-beta.15-d2c71c4.nightly",
3
+ "version": "1.0.0-beta.15-155db34.nightly",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/web/acvm_js.d.ts CHANGED
@@ -57,35 +57,6 @@ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_wit
57
57
  * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
58
58
  */
59
59
  export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
60
- /**
61
- * Returns the `BuildInfo` object containing information about how the installed package was built.
62
- * @returns {BuildInfo} - Information on how the installed package was built.
63
- */
64
- export function buildInfo(): BuildInfo;
65
- /**
66
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
67
- *
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.
71
- */
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;
89
60
  /**
90
61
  * Performs a bitwise AND operation between `lhs` and `rhs`
91
62
  */
@@ -116,6 +87,58 @@ export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_byte
116
87
  * @param {LogLevel} level - The maximum level of logging to be emitted.
117
88
  */
118
89
  export function initLogLevel(filter: string): void;
90
+ /**
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.
93
+ */
94
+ export function buildInfo(): BuildInfo;
95
+ /**
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.
113
+ *
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
+ export type StackItem = {
121
+ index: number;
122
+ witness: WitnessMap;
123
+ }
124
+
125
+ export type WitnessStack = Array<StackItem>;
126
+
127
+
128
+
129
+ export type ForeignCallInput = string[]
130
+ export type ForeignCallOutput = string | string[]
131
+
132
+ /**
133
+ * A callback which performs an foreign call and returns the response.
134
+ * @callback ForeignCallHandler
135
+ * @param {string} name - The identifier for the type of foreign call being performed.
136
+ * @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
137
+ * @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
138
+ */
139
+ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
140
+
141
+
119
142
 
120
143
  /**
121
144
  * @typedef {Object} BuildInfo - Information about how the installed package was built
@@ -160,29 +183,6 @@ export type SolvedAndReturnWitness = {
160
183
 
161
184
 
162
185
 
163
- export type ForeignCallInput = string[]
164
- export type ForeignCallOutput = string | string[]
165
-
166
- /**
167
- * A callback which performs an foreign call and returns the response.
168
- * @callback ForeignCallHandler
169
- * @param {string} name - The identifier for the type of foreign call being performed.
170
- * @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
171
- * @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
172
- */
173
- export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
174
-
175
-
176
-
177
- export type StackItem = {
178
- index: number;
179
- witness: WitnessMap;
180
- }
181
-
182
- export type WitnessStack = Array<StackItem>;
183
-
184
-
185
-
186
186
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
187
187
 
188
188
  export interface InitOutput {
@@ -194,10 +194,6 @@ export interface InitOutput {
194
194
  readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
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
- readonly buildInfo: () => any;
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];
201
197
  readonly and: (a: any, b: any) => any;
202
198
  readonly xor: (a: any, b: any) => any;
203
199
  readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
@@ -205,6 +201,10 @@ export interface InitOutput {
205
201
  readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
206
202
  readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
207
203
  readonly initLogLevel: (a: number, b: number) => [number, number];
204
+ readonly buildInfo: () => any;
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];
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 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;
216
+ readonly closure576_externref_shim: (a: number, b: number, c: any) => void;
217
+ readonly closure1171_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
218
+ readonly closure1175_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
@@ -325,75 +325,6 @@ export function executeProgram(program, initial_witness, foreign_call_handler) {
325
325
  return ret;
326
326
  }
327
327
 
328
- /**
329
- * Returns the `BuildInfo` object containing information about how the installed package was built.
330
- * @returns {BuildInfo} - Information on how the installed package was built.
331
- */
332
- export function buildInfo() {
333
- const ret = wasm.buildInfo();
334
- return ret;
335
- }
336
-
337
- /**
338
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
339
- *
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}
346
- */
347
- export function getReturnWitness(program, witness_map) {
348
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
349
- const len0 = WASM_VECTOR_LEN;
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]);
393
- }
394
- return takeFromExternrefTable0(ret[0]);
395
- }
396
-
397
328
  /**
398
329
  * Performs a bitwise AND operation between `lhs` and `rhs`
399
330
  * @param {string} lhs
@@ -523,16 +454,85 @@ export function initLogLevel(filter) {
523
454
  }
524
455
  }
525
456
 
457
+ /**
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.
460
+ */
461
+ export function buildInfo() {
462
+ const ret = wasm.buildInfo();
463
+ return ret;
464
+ }
465
+
466
+ /**
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.
508
+ *
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
+ */
516
+ export function getPublicWitness(program, solved_witness) {
517
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
518
+ const len0 = WASM_VECTOR_LEN;
519
+ const ret = wasm.getPublicWitness(ptr0, len0, solved_witness);
520
+ if (ret[2]) {
521
+ throw takeFromExternrefTable0(ret[1]);
522
+ }
523
+ return takeFromExternrefTable0(ret[0]);
524
+ }
525
+
526
526
  function __wbg_adapter_30(arg0, arg1, arg2) {
527
- wasm.closure577_externref_shim(arg0, arg1, arg2);
527
+ wasm.closure576_externref_shim(arg0, arg1, arg2);
528
528
  }
529
529
 
530
530
  function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
531
- wasm.closure1172_externref_shim(arg0, arg1, arg2, arg3, arg4);
531
+ wasm.closure1171_externref_shim(arg0, arg1, arg2, arg3, arg4);
532
532
  }
533
533
 
534
534
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
535
- wasm.closure1176_externref_shim(arg0, arg1, arg2, arg3);
535
+ wasm.closure1175_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_wrapper1979 = function(arg0, arg1, arg2) {
802
- const ret = makeMutClosure(arg0, arg1, 578, __wbg_adapter_30);
801
+ imports.wbg.__wbindgen_closure_wrapper1982 = function(arg0, arg1, arg2) {
802
+ const ret = makeMutClosure(arg0, arg1, 577, __wbg_adapter_30);
803
803
  return ret;
804
804
  };
805
805
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -8,10 +8,6 @@ export const decompressWitnessStack: (a: number, b: number) => [number, number,
8
8
  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
- export const buildInfo: () => any;
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];
15
11
  export const and: (a: any, b: any) => any;
16
12
  export const xor: (a: any, b: any) => any;
17
13
  export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
@@ -19,6 +15,10 @@ export const blake2s256: (a: number, b: number) => [number, number];
19
15
  export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
20
16
  export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
21
17
  export const initLogLevel: (a: number, b: number) => [number, number];
18
+ export const buildInfo: () => any;
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];
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 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;
30
+ export const closure576_externref_shim: (a: number, b: number, c: any) => void;
31
+ export const closure1171_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
+ export const closure1175_externref_shim: (a: number, b: number, c: any, d: any) => void;
33
33
  export const __wbindgen_start: () => void;