@aztec/noir-acvm_js 3.0.0-devnet.2 → 3.0.0-devnet.20251212
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.
- package/nodejs/acvm_js.d.ts +57 -57
- package/nodejs/acvm_js.js +88 -89
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +7 -7
- package/package.json +1 -1
- package/web/acvm_js.d.ts +64 -64
- package/web/acvm_js.js +87 -88
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +7 -7
package/nodejs/acvm_js.d.ts
CHANGED
|
@@ -1,34 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
5
|
-
*
|
|
6
|
-
* @param {WitnessMap} witness_map - A witness map.
|
|
7
|
-
* @returns {Uint8Array} A compressed witness map
|
|
8
|
-
*/
|
|
9
|
-
export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
10
|
-
/**
|
|
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.
|
|
13
|
-
*
|
|
14
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
15
|
-
* @returns {WitnessMap} The decompressed witness map.
|
|
16
|
-
*/
|
|
17
|
-
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
|
|
18
|
-
/**
|
|
19
|
-
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
20
|
-
*
|
|
21
|
-
* @param {WitnessStack} witness_stack - A witness stack.
|
|
22
|
-
* @returns {Uint8Array} A compressed witness stack
|
|
23
|
-
*/
|
|
24
|
-
export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
25
|
-
/**
|
|
26
|
-
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
27
|
-
*
|
|
28
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
29
|
-
* @returns {WitnessStack} The decompressed witness stack.
|
|
30
|
-
*/
|
|
31
|
-
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
32
3
|
/**
|
|
33
4
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
34
5
|
*
|
|
@@ -92,6 +63,35 @@ export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap
|
|
|
92
63
|
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
93
64
|
*/
|
|
94
65
|
export function buildInfo(): BuildInfo;
|
|
66
|
+
/**
|
|
67
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
68
|
+
*
|
|
69
|
+
* @param {WitnessMap} witness_map - A witness map.
|
|
70
|
+
* @returns {Uint8Array} A compressed witness map
|
|
71
|
+
*/
|
|
72
|
+
export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
73
|
+
/**
|
|
74
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
75
|
+
* This should be used to only fetch the witness map for the main function.
|
|
76
|
+
*
|
|
77
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
78
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
79
|
+
*/
|
|
80
|
+
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
|
|
81
|
+
/**
|
|
82
|
+
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
83
|
+
*
|
|
84
|
+
* @param {WitnessStack} witness_stack - A witness stack.
|
|
85
|
+
* @returns {Uint8Array} A compressed witness stack
|
|
86
|
+
*/
|
|
87
|
+
export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
88
|
+
/**
|
|
89
|
+
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
90
|
+
*
|
|
91
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
92
|
+
* @returns {WitnessStack} The decompressed witness stack.
|
|
93
|
+
*/
|
|
94
|
+
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
95
95
|
/**
|
|
96
96
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
97
97
|
*/
|
|
@@ -117,34 +117,6 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
|
|
|
117
117
|
*/
|
|
118
118
|
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
|
|
119
119
|
|
|
120
|
-
export type RawAssertionPayload = {
|
|
121
|
-
selector: string;
|
|
122
|
-
data: string[];
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export type ExecutionError = Error & {
|
|
126
|
-
callStack?: string[];
|
|
127
|
-
rawAssertionPayload?: RawAssertionPayload;
|
|
128
|
-
acirFunctionId?: number;
|
|
129
|
-
brilligFunctionId?: number;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
export type ForeignCallInput = string[]
|
|
135
|
-
export type ForeignCallOutput = string | string[]
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A callback which performs an foreign call and returns the response.
|
|
139
|
-
* @callback ForeignCallHandler
|
|
140
|
-
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
141
|
-
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
142
|
-
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
143
|
-
*/
|
|
144
|
-
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
120
|
// Map from witness index to hex string value of witness.
|
|
149
121
|
export type WitnessMap = Map<number, string>;
|
|
150
122
|
|
|
@@ -169,6 +141,34 @@ export type WitnessStack = Array<StackItem>;
|
|
|
169
141
|
|
|
170
142
|
|
|
171
143
|
|
|
144
|
+
export type ForeignCallInput = string[]
|
|
145
|
+
export type ForeignCallOutput = string | string[]
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* A callback which performs an foreign call and returns the response.
|
|
149
|
+
* @callback ForeignCallHandler
|
|
150
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
151
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
152
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
153
|
+
*/
|
|
154
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
export type RawAssertionPayload = {
|
|
159
|
+
selector: string;
|
|
160
|
+
data: string[];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export type ExecutionError = Error & {
|
|
164
|
+
callStack?: string[];
|
|
165
|
+
rawAssertionPayload?: RawAssertionPayload;
|
|
166
|
+
acirFunctionId?: number;
|
|
167
|
+
brilligFunctionId?: number;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
172
|
/**
|
|
173
173
|
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
174
174
|
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
package/nodejs/acvm_js.js
CHANGED
|
@@ -202,87 +202,12 @@ function debugString(val) {
|
|
|
202
202
|
return className;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
function takeFromExternrefTable0(idx) {
|
|
206
|
-
const value = wasm.__wbindgen_export_2.get(idx);
|
|
207
|
-
wasm.__externref_table_dealloc(idx);
|
|
208
|
-
return value;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
212
|
-
ptr = ptr >>> 0;
|
|
213
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
217
|
-
*
|
|
218
|
-
* @param {WitnessMap} witness_map - A witness map.
|
|
219
|
-
* @returns {Uint8Array} A compressed witness map
|
|
220
|
-
*/
|
|
221
|
-
module.exports.compressWitness = function(witness_map) {
|
|
222
|
-
const ret = wasm.compressWitness(witness_map);
|
|
223
|
-
if (ret[3]) {
|
|
224
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
225
|
-
}
|
|
226
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
227
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
228
|
-
return v1;
|
|
229
|
-
};
|
|
230
|
-
|
|
231
205
|
function passArray8ToWasm0(arg, malloc) {
|
|
232
206
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
233
207
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
234
208
|
WASM_VECTOR_LEN = arg.length;
|
|
235
209
|
return ptr;
|
|
236
210
|
}
|
|
237
|
-
/**
|
|
238
|
-
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
239
|
-
* This should be used to only fetch the witness map for the main function.
|
|
240
|
-
*
|
|
241
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
242
|
-
* @returns {WitnessMap} The decompressed witness map.
|
|
243
|
-
*/
|
|
244
|
-
module.exports.decompressWitness = function(compressed_witness) {
|
|
245
|
-
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
246
|
-
const len0 = WASM_VECTOR_LEN;
|
|
247
|
-
const ret = wasm.decompressWitness(ptr0, len0);
|
|
248
|
-
if (ret[2]) {
|
|
249
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
250
|
-
}
|
|
251
|
-
return takeFromExternrefTable0(ret[0]);
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
256
|
-
*
|
|
257
|
-
* @param {WitnessStack} witness_stack - A witness stack.
|
|
258
|
-
* @returns {Uint8Array} A compressed witness stack
|
|
259
|
-
*/
|
|
260
|
-
module.exports.compressWitnessStack = function(witness_stack) {
|
|
261
|
-
const ret = wasm.compressWitnessStack(witness_stack);
|
|
262
|
-
if (ret[3]) {
|
|
263
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
264
|
-
}
|
|
265
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
266
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
267
|
-
return v1;
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
272
|
-
*
|
|
273
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
274
|
-
* @returns {WitnessStack} The decompressed witness stack.
|
|
275
|
-
*/
|
|
276
|
-
module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
277
|
-
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
278
|
-
const len0 = WASM_VECTOR_LEN;
|
|
279
|
-
const ret = wasm.decompressWitnessStack(ptr0, len0);
|
|
280
|
-
if (ret[2]) {
|
|
281
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
282
|
-
}
|
|
283
|
-
return takeFromExternrefTable0(ret[0]);
|
|
284
|
-
};
|
|
285
|
-
|
|
286
211
|
/**
|
|
287
212
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
288
213
|
*
|
|
@@ -329,6 +254,11 @@ module.exports.executeProgram = function(program, initial_witness, foreign_call_
|
|
|
329
254
|
return ret;
|
|
330
255
|
};
|
|
331
256
|
|
|
257
|
+
function takeFromExternrefTable0(idx) {
|
|
258
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
259
|
+
wasm.__externref_table_dealloc(idx);
|
|
260
|
+
return value;
|
|
261
|
+
}
|
|
332
262
|
/**
|
|
333
263
|
* Sets the package's logging level.
|
|
334
264
|
*
|
|
@@ -412,6 +342,75 @@ module.exports.buildInfo = function() {
|
|
|
412
342
|
return ret;
|
|
413
343
|
};
|
|
414
344
|
|
|
345
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
346
|
+
ptr = ptr >>> 0;
|
|
347
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
351
|
+
*
|
|
352
|
+
* @param {WitnessMap} witness_map - A witness map.
|
|
353
|
+
* @returns {Uint8Array} A compressed witness map
|
|
354
|
+
*/
|
|
355
|
+
module.exports.compressWitness = function(witness_map) {
|
|
356
|
+
const ret = wasm.compressWitness(witness_map);
|
|
357
|
+
if (ret[3]) {
|
|
358
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
359
|
+
}
|
|
360
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
361
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
362
|
+
return v1;
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
367
|
+
* This should be used to only fetch the witness map for the main function.
|
|
368
|
+
*
|
|
369
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
370
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
371
|
+
*/
|
|
372
|
+
module.exports.decompressWitness = function(compressed_witness) {
|
|
373
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
374
|
+
const len0 = WASM_VECTOR_LEN;
|
|
375
|
+
const ret = wasm.decompressWitness(ptr0, len0);
|
|
376
|
+
if (ret[2]) {
|
|
377
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
378
|
+
}
|
|
379
|
+
return takeFromExternrefTable0(ret[0]);
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
384
|
+
*
|
|
385
|
+
* @param {WitnessStack} witness_stack - A witness stack.
|
|
386
|
+
* @returns {Uint8Array} A compressed witness stack
|
|
387
|
+
*/
|
|
388
|
+
module.exports.compressWitnessStack = function(witness_stack) {
|
|
389
|
+
const ret = wasm.compressWitnessStack(witness_stack);
|
|
390
|
+
if (ret[3]) {
|
|
391
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
392
|
+
}
|
|
393
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
394
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
395
|
+
return v1;
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
400
|
+
*
|
|
401
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
402
|
+
* @returns {WitnessStack} The decompressed witness stack.
|
|
403
|
+
*/
|
|
404
|
+
module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
405
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
407
|
+
const ret = wasm.decompressWitnessStack(ptr0, len0);
|
|
408
|
+
if (ret[2]) {
|
|
409
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
410
|
+
}
|
|
411
|
+
return takeFromExternrefTable0(ret[0]);
|
|
412
|
+
};
|
|
413
|
+
|
|
415
414
|
/**
|
|
416
415
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
417
416
|
* @param {string} lhs
|
|
@@ -528,15 +527,15 @@ module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes,
|
|
|
528
527
|
};
|
|
529
528
|
|
|
530
529
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
531
|
-
wasm.
|
|
530
|
+
wasm.closure576_externref_shim(arg0, arg1, arg2);
|
|
532
531
|
}
|
|
533
532
|
|
|
534
533
|
function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
|
|
535
|
-
wasm.
|
|
534
|
+
wasm.closure1171_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
536
535
|
}
|
|
537
536
|
|
|
538
537
|
function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
|
|
539
|
-
wasm.
|
|
538
|
+
wasm.closure1175_externref_shim(arg0, arg1, arg2, arg3);
|
|
540
539
|
}
|
|
541
540
|
|
|
542
541
|
module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
@@ -554,12 +553,12 @@ module.exports.__wbg_call_833bed5770ea2041 = function() { return handleError(fun
|
|
|
554
553
|
return ret;
|
|
555
554
|
}, arguments) };
|
|
556
555
|
|
|
557
|
-
module.exports.
|
|
556
|
+
module.exports.__wbg_constructor_c63bcfd244db473f = function(arg0) {
|
|
558
557
|
const ret = new Error(arg0);
|
|
559
558
|
return ret;
|
|
560
559
|
};
|
|
561
560
|
|
|
562
|
-
module.exports.
|
|
561
|
+
module.exports.__wbg_constructor_e54436b6bd1581f7 = function(arg0) {
|
|
563
562
|
const ret = new Error(arg0);
|
|
564
563
|
return ret;
|
|
565
564
|
};
|
|
@@ -675,6 +674,11 @@ module.exports.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
|
675
674
|
}
|
|
676
675
|
};
|
|
677
676
|
|
|
677
|
+
module.exports.__wbg_new_36c79b224aeafbf0 = function() {
|
|
678
|
+
const ret = new Array();
|
|
679
|
+
return ret;
|
|
680
|
+
};
|
|
681
|
+
|
|
678
682
|
module.exports.__wbg_new_5e0be73521bc8c17 = function() {
|
|
679
683
|
const ret = new Map();
|
|
680
684
|
return ret;
|
|
@@ -690,8 +694,8 @@ module.exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
|
690
694
|
return ret;
|
|
691
695
|
};
|
|
692
696
|
|
|
693
|
-
module.exports.
|
|
694
|
-
const ret = new
|
|
697
|
+
module.exports.__wbg_new_c08cf36011667e78 = function() {
|
|
698
|
+
const ret = new Map();
|
|
695
699
|
return ret;
|
|
696
700
|
};
|
|
697
701
|
|
|
@@ -700,11 +704,6 @@ module.exports.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
|
|
|
700
704
|
return ret;
|
|
701
705
|
};
|
|
702
706
|
|
|
703
|
-
module.exports.__wbg_new_e2884e6fab20df40 = function() {
|
|
704
|
-
const ret = new Map();
|
|
705
|
-
return ret;
|
|
706
|
-
};
|
|
707
|
-
|
|
708
707
|
module.exports.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
709
708
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
710
709
|
return ret;
|
|
@@ -814,8 +813,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
814
813
|
return ret;
|
|
815
814
|
};
|
|
816
815
|
|
|
817
|
-
module.exports.
|
|
818
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
816
|
+
module.exports.__wbindgen_closure_wrapper1970 = function(arg0, arg1, arg2) {
|
|
817
|
+
const ret = makeMutClosure(arg0, arg1, 577, __wbg_adapter_30);
|
|
819
818
|
return ret;
|
|
820
819
|
};
|
|
821
820
|
|
package/nodejs/acvm_js_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const compressWitness: (a: any) => [number, number, number, number];
|
|
5
|
-
export const decompressWitness: (a: number, b: number) => [number, number, number];
|
|
6
|
-
export const compressWitnessStack: (a: any) => [number, number, number, number];
|
|
7
|
-
export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
8
4
|
export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
|
|
9
5
|
export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
|
|
10
6
|
export const executeProgram: (a: number, b: number, c: any, d: any) => any;
|
|
@@ -13,6 +9,10 @@ export const getReturnWitness: (a: number, b: number, c: any) => [number, number
|
|
|
13
9
|
export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
14
10
|
export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
15
11
|
export const buildInfo: () => any;
|
|
12
|
+
export const compressWitness: (a: any) => [number, number, number, number];
|
|
13
|
+
export const decompressWitness: (a: number, b: number) => [number, number, number];
|
|
14
|
+
export const compressWitnessStack: (a: any) => [number, number, number, number];
|
|
15
|
+
export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
16
16
|
export const and: (a: any, b: any) => any;
|
|
17
17
|
export const xor: (a: any, b: any) => any;
|
|
18
18
|
export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
@@ -27,7 +27,7 @@ export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
|
27
27
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
28
28
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
29
29
|
export const __externref_table_dealloc: (a: number) => void;
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
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
package/web/acvm_js.d.ts
CHANGED
|
@@ -1,34 +1,5 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
5
|
-
*
|
|
6
|
-
* @param {WitnessMap} witness_map - A witness map.
|
|
7
|
-
* @returns {Uint8Array} A compressed witness map
|
|
8
|
-
*/
|
|
9
|
-
export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
10
|
-
/**
|
|
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.
|
|
13
|
-
*
|
|
14
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
15
|
-
* @returns {WitnessMap} The decompressed witness map.
|
|
16
|
-
*/
|
|
17
|
-
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
|
|
18
|
-
/**
|
|
19
|
-
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
20
|
-
*
|
|
21
|
-
* @param {WitnessStack} witness_stack - A witness stack.
|
|
22
|
-
* @returns {Uint8Array} A compressed witness stack
|
|
23
|
-
*/
|
|
24
|
-
export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
25
|
-
/**
|
|
26
|
-
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
27
|
-
*
|
|
28
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
29
|
-
* @returns {WitnessStack} The decompressed witness stack.
|
|
30
|
-
*/
|
|
31
|
-
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
32
3
|
/**
|
|
33
4
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
34
5
|
*
|
|
@@ -92,6 +63,35 @@ export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap
|
|
|
92
63
|
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
93
64
|
*/
|
|
94
65
|
export function buildInfo(): BuildInfo;
|
|
66
|
+
/**
|
|
67
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
68
|
+
*
|
|
69
|
+
* @param {WitnessMap} witness_map - A witness map.
|
|
70
|
+
* @returns {Uint8Array} A compressed witness map
|
|
71
|
+
*/
|
|
72
|
+
export function compressWitness(witness_map: WitnessMap): Uint8Array;
|
|
73
|
+
/**
|
|
74
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
75
|
+
* This should be used to only fetch the witness map for the main function.
|
|
76
|
+
*
|
|
77
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
78
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
79
|
+
*/
|
|
80
|
+
export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
|
|
81
|
+
/**
|
|
82
|
+
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
83
|
+
*
|
|
84
|
+
* @param {WitnessStack} witness_stack - A witness stack.
|
|
85
|
+
* @returns {Uint8Array} A compressed witness stack
|
|
86
|
+
*/
|
|
87
|
+
export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
88
|
+
/**
|
|
89
|
+
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
90
|
+
*
|
|
91
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
92
|
+
* @returns {WitnessStack} The decompressed witness stack.
|
|
93
|
+
*/
|
|
94
|
+
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
95
95
|
/**
|
|
96
96
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
97
97
|
*/
|
|
@@ -117,34 +117,6 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
|
|
|
117
117
|
*/
|
|
118
118
|
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
|
|
119
119
|
|
|
120
|
-
export type RawAssertionPayload = {
|
|
121
|
-
selector: string;
|
|
122
|
-
data: string[];
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export type ExecutionError = Error & {
|
|
126
|
-
callStack?: string[];
|
|
127
|
-
rawAssertionPayload?: RawAssertionPayload;
|
|
128
|
-
acirFunctionId?: number;
|
|
129
|
-
brilligFunctionId?: number;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
export type ForeignCallInput = string[]
|
|
135
|
-
export type ForeignCallOutput = string | string[]
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* A callback which performs an foreign call and returns the response.
|
|
139
|
-
* @callback ForeignCallHandler
|
|
140
|
-
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
141
|
-
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
142
|
-
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
143
|
-
*/
|
|
144
|
-
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
120
|
// Map from witness index to hex string value of witness.
|
|
149
121
|
export type WitnessMap = Map<number, string>;
|
|
150
122
|
|
|
@@ -169,6 +141,34 @@ export type WitnessStack = Array<StackItem>;
|
|
|
169
141
|
|
|
170
142
|
|
|
171
143
|
|
|
144
|
+
export type ForeignCallInput = string[]
|
|
145
|
+
export type ForeignCallOutput = string | string[]
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* A callback which performs an foreign call and returns the response.
|
|
149
|
+
* @callback ForeignCallHandler
|
|
150
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
151
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
152
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
153
|
+
*/
|
|
154
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
export type RawAssertionPayload = {
|
|
159
|
+
selector: string;
|
|
160
|
+
data: string[];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export type ExecutionError = Error & {
|
|
164
|
+
callStack?: string[];
|
|
165
|
+
rawAssertionPayload?: RawAssertionPayload;
|
|
166
|
+
acirFunctionId?: number;
|
|
167
|
+
brilligFunctionId?: number;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
172
|
/**
|
|
173
173
|
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
174
174
|
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
|
@@ -187,10 +187,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
187
187
|
|
|
188
188
|
export interface InitOutput {
|
|
189
189
|
readonly memory: WebAssembly.Memory;
|
|
190
|
-
readonly compressWitness: (a: any) => [number, number, number, number];
|
|
191
|
-
readonly decompressWitness: (a: number, b: number) => [number, number, number];
|
|
192
|
-
readonly compressWitnessStack: (a: any) => [number, number, number, number];
|
|
193
|
-
readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
194
190
|
readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
|
|
195
191
|
readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
|
|
196
192
|
readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
|
|
@@ -199,6 +195,10 @@ export interface InitOutput {
|
|
|
199
195
|
readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
200
196
|
readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
201
197
|
readonly buildInfo: () => any;
|
|
198
|
+
readonly compressWitness: (a: any) => [number, number, number, number];
|
|
199
|
+
readonly decompressWitness: (a: number, b: number) => [number, number, number];
|
|
200
|
+
readonly compressWitnessStack: (a: any) => [number, number, number, number];
|
|
201
|
+
readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
202
202
|
readonly and: (a: any, b: any) => any;
|
|
203
203
|
readonly xor: (a: any, b: any) => any;
|
|
204
204
|
readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
@@ -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
|
|
217
|
-
readonly
|
|
218
|
-
readonly
|
|
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
|
@@ -198,87 +198,12 @@ function debugString(val) {
|
|
|
198
198
|
return className;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
function takeFromExternrefTable0(idx) {
|
|
202
|
-
const value = wasm.__wbindgen_export_2.get(idx);
|
|
203
|
-
wasm.__externref_table_dealloc(idx);
|
|
204
|
-
return value;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
208
|
-
ptr = ptr >>> 0;
|
|
209
|
-
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
213
|
-
*
|
|
214
|
-
* @param {WitnessMap} witness_map - A witness map.
|
|
215
|
-
* @returns {Uint8Array} A compressed witness map
|
|
216
|
-
*/
|
|
217
|
-
export function compressWitness(witness_map) {
|
|
218
|
-
const ret = wasm.compressWitness(witness_map);
|
|
219
|
-
if (ret[3]) {
|
|
220
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
221
|
-
}
|
|
222
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
223
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
224
|
-
return v1;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
201
|
function passArray8ToWasm0(arg, malloc) {
|
|
228
202
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
229
203
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
230
204
|
WASM_VECTOR_LEN = arg.length;
|
|
231
205
|
return ptr;
|
|
232
206
|
}
|
|
233
|
-
/**
|
|
234
|
-
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
235
|
-
* This should be used to only fetch the witness map for the main function.
|
|
236
|
-
*
|
|
237
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
238
|
-
* @returns {WitnessMap} The decompressed witness map.
|
|
239
|
-
*/
|
|
240
|
-
export function decompressWitness(compressed_witness) {
|
|
241
|
-
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
242
|
-
const len0 = WASM_VECTOR_LEN;
|
|
243
|
-
const ret = wasm.decompressWitness(ptr0, len0);
|
|
244
|
-
if (ret[2]) {
|
|
245
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
246
|
-
}
|
|
247
|
-
return takeFromExternrefTable0(ret[0]);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
252
|
-
*
|
|
253
|
-
* @param {WitnessStack} witness_stack - A witness stack.
|
|
254
|
-
* @returns {Uint8Array} A compressed witness stack
|
|
255
|
-
*/
|
|
256
|
-
export function compressWitnessStack(witness_stack) {
|
|
257
|
-
const ret = wasm.compressWitnessStack(witness_stack);
|
|
258
|
-
if (ret[3]) {
|
|
259
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
260
|
-
}
|
|
261
|
-
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
262
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
263
|
-
return v1;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
268
|
-
*
|
|
269
|
-
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
270
|
-
* @returns {WitnessStack} The decompressed witness stack.
|
|
271
|
-
*/
|
|
272
|
-
export function decompressWitnessStack(compressed_witness) {
|
|
273
|
-
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
274
|
-
const len0 = WASM_VECTOR_LEN;
|
|
275
|
-
const ret = wasm.decompressWitnessStack(ptr0, len0);
|
|
276
|
-
if (ret[2]) {
|
|
277
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
278
|
-
}
|
|
279
|
-
return takeFromExternrefTable0(ret[0]);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
207
|
/**
|
|
283
208
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
284
209
|
*
|
|
@@ -325,6 +250,11 @@ export function executeProgram(program, initial_witness, foreign_call_handler) {
|
|
|
325
250
|
return ret;
|
|
326
251
|
}
|
|
327
252
|
|
|
253
|
+
function takeFromExternrefTable0(idx) {
|
|
254
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
255
|
+
wasm.__externref_table_dealloc(idx);
|
|
256
|
+
return value;
|
|
257
|
+
}
|
|
328
258
|
/**
|
|
329
259
|
* Sets the package's logging level.
|
|
330
260
|
*
|
|
@@ -408,6 +338,75 @@ export function buildInfo() {
|
|
|
408
338
|
return ret;
|
|
409
339
|
}
|
|
410
340
|
|
|
341
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
342
|
+
ptr = ptr >>> 0;
|
|
343
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
347
|
+
*
|
|
348
|
+
* @param {WitnessMap} witness_map - A witness map.
|
|
349
|
+
* @returns {Uint8Array} A compressed witness map
|
|
350
|
+
*/
|
|
351
|
+
export function compressWitness(witness_map) {
|
|
352
|
+
const ret = wasm.compressWitness(witness_map);
|
|
353
|
+
if (ret[3]) {
|
|
354
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
355
|
+
}
|
|
356
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
357
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
358
|
+
return v1;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
|
|
363
|
+
* This should be used to only fetch the witness map for the main function.
|
|
364
|
+
*
|
|
365
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
366
|
+
* @returns {WitnessMap} The decompressed witness map.
|
|
367
|
+
*/
|
|
368
|
+
export function decompressWitness(compressed_witness) {
|
|
369
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
370
|
+
const len0 = WASM_VECTOR_LEN;
|
|
371
|
+
const ret = wasm.decompressWitness(ptr0, len0);
|
|
372
|
+
if (ret[2]) {
|
|
373
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
374
|
+
}
|
|
375
|
+
return takeFromExternrefTable0(ret[0]);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Compresses a `WitnessStack` into the binary format outputted by Nargo.
|
|
380
|
+
*
|
|
381
|
+
* @param {WitnessStack} witness_stack - A witness stack.
|
|
382
|
+
* @returns {Uint8Array} A compressed witness stack
|
|
383
|
+
*/
|
|
384
|
+
export function compressWitnessStack(witness_stack) {
|
|
385
|
+
const ret = wasm.compressWitnessStack(witness_stack);
|
|
386
|
+
if (ret[3]) {
|
|
387
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
388
|
+
}
|
|
389
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
390
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
391
|
+
return v1;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
|
|
396
|
+
*
|
|
397
|
+
* @param {Uint8Array} compressed_witness - A compressed witness.
|
|
398
|
+
* @returns {WitnessStack} The decompressed witness stack.
|
|
399
|
+
*/
|
|
400
|
+
export function decompressWitnessStack(compressed_witness) {
|
|
401
|
+
const ptr0 = passArray8ToWasm0(compressed_witness, wasm.__wbindgen_malloc);
|
|
402
|
+
const len0 = WASM_VECTOR_LEN;
|
|
403
|
+
const ret = wasm.decompressWitnessStack(ptr0, len0);
|
|
404
|
+
if (ret[2]) {
|
|
405
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
406
|
+
}
|
|
407
|
+
return takeFromExternrefTable0(ret[0]);
|
|
408
|
+
}
|
|
409
|
+
|
|
411
410
|
/**
|
|
412
411
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
413
412
|
* @param {string} lhs
|
|
@@ -524,15 +523,15 @@ export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_ke
|
|
|
524
523
|
}
|
|
525
524
|
|
|
526
525
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
527
|
-
wasm.
|
|
526
|
+
wasm.closure576_externref_shim(arg0, arg1, arg2);
|
|
528
527
|
}
|
|
529
528
|
|
|
530
529
|
function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
|
|
531
|
-
wasm.
|
|
530
|
+
wasm.closure1171_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
532
531
|
}
|
|
533
532
|
|
|
534
533
|
function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
|
|
535
|
-
wasm.
|
|
534
|
+
wasm.closure1175_externref_shim(arg0, arg1, arg2, arg3);
|
|
536
535
|
}
|
|
537
536
|
|
|
538
537
|
async function __wbg_load(module, imports) {
|
|
@@ -581,11 +580,11 @@ function __wbg_get_imports() {
|
|
|
581
580
|
const ret = arg0.call(arg1, arg2, arg3);
|
|
582
581
|
return ret;
|
|
583
582
|
}, arguments) };
|
|
584
|
-
imports.wbg.
|
|
583
|
+
imports.wbg.__wbg_constructor_c63bcfd244db473f = function(arg0) {
|
|
585
584
|
const ret = new Error(arg0);
|
|
586
585
|
return ret;
|
|
587
586
|
};
|
|
588
|
-
imports.wbg.
|
|
587
|
+
imports.wbg.__wbg_constructor_e54436b6bd1581f7 = function(arg0) {
|
|
589
588
|
const ret = new Error(arg0);
|
|
590
589
|
return ret;
|
|
591
590
|
};
|
|
@@ -686,6 +685,10 @@ function __wbg_get_imports() {
|
|
|
686
685
|
state0.a = state0.b = 0;
|
|
687
686
|
}
|
|
688
687
|
};
|
|
688
|
+
imports.wbg.__wbg_new_36c79b224aeafbf0 = function() {
|
|
689
|
+
const ret = new Array();
|
|
690
|
+
return ret;
|
|
691
|
+
};
|
|
689
692
|
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
690
693
|
const ret = new Map();
|
|
691
694
|
return ret;
|
|
@@ -698,18 +701,14 @@ function __wbg_get_imports() {
|
|
|
698
701
|
const ret = new Error();
|
|
699
702
|
return ret;
|
|
700
703
|
};
|
|
701
|
-
imports.wbg.
|
|
702
|
-
const ret = new
|
|
704
|
+
imports.wbg.__wbg_new_c08cf36011667e78 = function() {
|
|
705
|
+
const ret = new Map();
|
|
703
706
|
return ret;
|
|
704
707
|
};
|
|
705
708
|
imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
|
|
706
709
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
707
710
|
return ret;
|
|
708
711
|
};
|
|
709
|
-
imports.wbg.__wbg_new_e2884e6fab20df40 = function() {
|
|
710
|
-
const ret = new Map();
|
|
711
|
-
return ret;
|
|
712
|
-
};
|
|
713
712
|
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
714
713
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
715
714
|
return ret;
|
|
@@ -798,8 +797,8 @@ function __wbg_get_imports() {
|
|
|
798
797
|
const ret = false;
|
|
799
798
|
return ret;
|
|
800
799
|
};
|
|
801
|
-
imports.wbg.
|
|
802
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
800
|
+
imports.wbg.__wbindgen_closure_wrapper1970 = function(arg0, arg1, arg2) {
|
|
801
|
+
const ret = makeMutClosure(arg0, arg1, 577, __wbg_adapter_30);
|
|
803
802
|
return ret;
|
|
804
803
|
};
|
|
805
804
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
package/web/acvm_js_bg.wasm
CHANGED
|
Binary file
|
package/web/acvm_js_bg.wasm.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const compressWitness: (a: any) => [number, number, number, number];
|
|
5
|
-
export const decompressWitness: (a: number, b: number) => [number, number, number];
|
|
6
|
-
export const compressWitnessStack: (a: any) => [number, number, number, number];
|
|
7
|
-
export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
8
4
|
export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
|
|
9
5
|
export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
|
|
10
6
|
export const executeProgram: (a: number, b: number, c: any, d: any) => any;
|
|
@@ -13,6 +9,10 @@ export const getReturnWitness: (a: number, b: number, c: any) => [number, number
|
|
|
13
9
|
export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
14
10
|
export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
15
11
|
export const buildInfo: () => any;
|
|
12
|
+
export const compressWitness: (a: any) => [number, number, number, number];
|
|
13
|
+
export const decompressWitness: (a: number, b: number) => [number, number, number];
|
|
14
|
+
export const compressWitnessStack: (a: any) => [number, number, number, number];
|
|
15
|
+
export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
16
16
|
export const and: (a: any, b: any) => any;
|
|
17
17
|
export const xor: (a: any, b: any) => any;
|
|
18
18
|
export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
@@ -27,7 +27,7 @@ export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
|
27
27
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
28
28
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
29
29
|
export const __externref_table_dealloc: (a: number) => void;
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
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;
|