@noir-lang/acvm_js 0.53.0 → 0.54.0-aa37cd5.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.
@@ -1,30 +1,30 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export function initLogLevel(a: number, b: number, c: number): void;
5
- export function getReturnWitness(a: number, b: number, c: number, d: number): void;
6
- export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
7
- export function getPublicWitness(a: number, b: number, c: number, d: number): void;
4
+ export function compressWitness(a: number, b: number): void;
5
+ export function decompressWitness(a: number, b: number, c: number): void;
6
+ export function compressWitnessStack(a: number, b: number): void;
7
+ export function decompressWitnessStack(a: number, b: number, c: number): void;
8
+ export function buildInfo(): number;
8
9
  export function and(a: number, b: number): number;
9
10
  export function xor(a: number, b: number): number;
10
11
  export function sha256_compression(a: number, b: number, c: number, d: number, e: number): void;
11
12
  export function blake2s256(a: number, b: number, c: number): void;
12
13
  export function ecdsa_secp256k1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
13
14
  export function ecdsa_secp256r1_verify(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number;
14
- export function buildInfo(): number;
15
- export function compressWitness(a: number, b: number): void;
16
- export function decompressWitness(a: number, b: number, c: number): void;
17
- export function compressWitnessStack(a: number, b: number): void;
18
- export function decompressWitnessStack(a: number, b: number, c: number): void;
15
+ export function initLogLevel(a: number, b: number, c: number): void;
16
+ export function getReturnWitness(a: number, b: number, c: number, d: number): void;
17
+ export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
18
+ export function getPublicWitness(a: number, b: number, c: number, d: number): void;
19
19
  export function executeCircuit(a: number, b: number, c: number, d: number): number;
20
20
  export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
21
21
  export function executeProgram(a: number, b: number, c: number, d: number): number;
22
22
  export function __wbindgen_malloc(a: number): number;
23
23
  export function __wbindgen_realloc(a: number, b: number, c: number): number;
24
24
  export const __wbindgen_export_2: WebAssembly.Table;
25
- export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h21c8ca3eb6ab9385(a: number, b: number, c: number): void;
25
+ export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h624a3dfbf78ca22a(a: number, b: number, c: number): void;
26
26
  export function __wbindgen_add_to_stack_pointer(a: number): number;
27
27
  export function __wbindgen_free(a: number, b: number): void;
28
- export function wasm_bindgen__convert__closures__invoke3_mut__h17fc532521b46256(a: number, b: number, c: number, d: number, e: number): void;
28
+ export function wasm_bindgen__convert__closures__invoke3_mut__h45040feada3ebb25(a: number, b: number, c: number, d: number, e: number): void;
29
29
  export function __wbindgen_exn_store(a: number): void;
30
- export function wasm_bindgen__convert__closures__invoke2_mut__h0d187b0f08495587(a: number, b: number, c: number, d: number): void;
30
+ export function wasm_bindgen__convert__closures__invoke2_mut__h3f07259b3eb55784(a: number, b: number, c: number, d: number): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noir-lang/acvm_js",
3
- "version": "0.53.0",
3
+ "version": "0.54.0-aa37cd5.nightly",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/web/acvm_js.d.ts CHANGED
@@ -1,44 +1,39 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Sets the package's logging level.
4
+ * Compresses a `WitnessMap` into the binary format outputted by Nargo.
5
5
  *
6
- * @param {LogLevel} level - The maximum level of logging to be emitted.
6
+ * @param {WitnessMap} witness_map - A witness map.
7
+ * @returns {Uint8Array} A compressed witness map
7
8
  */
8
- export function initLogLevel(filter: string): void;
9
+ export function compressWitness(witness_map: WitnessMap): Uint8Array;
9
10
  /**
10
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
11
+ * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
12
+ * This should be used to only fetch the witness map for the main function.
11
13
  *
12
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
13
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
14
- * @returns {WitnessMap} A witness map containing the circuit's return values.
15
- * @param {Uint8Array} program
16
- * @param {WitnessMap} witness_map
17
- * @returns {WitnessMap}
14
+ * @param {Uint8Array} compressed_witness - A compressed witness.
15
+ * @returns {WitnessMap} The decompressed witness map.
18
16
  */
19
- export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
17
+ export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
20
18
  /**
21
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
19
+ * Compresses a `WitnessStack` into the binary format outputted by Nargo.
22
20
  *
23
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
24
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
25
- * @returns {WitnessMap} A witness map containing the circuit's public parameters.
26
- * @param {Uint8Array} program
27
- * @param {WitnessMap} solved_witness
28
- * @returns {WitnessMap}
21
+ * @param {WitnessStack} witness_stack - A witness stack.
22
+ * @returns {Uint8Array} A compressed witness stack
29
23
  */
30
- export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
24
+ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
31
25
  /**
32
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
26
+ * Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
33
27
  *
34
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
35
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
36
- * @returns {WitnessMap} A witness map containing the circuit's public inputs.
37
- * @param {Uint8Array} program
38
- * @param {WitnessMap} solved_witness
39
- * @returns {WitnessMap}
28
+ * @param {Uint8Array} compressed_witness - A compressed witness.
29
+ * @returns {WitnessStack} The decompressed witness stack.
40
30
  */
41
- export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
31
+ export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
32
+ /**
33
+ * Returns the `BuildInfo` object containing information about how the installed package was built.
34
+ * @returns {BuildInfo} - Information on how the installed package was built.
35
+ */
36
+ export function buildInfo(): BuildInfo;
42
37
  /**
43
38
  * Performs a bitwise AND operation between `lhs` and `rhs`
44
39
  * @param {string} lhs
@@ -85,39 +80,44 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
85
80
  */
86
81
  export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
87
82
  /**
88
- * Returns the `BuildInfo` object containing information about how the installed package was built.
89
- * @returns {BuildInfo} - Information on how the installed package was built.
90
- */
91
- export function buildInfo(): BuildInfo;
92
- /**
93
- * Compresses a `WitnessMap` into the binary format outputted by Nargo.
83
+ * Sets the package's logging level.
94
84
  *
95
- * @param {WitnessMap} witness_map - A witness map.
96
- * @returns {Uint8Array} A compressed witness map
85
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
97
86
  */
98
- export function compressWitness(witness_map: WitnessMap): Uint8Array;
87
+ export function initLogLevel(filter: string): void;
99
88
  /**
100
- * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
101
- * This should be used to only fetch the witness map for the main function.
89
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
102
90
  *
103
- * @param {Uint8Array} compressed_witness - A compressed witness.
104
- * @returns {WitnessMap} The decompressed witness map.
91
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
92
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
93
+ * @returns {WitnessMap} A witness map containing the circuit's return values.
94
+ * @param {Uint8Array} program
95
+ * @param {WitnessMap} witness_map
96
+ * @returns {WitnessMap}
105
97
  */
106
- export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
98
+ export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
107
99
  /**
108
- * Compresses a `WitnessStack` into the binary format outputted by Nargo.
100
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
109
101
  *
110
- * @param {WitnessStack} witness_stack - A witness stack.
111
- * @returns {Uint8Array} A compressed witness stack
102
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
103
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
104
+ * @returns {WitnessMap} A witness map containing the circuit's public parameters.
105
+ * @param {Uint8Array} program
106
+ * @param {WitnessMap} solved_witness
107
+ * @returns {WitnessMap}
112
108
  */
113
- export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
109
+ export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
114
110
  /**
115
- * Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
111
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
116
112
  *
117
- * @param {Uint8Array} compressed_witness - A compressed witness.
118
- * @returns {WitnessStack} The decompressed witness stack.
113
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
114
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
115
+ * @returns {WitnessMap} A witness map containing the circuit's public inputs.
116
+ * @param {Uint8Array} program
117
+ * @param {WitnessMap} solved_witness
118
+ * @returns {WitnessMap}
119
119
  */
120
- export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
120
+ export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
121
121
  /**
122
122
  * Executes an ACIR circuit to generate the solved witness from the initial witness.
123
123
  *
@@ -147,28 +147,6 @@ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_wit
147
147
  */
148
148
  export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
149
149
 
150
- export type RawAssertionPayload = {
151
- selector: string;
152
- data: string[];
153
- };
154
-
155
- export type ExecutionError = Error & {
156
- callStack?: string[];
157
- rawAssertionPayload?: RawAssertionPayload;
158
- brilligFunctionId?: number;
159
- };
160
-
161
-
162
-
163
- export type StackItem = {
164
- index: number;
165
- witness: WitnessMap;
166
- }
167
-
168
- export type WitnessStack = Array<StackItem>;
169
-
170
-
171
-
172
150
  /**
173
151
  * @typedef {Object} BuildInfo - Information about how the installed package was built
174
152
  * @property {string} gitHash - The hash of the git commit from which the package was built.
@@ -197,6 +175,28 @@ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => P
197
175
 
198
176
 
199
177
 
178
+ export type RawAssertionPayload = {
179
+ selector: string;
180
+ data: string[];
181
+ };
182
+
183
+ export type ExecutionError = Error & {
184
+ callStack?: string[];
185
+ rawAssertionPayload?: RawAssertionPayload;
186
+ brilligFunctionId?: number;
187
+ };
188
+
189
+
190
+
191
+ export type StackItem = {
192
+ index: number;
193
+ witness: WitnessMap;
194
+ }
195
+
196
+ export type WitnessStack = Array<StackItem>;
197
+
198
+
199
+
200
200
  // Map from witness index to hex string value of witness.
201
201
  export type WitnessMap = Map<number, string>;
202
202
 
@@ -216,33 +216,33 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
216
216
 
217
217
  export interface InitOutput {
218
218
  readonly memory: WebAssembly.Memory;
219
- readonly initLogLevel: (a: number, b: number, c: number) => void;
220
- readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void;
221
- readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void;
222
- readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void;
219
+ readonly compressWitness: (a: number, b: number) => void;
220
+ readonly decompressWitness: (a: number, b: number, c: number) => void;
221
+ readonly compressWitnessStack: (a: number, b: number) => void;
222
+ readonly decompressWitnessStack: (a: number, b: number, c: number) => void;
223
+ readonly buildInfo: () => number;
223
224
  readonly and: (a: number, b: number) => number;
224
225
  readonly xor: (a: number, b: number) => number;
225
226
  readonly sha256_compression: (a: number, b: number, c: number, d: number, e: number) => void;
226
227
  readonly blake2s256: (a: number, b: number, c: number) => void;
227
228
  readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
228
229
  readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
229
- readonly buildInfo: () => number;
230
- readonly compressWitness: (a: number, b: number) => void;
231
- readonly decompressWitness: (a: number, b: number, c: number) => void;
232
- readonly compressWitnessStack: (a: number, b: number) => void;
233
- readonly decompressWitnessStack: (a: number, b: number, c: number) => void;
230
+ readonly initLogLevel: (a: number, b: number, c: number) => void;
231
+ readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void;
232
+ readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void;
233
+ readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void;
234
234
  readonly executeCircuit: (a: number, b: number, c: number, d: number) => number;
235
235
  readonly executeCircuitWithReturnWitness: (a: number, b: number, c: number, d: number) => number;
236
236
  readonly executeProgram: (a: number, b: number, c: number, d: number) => number;
237
237
  readonly __wbindgen_malloc: (a: number) => number;
238
238
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
239
239
  readonly __wbindgen_export_2: WebAssembly.Table;
240
- readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h21c8ca3eb6ab9385: (a: number, b: number, c: number) => void;
240
+ readonly _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h624a3dfbf78ca22a: (a: number, b: number, c: number) => void;
241
241
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
242
242
  readonly __wbindgen_free: (a: number, b: number) => void;
243
- readonly wasm_bindgen__convert__closures__invoke3_mut__h17fc532521b46256: (a: number, b: number, c: number, d: number, e: number) => void;
243
+ readonly wasm_bindgen__convert__closures__invoke3_mut__h45040feada3ebb25: (a: number, b: number, c: number, d: number, e: number) => void;
244
244
  readonly __wbindgen_exn_store: (a: number) => void;
245
- readonly wasm_bindgen__convert__closures__invoke2_mut__h0d187b0f08495587: (a: number, b: number, c: number, d: number) => void;
245
+ readonly wasm_bindgen__convert__closures__invoke2_mut__h3f07259b3eb55784: (a: number, b: number, c: number, d: number) => void;
246
246
  }
247
247
 
248
248
  export type SyncInitInput = BufferSource | WebAssembly.Module;