@aztec/noir-acvm_js 4.0.0-nightly.20260119 → 4.0.0-nightly.20260120

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,40 +1,44 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Performs a bitwise AND operation between `lhs` and `rhs`
5
- */
6
- export function and(lhs: string, rhs: string): string;
7
- /**
8
- * Performs a bitwise XOR operation between `lhs` and `rhs`
9
- */
10
- export function xor(lhs: string, rhs: string): string;
11
- /**
12
- * Sha256 compression function
13
- */
14
- export function sha256_compression(inputs: Uint32Array, state: Uint32Array): Uint32Array;
15
- /**
16
- * Calculates the Blake2s256 hash of the input bytes
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.
17
6
  */
18
- export function blake2s256(inputs: Uint8Array): Uint8Array;
7
+ export function buildInfo(): BuildInfo;
19
8
  /**
20
- * Verifies a ECDSA signature over the secp256k1 curve.
9
+ * Sets the package's logging level.
10
+ *
11
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
21
12
  */
22
- export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
13
+ export function initLogLevel(filter: string): void;
23
14
  /**
24
- * Verifies a ECDSA signature over the secp256r1 curve.
15
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
16
+ *
17
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
18
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
19
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
20
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
25
21
  */
26
- export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
22
+ export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
27
23
  /**
28
- * Sets the package's logging level.
24
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
25
+ * This method also extracts the public return values from the solved witness into its own return witness.
29
26
  *
30
- * @param {LogLevel} level - The maximum level of logging to be emitted.
27
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
28
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
29
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
30
+ * @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.
31
31
  */
32
- export function initLogLevel(filter: string): void;
32
+ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
33
33
  /**
34
- * Returns the `BuildInfo` object containing information about how the installed package was built.
35
- * @returns {BuildInfo} - Information on how the installed package was built.
34
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
35
+ *
36
+ * @param {Uint8Array} program - A serialized representation of an ACIR program
37
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
38
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
39
+ * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
36
40
  */
37
- export function buildInfo(): BuildInfo;
41
+ export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
38
42
  /**
39
43
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
40
44
  *
@@ -89,33 +93,43 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
89
93
  */
90
94
  export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
91
95
  /**
92
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
93
- *
94
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
95
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
96
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
97
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
96
+ * Performs a bitwise AND operation between `lhs` and `rhs`
98
97
  */
99
- export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
98
+ export function and(lhs: string, rhs: string): string;
100
99
  /**
101
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
102
- * This method also extracts the public return values from the solved witness into its own return witness.
103
- *
104
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
105
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
106
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
107
- * @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.
100
+ * Performs a bitwise XOR operation between `lhs` and `rhs`
108
101
  */
109
- export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
102
+ export function xor(lhs: string, rhs: string): string;
110
103
  /**
111
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
112
- *
113
- * @param {Uint8Array} program - A serialized representation of an ACIR program
114
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
115
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
116
- * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
104
+ * Sha256 compression function
117
105
  */
118
- export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
106
+ export function sha256_compression(inputs: Uint32Array, state: Uint32Array): Uint32Array;
107
+ /**
108
+ * Calculates the Blake2s256 hash of the input bytes
109
+ */
110
+ export function blake2s256(inputs: Uint8Array): Uint8Array;
111
+ /**
112
+ * Verifies a ECDSA signature over the secp256k1 curve.
113
+ */
114
+ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
115
+ /**
116
+ * Verifies a ECDSA signature over the secp256r1 curve.
117
+ */
118
+ export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
119
+
120
+ /**
121
+ * @typedef {Object} BuildInfo - Information about how the installed package was built
122
+ * @property {string} gitHash - The hash of the git commit from which the package was built.
123
+ * @property {string} version - The version of the package at the built git commit.
124
+ * @property {boolean} dirty - Whether the package contained uncommitted changes when built.
125
+ */
126
+ export type BuildInfo = {
127
+ gitHash: string;
128
+ version: string;
129
+ dirty: string;
130
+ }
131
+
132
+
119
133
 
120
134
  export type RawAssertionPayload = {
121
135
  selector: string;
@@ -131,15 +145,6 @@ export type ExecutionError = Error & {
131
145
 
132
146
 
133
147
 
134
- export type StackItem = {
135
- index: number;
136
- witness: WitnessMap;
137
- }
138
-
139
- export type WitnessStack = Array<StackItem>;
140
-
141
-
142
-
143
148
  // Map from witness index to hex string value of witness.
144
149
  export type WitnessMap = Map<number, string>;
145
150
 
@@ -155,20 +160,6 @@ export type SolvedAndReturnWitness = {
155
160
 
156
161
 
157
162
 
158
- /**
159
- * @typedef {Object} BuildInfo - Information about how the installed package was built
160
- * @property {string} gitHash - The hash of the git commit from which the package was built.
161
- * @property {string} version - The version of the package at the built git commit.
162
- * @property {boolean} dirty - Whether the package contained uncommitted changes when built.
163
- */
164
- export type BuildInfo = {
165
- gitHash: string;
166
- version: string;
167
- dirty: string;
168
- }
169
-
170
-
171
-
172
163
  export type ForeignCallInput = string[]
173
164
  export type ForeignCallOutput = string | string[]
174
165
 
@@ -182,3 +173,12 @@ export type ForeignCallOutput = string | string[]
182
173
  export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
183
174
 
184
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
@@ -202,62 +202,31 @@ function debugString(val) {
202
202
  return className;
203
203
  }
204
204
  /**
205
- * Performs a bitwise AND operation between `lhs` and `rhs`
206
- * @param {string} lhs
207
- * @param {string} rhs
208
- * @returns {string}
209
- */
210
- module.exports.and = function(lhs, rhs) {
211
- const ret = wasm.and(lhs, rhs);
212
- return ret;
213
- };
214
-
215
- /**
216
- * Performs a bitwise XOR operation between `lhs` and `rhs`
217
- * @param {string} lhs
218
- * @param {string} rhs
219
- * @returns {string}
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.
220
207
  */
221
- module.exports.xor = function(lhs, rhs) {
222
- const ret = wasm.xor(lhs, rhs);
208
+ module.exports.buildInfo = function() {
209
+ const ret = wasm.buildInfo();
223
210
  return ret;
224
211
  };
225
212
 
226
- let cachedUint32ArrayMemory0 = null;
227
-
228
- function getUint32ArrayMemory0() {
229
- if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
230
- cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
231
- }
232
- return cachedUint32ArrayMemory0;
233
- }
234
-
235
- function passArray32ToWasm0(arg, malloc) {
236
- const ptr = malloc(arg.length * 4, 4) >>> 0;
237
- getUint32ArrayMemory0().set(arg, ptr / 4);
238
- WASM_VECTOR_LEN = arg.length;
239
- return ptr;
240
- }
241
-
242
- function getArrayU32FromWasm0(ptr, len) {
243
- ptr = ptr >>> 0;
244
- return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
213
+ function takeFromExternrefTable0(idx) {
214
+ const value = wasm.__wbindgen_export_2.get(idx);
215
+ wasm.__externref_table_dealloc(idx);
216
+ return value;
245
217
  }
246
218
  /**
247
- * Sha256 compression function
248
- * @param {Uint32Array} inputs
249
- * @param {Uint32Array} state
250
- * @returns {Uint32Array}
219
+ * Sets the package's logging level.
220
+ *
221
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
251
222
  */
252
- module.exports.sha256_compression = function(inputs, state) {
253
- const ptr0 = passArray32ToWasm0(inputs, wasm.__wbindgen_malloc);
223
+ module.exports.initLogLevel = function(filter) {
224
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
254
225
  const len0 = WASM_VECTOR_LEN;
255
- const ptr1 = passArray32ToWasm0(state, wasm.__wbindgen_malloc);
256
- const len1 = WASM_VECTOR_LEN;
257
- const ret = wasm.sha256_compression(ptr0, len0, ptr1, len1);
258
- var v3 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
259
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
260
- return v3;
226
+ const ret = wasm.initLogLevel(ptr0, len0);
227
+ if (ret[1]) {
228
+ throw takeFromExternrefTable0(ret[0]);
229
+ }
261
230
  };
262
231
 
263
232
  function passArray8ToWasm0(arg, malloc) {
@@ -266,92 +235,49 @@ function passArray8ToWasm0(arg, malloc) {
266
235
  WASM_VECTOR_LEN = arg.length;
267
236
  return ptr;
268
237
  }
269
-
270
- function getArrayU8FromWasm0(ptr, len) {
271
- ptr = ptr >>> 0;
272
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
273
- }
274
238
  /**
275
- * Calculates the Blake2s256 hash of the input bytes
276
- * @param {Uint8Array} inputs
277
- * @returns {Uint8Array}
278
- */
279
- module.exports.blake2s256 = function(inputs) {
280
- const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
281
- const len0 = WASM_VECTOR_LEN;
282
- const ret = wasm.blake2s256(ptr0, len0);
283
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
284
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
285
- return v2;
286
- };
287
-
288
- /**
289
- * Verifies a ECDSA signature over the secp256k1 curve.
290
- * @param {Uint8Array} hashed_msg
291
- * @param {Uint8Array} public_key_x_bytes
292
- * @param {Uint8Array} public_key_y_bytes
293
- * @param {Uint8Array} signature
294
- * @returns {boolean}
239
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
240
+ *
241
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
242
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
243
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
244
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
295
245
  */
296
- module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
297
- const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
246
+ module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
247
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
298
248
  const len0 = WASM_VECTOR_LEN;
299
- const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
300
- const len1 = WASM_VECTOR_LEN;
301
- const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
302
- const len2 = WASM_VECTOR_LEN;
303
- const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
304
- const len3 = WASM_VECTOR_LEN;
305
- const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
306
- return ret !== 0;
249
+ const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
250
+ return ret;
307
251
  };
308
252
 
309
253
  /**
310
- * Verifies a ECDSA signature over the secp256r1 curve.
311
- * @param {Uint8Array} hashed_msg
312
- * @param {Uint8Array} public_key_x_bytes
313
- * @param {Uint8Array} public_key_y_bytes
314
- * @param {Uint8Array} signature
315
- * @returns {boolean}
254
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
255
+ * This method also extracts the public return values from the solved witness into its own return witness.
256
+ *
257
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
258
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
259
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
260
+ * @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.
316
261
  */
317
- module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
318
- const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
262
+ module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
263
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
319
264
  const len0 = WASM_VECTOR_LEN;
320
- const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
321
- const len1 = WASM_VECTOR_LEN;
322
- const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
323
- const len2 = WASM_VECTOR_LEN;
324
- const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
325
- const len3 = WASM_VECTOR_LEN;
326
- const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
327
- return ret !== 0;
265
+ const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
266
+ return ret;
328
267
  };
329
268
 
330
- function takeFromExternrefTable0(idx) {
331
- const value = wasm.__wbindgen_export_2.get(idx);
332
- wasm.__externref_table_dealloc(idx);
333
- return value;
334
- }
335
269
  /**
336
- * Sets the package's logging level.
270
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
337
271
  *
338
- * @param {LogLevel} level - The maximum level of logging to be emitted.
272
+ * @param {Uint8Array} program - A serialized representation of an ACIR program
273
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
274
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
275
+ * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
339
276
  */
340
- module.exports.initLogLevel = function(filter) {
341
- const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
277
+ module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
278
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
342
279
  const len0 = WASM_VECTOR_LEN;
343
- const ret = wasm.initLogLevel(ptr0, len0);
344
- if (ret[1]) {
345
- throw takeFromExternrefTable0(ret[0]);
346
- }
347
- };
348
-
349
- /**
350
- * Returns the `BuildInfo` object containing information about how the installed package was built.
351
- * @returns {BuildInfo} - Information on how the installed package was built.
352
- */
353
- module.exports.buildInfo = function() {
354
- const ret = wasm.buildInfo();
280
+ const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
355
281
  return ret;
356
282
  };
357
283
 
@@ -415,6 +341,10 @@ module.exports.getPublicWitness = function(program, solved_witness) {
415
341
  return takeFromExternrefTable0(ret[0]);
416
342
  };
417
343
 
344
+ function getArrayU8FromWasm0(ptr, len) {
345
+ ptr = ptr >>> 0;
346
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
347
+ }
418
348
  /**
419
349
  * Compresses a `WitnessMap` into the binary format outputted by Nargo.
420
350
  *
@@ -481,61 +411,130 @@ module.exports.decompressWitnessStack = function(compressed_witness) {
481
411
  };
482
412
 
483
413
  /**
484
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
485
- *
486
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
487
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
488
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
489
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
414
+ * Performs a bitwise AND operation between `lhs` and `rhs`
415
+ * @param {string} lhs
416
+ * @param {string} rhs
417
+ * @returns {string}
490
418
  */
491
- module.exports.executeCircuit = function(program, initial_witness, foreign_call_handler) {
492
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
493
- const len0 = WASM_VECTOR_LEN;
494
- const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
419
+ module.exports.and = function(lhs, rhs) {
420
+ const ret = wasm.and(lhs, rhs);
495
421
  return ret;
496
422
  };
497
423
 
498
424
  /**
499
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
500
- * This method also extracts the public return values from the solved witness into its own return witness.
501
- *
502
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
503
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
504
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
505
- * @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.
425
+ * Performs a bitwise XOR operation between `lhs` and `rhs`
426
+ * @param {string} lhs
427
+ * @param {string} rhs
428
+ * @returns {string}
506
429
  */
507
- module.exports.executeCircuitWithReturnWitness = function(program, initial_witness, foreign_call_handler) {
508
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
509
- const len0 = WASM_VECTOR_LEN;
510
- const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
430
+ module.exports.xor = function(lhs, rhs) {
431
+ const ret = wasm.xor(lhs, rhs);
511
432
  return ret;
512
433
  };
513
434
 
435
+ let cachedUint32ArrayMemory0 = null;
436
+
437
+ function getUint32ArrayMemory0() {
438
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
439
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
440
+ }
441
+ return cachedUint32ArrayMemory0;
442
+ }
443
+
444
+ function passArray32ToWasm0(arg, malloc) {
445
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
446
+ getUint32ArrayMemory0().set(arg, ptr / 4);
447
+ WASM_VECTOR_LEN = arg.length;
448
+ return ptr;
449
+ }
450
+
451
+ function getArrayU32FromWasm0(ptr, len) {
452
+ ptr = ptr >>> 0;
453
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
454
+ }
514
455
  /**
515
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
516
- *
517
- * @param {Uint8Array} program - A serialized representation of an ACIR program
518
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
519
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
520
- * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
456
+ * Sha256 compression function
457
+ * @param {Uint32Array} inputs
458
+ * @param {Uint32Array} state
459
+ * @returns {Uint32Array}
521
460
  */
522
- module.exports.executeProgram = function(program, initial_witness, foreign_call_handler) {
523
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
461
+ module.exports.sha256_compression = function(inputs, state) {
462
+ const ptr0 = passArray32ToWasm0(inputs, wasm.__wbindgen_malloc);
524
463
  const len0 = WASM_VECTOR_LEN;
525
- const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
526
- return ret;
464
+ const ptr1 = passArray32ToWasm0(state, wasm.__wbindgen_malloc);
465
+ const len1 = WASM_VECTOR_LEN;
466
+ const ret = wasm.sha256_compression(ptr0, len0, ptr1, len1);
467
+ var v3 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
468
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
469
+ return v3;
470
+ };
471
+
472
+ /**
473
+ * Calculates the Blake2s256 hash of the input bytes
474
+ * @param {Uint8Array} inputs
475
+ * @returns {Uint8Array}
476
+ */
477
+ module.exports.blake2s256 = function(inputs) {
478
+ const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
479
+ const len0 = WASM_VECTOR_LEN;
480
+ const ret = wasm.blake2s256(ptr0, len0);
481
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
482
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
483
+ return v2;
484
+ };
485
+
486
+ /**
487
+ * Verifies a ECDSA signature over the secp256k1 curve.
488
+ * @param {Uint8Array} hashed_msg
489
+ * @param {Uint8Array} public_key_x_bytes
490
+ * @param {Uint8Array} public_key_y_bytes
491
+ * @param {Uint8Array} signature
492
+ * @returns {boolean}
493
+ */
494
+ module.exports.ecdsa_secp256k1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
495
+ const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
496
+ const len0 = WASM_VECTOR_LEN;
497
+ const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
498
+ const len1 = WASM_VECTOR_LEN;
499
+ const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
500
+ const len2 = WASM_VECTOR_LEN;
501
+ const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
502
+ const len3 = WASM_VECTOR_LEN;
503
+ const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
504
+ return ret !== 0;
505
+ };
506
+
507
+ /**
508
+ * Verifies a ECDSA signature over the secp256r1 curve.
509
+ * @param {Uint8Array} hashed_msg
510
+ * @param {Uint8Array} public_key_x_bytes
511
+ * @param {Uint8Array} public_key_y_bytes
512
+ * @param {Uint8Array} signature
513
+ * @returns {boolean}
514
+ */
515
+ module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
516
+ const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
517
+ const len0 = WASM_VECTOR_LEN;
518
+ const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
519
+ const len1 = WASM_VECTOR_LEN;
520
+ const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
521
+ const len2 = WASM_VECTOR_LEN;
522
+ const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
523
+ const len3 = WASM_VECTOR_LEN;
524
+ const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
525
+ return ret !== 0;
527
526
  };
528
527
 
529
528
  function __wbg_adapter_30(arg0, arg1, arg2) {
530
- wasm.closure441_externref_shim(arg0, arg1, arg2);
529
+ wasm.closure447_externref_shim(arg0, arg1, arg2);
531
530
  }
532
531
 
533
532
  function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
534
- wasm.closure925_externref_shim(arg0, arg1, arg2, arg3, arg4);
533
+ wasm.closure932_externref_shim(arg0, arg1, arg2, arg3, arg4);
535
534
  }
536
535
 
537
536
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
538
- wasm.closure929_externref_shim(arg0, arg1, arg2, arg3);
537
+ wasm.closure936_externref_shim(arg0, arg1, arg2, arg3);
539
538
  }
540
539
 
541
540
  module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
@@ -813,8 +812,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
813
812
  return ret;
814
813
  };
815
814
 
816
- module.exports.__wbindgen_closure_wrapper1431 = function(arg0, arg1, arg2) {
817
- const ret = makeMutClosure(arg0, arg1, 442, __wbg_adapter_30);
815
+ module.exports.__wbindgen_closure_wrapper1447 = function(arg0, arg1, arg2) {
816
+ const ret = makeMutClosure(arg0, arg1, 448, __wbg_adapter_30);
818
817
  return ret;
819
818
  };
820
819
 
Binary file
@@ -1,14 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const and: (a: any, b: any) => any;
5
- export const xor: (a: any, b: any) => any;
6
- export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
7
- export const blake2s256: (a: number, b: number) => [number, number];
8
- export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
9
- export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
10
- export const initLogLevel: (a: number, b: number) => [number, number];
11
4
  export const buildInfo: () => any;
5
+ export const initLogLevel: (a: number, b: number) => [number, number];
6
+ export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
7
+ export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
8
+ export const executeProgram: (a: number, b: number, c: any, d: any) => any;
12
9
  export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
13
10
  export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
14
11
  export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
@@ -16,9 +13,12 @@ export const compressWitness: (a: any) => [number, number, number, number];
16
13
  export const decompressWitness: (a: number, b: number) => [number, number, number];
17
14
  export const compressWitnessStack: (a: any) => [number, number, number, number];
18
15
  export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
19
- export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
20
- export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
21
- export const executeProgram: (a: number, b: number, c: any, d: any) => any;
16
+ export const and: (a: any, b: any) => any;
17
+ export const xor: (a: any, b: any) => any;
18
+ export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
19
+ export const blake2s256: (a: number, b: number) => [number, number];
20
+ export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
21
+ export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: 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 closure441_externref_shim: (a: number, b: number, c: any) => void;
31
- export const closure925_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
- export const closure929_externref_shim: (a: number, b: number, c: any, d: any) => void;
30
+ export const closure447_externref_shim: (a: number, b: number, c: any) => void;
31
+ export const closure932_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
+ export const closure936_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": "4.0.0-nightly.20260119",
3
+ "version": "4.0.0-nightly.20260120",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/web/acvm_js.d.ts CHANGED
@@ -1,40 +1,44 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Performs a bitwise AND operation between `lhs` and `rhs`
5
- */
6
- export function and(lhs: string, rhs: string): string;
7
- /**
8
- * Performs a bitwise XOR operation between `lhs` and `rhs`
9
- */
10
- export function xor(lhs: string, rhs: string): string;
11
- /**
12
- * Sha256 compression function
13
- */
14
- export function sha256_compression(inputs: Uint32Array, state: Uint32Array): Uint32Array;
15
- /**
16
- * Calculates the Blake2s256 hash of the input bytes
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.
17
6
  */
18
- export function blake2s256(inputs: Uint8Array): Uint8Array;
7
+ export function buildInfo(): BuildInfo;
19
8
  /**
20
- * Verifies a ECDSA signature over the secp256k1 curve.
9
+ * Sets the package's logging level.
10
+ *
11
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
21
12
  */
22
- export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
13
+ export function initLogLevel(filter: string): void;
23
14
  /**
24
- * Verifies a ECDSA signature over the secp256r1 curve.
15
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
16
+ *
17
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
18
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
19
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
20
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
25
21
  */
26
- export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
22
+ export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
27
23
  /**
28
- * Sets the package's logging level.
24
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
25
+ * This method also extracts the public return values from the solved witness into its own return witness.
29
26
  *
30
- * @param {LogLevel} level - The maximum level of logging to be emitted.
27
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
28
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
29
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
30
+ * @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.
31
31
  */
32
- export function initLogLevel(filter: string): void;
32
+ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
33
33
  /**
34
- * Returns the `BuildInfo` object containing information about how the installed package was built.
35
- * @returns {BuildInfo} - Information on how the installed package was built.
34
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
35
+ *
36
+ * @param {Uint8Array} program - A serialized representation of an ACIR program
37
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
38
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
39
+ * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
36
40
  */
37
- export function buildInfo(): BuildInfo;
41
+ export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
38
42
  /**
39
43
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
40
44
  *
@@ -89,33 +93,43 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
89
93
  */
90
94
  export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
91
95
  /**
92
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
93
- *
94
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
95
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
96
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
97
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
96
+ * Performs a bitwise AND operation between `lhs` and `rhs`
98
97
  */
99
- export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
98
+ export function and(lhs: string, rhs: string): string;
100
99
  /**
101
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
102
- * This method also extracts the public return values from the solved witness into its own return witness.
103
- *
104
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
105
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
106
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
107
- * @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.
100
+ * Performs a bitwise XOR operation between `lhs` and `rhs`
108
101
  */
109
- export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
102
+ export function xor(lhs: string, rhs: string): string;
110
103
  /**
111
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
112
- *
113
- * @param {Uint8Array} program - A serialized representation of an ACIR program
114
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
115
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
116
- * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
104
+ * Sha256 compression function
117
105
  */
118
- export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
106
+ export function sha256_compression(inputs: Uint32Array, state: Uint32Array): Uint32Array;
107
+ /**
108
+ * Calculates the Blake2s256 hash of the input bytes
109
+ */
110
+ export function blake2s256(inputs: Uint8Array): Uint8Array;
111
+ /**
112
+ * Verifies a ECDSA signature over the secp256k1 curve.
113
+ */
114
+ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
115
+ /**
116
+ * Verifies a ECDSA signature over the secp256r1 curve.
117
+ */
118
+ export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
119
+
120
+ /**
121
+ * @typedef {Object} BuildInfo - Information about how the installed package was built
122
+ * @property {string} gitHash - The hash of the git commit from which the package was built.
123
+ * @property {string} version - The version of the package at the built git commit.
124
+ * @property {boolean} dirty - Whether the package contained uncommitted changes when built.
125
+ */
126
+ export type BuildInfo = {
127
+ gitHash: string;
128
+ version: string;
129
+ dirty: string;
130
+ }
131
+
132
+
119
133
 
120
134
  export type RawAssertionPayload = {
121
135
  selector: string;
@@ -131,15 +145,6 @@ export type ExecutionError = Error & {
131
145
 
132
146
 
133
147
 
134
- export type StackItem = {
135
- index: number;
136
- witness: WitnessMap;
137
- }
138
-
139
- export type WitnessStack = Array<StackItem>;
140
-
141
-
142
-
143
148
  // Map from witness index to hex string value of witness.
144
149
  export type WitnessMap = Map<number, string>;
145
150
 
@@ -155,20 +160,6 @@ export type SolvedAndReturnWitness = {
155
160
 
156
161
 
157
162
 
158
- /**
159
- * @typedef {Object} BuildInfo - Information about how the installed package was built
160
- * @property {string} gitHash - The hash of the git commit from which the package was built.
161
- * @property {string} version - The version of the package at the built git commit.
162
- * @property {boolean} dirty - Whether the package contained uncommitted changes when built.
163
- */
164
- export type BuildInfo = {
165
- gitHash: string;
166
- version: string;
167
- dirty: string;
168
- }
169
-
170
-
171
-
172
163
  export type ForeignCallInput = string[]
173
164
  export type ForeignCallOutput = string | string[]
174
165
 
@@ -183,18 +174,24 @@ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => P
183
174
 
184
175
 
185
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 {
189
189
  readonly memory: WebAssembly.Memory;
190
- readonly and: (a: any, b: any) => any;
191
- readonly xor: (a: any, b: any) => any;
192
- readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
193
- readonly blake2s256: (a: number, b: number) => [number, number];
194
- readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
195
- readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
196
- readonly initLogLevel: (a: number, b: number) => [number, number];
197
190
  readonly buildInfo: () => any;
191
+ readonly initLogLevel: (a: number, b: number) => [number, number];
192
+ readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
193
+ readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
194
+ readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
198
195
  readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
199
196
  readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
200
197
  readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
@@ -202,9 +199,12 @@ export interface InitOutput {
202
199
  readonly decompressWitness: (a: number, b: number) => [number, number, number];
203
200
  readonly compressWitnessStack: (a: any) => [number, number, number, number];
204
201
  readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
205
- readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
206
- readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
207
- readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
202
+ readonly and: (a: any, b: any) => any;
203
+ readonly xor: (a: any, b: any) => any;
204
+ readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
205
+ readonly blake2s256: (a: number, b: number) => [number, number];
206
+ readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
207
+ readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: 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 closure441_externref_shim: (a: number, b: number, c: any) => void;
217
- readonly closure925_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
218
- readonly closure929_externref_shim: (a: number, b: number, c: any, d: any) => void;
216
+ readonly closure447_externref_shim: (a: number, b: number, c: any) => void;
217
+ readonly closure932_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
218
+ readonly closure936_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
@@ -198,62 +198,31 @@ function debugString(val) {
198
198
  return className;
199
199
  }
200
200
  /**
201
- * Performs a bitwise AND operation between `lhs` and `rhs`
202
- * @param {string} lhs
203
- * @param {string} rhs
204
- * @returns {string}
205
- */
206
- export function and(lhs, rhs) {
207
- const ret = wasm.and(lhs, rhs);
208
- return ret;
209
- }
210
-
211
- /**
212
- * Performs a bitwise XOR operation between `lhs` and `rhs`
213
- * @param {string} lhs
214
- * @param {string} rhs
215
- * @returns {string}
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.
216
203
  */
217
- export function xor(lhs, rhs) {
218
- const ret = wasm.xor(lhs, rhs);
204
+ export function buildInfo() {
205
+ const ret = wasm.buildInfo();
219
206
  return ret;
220
207
  }
221
208
 
222
- let cachedUint32ArrayMemory0 = null;
223
-
224
- function getUint32ArrayMemory0() {
225
- if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
226
- cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
227
- }
228
- return cachedUint32ArrayMemory0;
229
- }
230
-
231
- function passArray32ToWasm0(arg, malloc) {
232
- const ptr = malloc(arg.length * 4, 4) >>> 0;
233
- getUint32ArrayMemory0().set(arg, ptr / 4);
234
- WASM_VECTOR_LEN = arg.length;
235
- return ptr;
236
- }
237
-
238
- function getArrayU32FromWasm0(ptr, len) {
239
- ptr = ptr >>> 0;
240
- return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
209
+ function takeFromExternrefTable0(idx) {
210
+ const value = wasm.__wbindgen_export_2.get(idx);
211
+ wasm.__externref_table_dealloc(idx);
212
+ return value;
241
213
  }
242
214
  /**
243
- * Sha256 compression function
244
- * @param {Uint32Array} inputs
245
- * @param {Uint32Array} state
246
- * @returns {Uint32Array}
215
+ * Sets the package's logging level.
216
+ *
217
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
247
218
  */
248
- export function sha256_compression(inputs, state) {
249
- const ptr0 = passArray32ToWasm0(inputs, wasm.__wbindgen_malloc);
219
+ export function initLogLevel(filter) {
220
+ const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
250
221
  const len0 = WASM_VECTOR_LEN;
251
- const ptr1 = passArray32ToWasm0(state, wasm.__wbindgen_malloc);
252
- const len1 = WASM_VECTOR_LEN;
253
- const ret = wasm.sha256_compression(ptr0, len0, ptr1, len1);
254
- var v3 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
255
- wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
256
- return v3;
222
+ const ret = wasm.initLogLevel(ptr0, len0);
223
+ if (ret[1]) {
224
+ throw takeFromExternrefTable0(ret[0]);
225
+ }
257
226
  }
258
227
 
259
228
  function passArray8ToWasm0(arg, malloc) {
@@ -262,92 +231,49 @@ function passArray8ToWasm0(arg, malloc) {
262
231
  WASM_VECTOR_LEN = arg.length;
263
232
  return ptr;
264
233
  }
265
-
266
- function getArrayU8FromWasm0(ptr, len) {
267
- ptr = ptr >>> 0;
268
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
269
- }
270
234
  /**
271
- * Calculates the Blake2s256 hash of the input bytes
272
- * @param {Uint8Array} inputs
273
- * @returns {Uint8Array}
274
- */
275
- export function blake2s256(inputs) {
276
- const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
277
- const len0 = WASM_VECTOR_LEN;
278
- const ret = wasm.blake2s256(ptr0, len0);
279
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
280
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
281
- return v2;
282
- }
283
-
284
- /**
285
- * Verifies a ECDSA signature over the secp256k1 curve.
286
- * @param {Uint8Array} hashed_msg
287
- * @param {Uint8Array} public_key_x_bytes
288
- * @param {Uint8Array} public_key_y_bytes
289
- * @param {Uint8Array} signature
290
- * @returns {boolean}
235
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
236
+ *
237
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
238
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
239
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
240
+ * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
291
241
  */
292
- export function ecdsa_secp256k1_verify(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
293
- const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
242
+ export function executeCircuit(program, initial_witness, foreign_call_handler) {
243
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
294
244
  const len0 = WASM_VECTOR_LEN;
295
- const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
296
- const len1 = WASM_VECTOR_LEN;
297
- const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
298
- const len2 = WASM_VECTOR_LEN;
299
- const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
300
- const len3 = WASM_VECTOR_LEN;
301
- const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
302
- return ret !== 0;
245
+ const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
246
+ return ret;
303
247
  }
304
248
 
305
249
  /**
306
- * Verifies a ECDSA signature over the secp256r1 curve.
307
- * @param {Uint8Array} hashed_msg
308
- * @param {Uint8Array} public_key_x_bytes
309
- * @param {Uint8Array} public_key_y_bytes
310
- * @param {Uint8Array} signature
311
- * @returns {boolean}
250
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
251
+ * This method also extracts the public return values from the solved witness into its own return witness.
252
+ *
253
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
254
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
255
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
256
+ * @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.
312
257
  */
313
- export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
314
- const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
258
+ export function executeCircuitWithReturnWitness(program, initial_witness, foreign_call_handler) {
259
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
315
260
  const len0 = WASM_VECTOR_LEN;
316
- const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
317
- const len1 = WASM_VECTOR_LEN;
318
- const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
319
- const len2 = WASM_VECTOR_LEN;
320
- const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
321
- const len3 = WASM_VECTOR_LEN;
322
- const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
323
- return ret !== 0;
261
+ const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
262
+ return ret;
324
263
  }
325
264
 
326
- function takeFromExternrefTable0(idx) {
327
- const value = wasm.__wbindgen_export_2.get(idx);
328
- wasm.__externref_table_dealloc(idx);
329
- return value;
330
- }
331
265
  /**
332
- * Sets the package's logging level.
266
+ * Executes an ACIR circuit to generate the solved witness from the initial witness.
333
267
  *
334
- * @param {LogLevel} level - The maximum level of logging to be emitted.
268
+ * @param {Uint8Array} program - A serialized representation of an ACIR program
269
+ * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
270
+ * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
271
+ * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
335
272
  */
336
- export function initLogLevel(filter) {
337
- const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
273
+ export function executeProgram(program, initial_witness, foreign_call_handler) {
274
+ const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
338
275
  const len0 = WASM_VECTOR_LEN;
339
- const ret = wasm.initLogLevel(ptr0, len0);
340
- if (ret[1]) {
341
- throw takeFromExternrefTable0(ret[0]);
342
- }
343
- }
344
-
345
- /**
346
- * Returns the `BuildInfo` object containing information about how the installed package was built.
347
- * @returns {BuildInfo} - Information on how the installed package was built.
348
- */
349
- export function buildInfo() {
350
- const ret = wasm.buildInfo();
276
+ const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
351
277
  return ret;
352
278
  }
353
279
 
@@ -411,6 +337,10 @@ export function getPublicWitness(program, solved_witness) {
411
337
  return takeFromExternrefTable0(ret[0]);
412
338
  }
413
339
 
340
+ function getArrayU8FromWasm0(ptr, len) {
341
+ ptr = ptr >>> 0;
342
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
343
+ }
414
344
  /**
415
345
  * Compresses a `WitnessMap` into the binary format outputted by Nargo.
416
346
  *
@@ -477,61 +407,130 @@ export function decompressWitnessStack(compressed_witness) {
477
407
  }
478
408
 
479
409
  /**
480
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
481
- *
482
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
483
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
484
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
485
- * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
410
+ * Performs a bitwise AND operation between `lhs` and `rhs`
411
+ * @param {string} lhs
412
+ * @param {string} rhs
413
+ * @returns {string}
486
414
  */
487
- export function executeCircuit(program, initial_witness, foreign_call_handler) {
488
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
489
- const len0 = WASM_VECTOR_LEN;
490
- const ret = wasm.executeCircuit(ptr0, len0, initial_witness, foreign_call_handler);
415
+ export function and(lhs, rhs) {
416
+ const ret = wasm.and(lhs, rhs);
491
417
  return ret;
492
418
  }
493
419
 
494
420
  /**
495
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
496
- * This method also extracts the public return values from the solved witness into its own return witness.
497
- *
498
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
499
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `circuit`..
500
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the circuit.
501
- * @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.
421
+ * Performs a bitwise XOR operation between `lhs` and `rhs`
422
+ * @param {string} lhs
423
+ * @param {string} rhs
424
+ * @returns {string}
502
425
  */
503
- export function executeCircuitWithReturnWitness(program, initial_witness, foreign_call_handler) {
504
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
505
- const len0 = WASM_VECTOR_LEN;
506
- const ret = wasm.executeCircuitWithReturnWitness(ptr0, len0, initial_witness, foreign_call_handler);
426
+ export function xor(lhs, rhs) {
427
+ const ret = wasm.xor(lhs, rhs);
507
428
  return ret;
508
429
  }
509
430
 
431
+ let cachedUint32ArrayMemory0 = null;
432
+
433
+ function getUint32ArrayMemory0() {
434
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
435
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
436
+ }
437
+ return cachedUint32ArrayMemory0;
438
+ }
439
+
440
+ function passArray32ToWasm0(arg, malloc) {
441
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
442
+ getUint32ArrayMemory0().set(arg, ptr / 4);
443
+ WASM_VECTOR_LEN = arg.length;
444
+ return ptr;
445
+ }
446
+
447
+ function getArrayU32FromWasm0(ptr, len) {
448
+ ptr = ptr >>> 0;
449
+ return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
450
+ }
510
451
  /**
511
- * Executes an ACIR circuit to generate the solved witness from the initial witness.
512
- *
513
- * @param {Uint8Array} program - A serialized representation of an ACIR program
514
- * @param {WitnessMap} initial_witness - The initial witness map defining all of the inputs to `program`.
515
- * @param {ForeignCallHandler} foreign_call_handler - A callback to process any foreign calls from the program.
516
- * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
452
+ * Sha256 compression function
453
+ * @param {Uint32Array} inputs
454
+ * @param {Uint32Array} state
455
+ * @returns {Uint32Array}
517
456
  */
518
- export function executeProgram(program, initial_witness, foreign_call_handler) {
519
- const ptr0 = passArray8ToWasm0(program, wasm.__wbindgen_malloc);
457
+ export function sha256_compression(inputs, state) {
458
+ const ptr0 = passArray32ToWasm0(inputs, wasm.__wbindgen_malloc);
520
459
  const len0 = WASM_VECTOR_LEN;
521
- const ret = wasm.executeProgram(ptr0, len0, initial_witness, foreign_call_handler);
522
- return ret;
460
+ const ptr1 = passArray32ToWasm0(state, wasm.__wbindgen_malloc);
461
+ const len1 = WASM_VECTOR_LEN;
462
+ const ret = wasm.sha256_compression(ptr0, len0, ptr1, len1);
463
+ var v3 = getArrayU32FromWasm0(ret[0], ret[1]).slice();
464
+ wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
465
+ return v3;
466
+ }
467
+
468
+ /**
469
+ * Calculates the Blake2s256 hash of the input bytes
470
+ * @param {Uint8Array} inputs
471
+ * @returns {Uint8Array}
472
+ */
473
+ export function blake2s256(inputs) {
474
+ const ptr0 = passArray8ToWasm0(inputs, wasm.__wbindgen_malloc);
475
+ const len0 = WASM_VECTOR_LEN;
476
+ const ret = wasm.blake2s256(ptr0, len0);
477
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
478
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
479
+ return v2;
480
+ }
481
+
482
+ /**
483
+ * Verifies a ECDSA signature over the secp256k1 curve.
484
+ * @param {Uint8Array} hashed_msg
485
+ * @param {Uint8Array} public_key_x_bytes
486
+ * @param {Uint8Array} public_key_y_bytes
487
+ * @param {Uint8Array} signature
488
+ * @returns {boolean}
489
+ */
490
+ export function ecdsa_secp256k1_verify(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
491
+ const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
492
+ const len0 = WASM_VECTOR_LEN;
493
+ const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
494
+ const len1 = WASM_VECTOR_LEN;
495
+ const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
496
+ const len2 = WASM_VECTOR_LEN;
497
+ const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
498
+ const len3 = WASM_VECTOR_LEN;
499
+ const ret = wasm.ecdsa_secp256k1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
500
+ return ret !== 0;
501
+ }
502
+
503
+ /**
504
+ * Verifies a ECDSA signature over the secp256r1 curve.
505
+ * @param {Uint8Array} hashed_msg
506
+ * @param {Uint8Array} public_key_x_bytes
507
+ * @param {Uint8Array} public_key_y_bytes
508
+ * @param {Uint8Array} signature
509
+ * @returns {boolean}
510
+ */
511
+ export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_key_y_bytes, signature) {
512
+ const ptr0 = passArray8ToWasm0(hashed_msg, wasm.__wbindgen_malloc);
513
+ const len0 = WASM_VECTOR_LEN;
514
+ const ptr1 = passArray8ToWasm0(public_key_x_bytes, wasm.__wbindgen_malloc);
515
+ const len1 = WASM_VECTOR_LEN;
516
+ const ptr2 = passArray8ToWasm0(public_key_y_bytes, wasm.__wbindgen_malloc);
517
+ const len2 = WASM_VECTOR_LEN;
518
+ const ptr3 = passArray8ToWasm0(signature, wasm.__wbindgen_malloc);
519
+ const len3 = WASM_VECTOR_LEN;
520
+ const ret = wasm.ecdsa_secp256r1_verify(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
521
+ return ret !== 0;
523
522
  }
524
523
 
525
524
  function __wbg_adapter_30(arg0, arg1, arg2) {
526
- wasm.closure441_externref_shim(arg0, arg1, arg2);
525
+ wasm.closure447_externref_shim(arg0, arg1, arg2);
527
526
  }
528
527
 
529
528
  function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
530
- wasm.closure925_externref_shim(arg0, arg1, arg2, arg3, arg4);
529
+ wasm.closure932_externref_shim(arg0, arg1, arg2, arg3, arg4);
531
530
  }
532
531
 
533
532
  function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
534
- wasm.closure929_externref_shim(arg0, arg1, arg2, arg3);
533
+ wasm.closure936_externref_shim(arg0, arg1, arg2, arg3);
535
534
  }
536
535
 
537
536
  async function __wbg_load(module, imports) {
@@ -797,8 +796,8 @@ function __wbg_get_imports() {
797
796
  const ret = false;
798
797
  return ret;
799
798
  };
800
- imports.wbg.__wbindgen_closure_wrapper1431 = function(arg0, arg1, arg2) {
801
- const ret = makeMutClosure(arg0, arg1, 442, __wbg_adapter_30);
799
+ imports.wbg.__wbindgen_closure_wrapper1447 = function(arg0, arg1, arg2) {
800
+ const ret = makeMutClosure(arg0, arg1, 448, __wbg_adapter_30);
802
801
  return ret;
803
802
  };
804
803
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -1,14 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const and: (a: any, b: any) => any;
5
- export const xor: (a: any, b: any) => any;
6
- export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
7
- export const blake2s256: (a: number, b: number) => [number, number];
8
- export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
9
- export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
10
- export const initLogLevel: (a: number, b: number) => [number, number];
11
4
  export const buildInfo: () => any;
5
+ export const initLogLevel: (a: number, b: number) => [number, number];
6
+ export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
7
+ export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
8
+ export const executeProgram: (a: number, b: number, c: any, d: any) => any;
12
9
  export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
13
10
  export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
14
11
  export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
@@ -16,9 +13,12 @@ export const compressWitness: (a: any) => [number, number, number, number];
16
13
  export const decompressWitness: (a: number, b: number) => [number, number, number];
17
14
  export const compressWitnessStack: (a: any) => [number, number, number, number];
18
15
  export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
19
- export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
20
- export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
21
- export const executeProgram: (a: number, b: number, c: any, d: any) => any;
16
+ export const and: (a: any, b: any) => any;
17
+ export const xor: (a: any, b: any) => any;
18
+ export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
19
+ export const blake2s256: (a: number, b: number) => [number, number];
20
+ export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
21
+ export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: 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 closure441_externref_shim: (a: number, b: number, c: any) => void;
31
- export const closure925_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
- export const closure929_externref_shim: (a: number, b: number, c: any, d: any) => void;
30
+ export const closure447_externref_shim: (a: number, b: number, c: any) => void;
31
+ export const closure932_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
+ export const closure936_externref_shim: (a: number, b: number, c: any, d: any) => void;
33
33
  export const __wbindgen_start: () => void;