@noir-lang/acvm_js 1.0.0-beta.3-826b18a.nightly → 1.0.0-beta.3-3239a4a.nightly
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/nodejs/acvm_js.d.ts +39 -39
- package/nodejs/acvm_js.js +26 -27
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +5 -5
- package/package.json +1 -1
- package/web/acvm_js.d.ts +44 -44
- package/web/acvm_js.js +26 -27
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +5 -5
package/nodejs/acvm_js.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
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.
|
|
6
|
+
*/
|
|
7
|
+
export function buildInfo(): BuildInfo;
|
|
3
8
|
/**
|
|
4
9
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
5
10
|
*
|
|
@@ -28,12 +33,6 @@ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_wit
|
|
|
28
33
|
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
29
34
|
*/
|
|
30
35
|
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
|
|
31
|
-
/**
|
|
32
|
-
* Sets the package's logging level.
|
|
33
|
-
*
|
|
34
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
35
|
-
*/
|
|
36
|
-
export function initLogLevel(filter: string): void;
|
|
37
36
|
/**
|
|
38
37
|
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
39
38
|
*
|
|
@@ -58,11 +57,6 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
|
|
|
58
57
|
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
59
58
|
*/
|
|
60
59
|
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
61
|
-
/**
|
|
62
|
-
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
63
|
-
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
64
|
-
*/
|
|
65
|
-
export function buildInfo(): BuildInfo;
|
|
66
60
|
/**
|
|
67
61
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
68
62
|
*/
|
|
@@ -116,6 +110,26 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
|
116
110
|
* @returns {WitnessStack} The decompressed witness stack.
|
|
117
111
|
*/
|
|
118
112
|
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
113
|
+
/**
|
|
114
|
+
* Sets the package's logging level.
|
|
115
|
+
*
|
|
116
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
117
|
+
*/
|
|
118
|
+
export function initLogLevel(filter: string): void;
|
|
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;
|
|
@@ -139,6 +153,20 @@ export type WitnessStack = Array<StackItem>;
|
|
|
139
153
|
|
|
140
154
|
|
|
141
155
|
|
|
156
|
+
export type ForeignCallInput = string[]
|
|
157
|
+
export type ForeignCallOutput = string | string[]
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* A callback which performs an foreign call and returns the response.
|
|
161
|
+
* @callback ForeignCallHandler
|
|
162
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
163
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
164
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
165
|
+
*/
|
|
166
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
142
170
|
// Map from witness index to hex string value of witness.
|
|
143
171
|
export type WitnessMap = Map<number, string>;
|
|
144
172
|
|
|
@@ -153,31 +181,3 @@ export type SolvedAndReturnWitness = {
|
|
|
153
181
|
}
|
|
154
182
|
|
|
155
183
|
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
159
|
-
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
|
160
|
-
* @property {string} version - The version of the package at the built git commit.
|
|
161
|
-
* @property {boolean} dirty - Whether the package contained uncommitted changes when built.
|
|
162
|
-
*/
|
|
163
|
-
export type BuildInfo = {
|
|
164
|
-
gitHash: string;
|
|
165
|
-
version: string;
|
|
166
|
-
dirty: string;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
export type ForeignCallInput = string[]
|
|
172
|
-
export type ForeignCallOutput = string | string[]
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* A callback which performs an foreign call and returns the response.
|
|
176
|
-
* @callback ForeignCallHandler
|
|
177
|
-
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
178
|
-
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
179
|
-
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
180
|
-
*/
|
|
181
|
-
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
182
|
-
|
|
183
|
-
|
package/nodejs/acvm_js.js
CHANGED
|
@@ -201,6 +201,14 @@ function debugString(val) {
|
|
|
201
201
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
202
202
|
return className;
|
|
203
203
|
}
|
|
204
|
+
/**
|
|
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.
|
|
207
|
+
*/
|
|
208
|
+
module.exports.buildInfo = function() {
|
|
209
|
+
const ret = wasm.buildInfo();
|
|
210
|
+
return ret;
|
|
211
|
+
};
|
|
204
212
|
|
|
205
213
|
function passArray8ToWasm0(arg, malloc) {
|
|
206
214
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
@@ -259,20 +267,6 @@ function takeFromExternrefTable0(idx) {
|
|
|
259
267
|
wasm.__externref_table_dealloc(idx);
|
|
260
268
|
return value;
|
|
261
269
|
}
|
|
262
|
-
/**
|
|
263
|
-
* Sets the package's logging level.
|
|
264
|
-
*
|
|
265
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
266
|
-
*/
|
|
267
|
-
module.exports.initLogLevel = function(filter) {
|
|
268
|
-
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
269
|
-
const len0 = WASM_VECTOR_LEN;
|
|
270
|
-
const ret = wasm.initLogLevel(ptr0, len0);
|
|
271
|
-
if (ret[1]) {
|
|
272
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
|
|
276
270
|
/**
|
|
277
271
|
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
278
272
|
*
|
|
@@ -333,15 +327,6 @@ module.exports.getPublicWitness = function(program, solved_witness) {
|
|
|
333
327
|
return takeFromExternrefTable0(ret[0]);
|
|
334
328
|
};
|
|
335
329
|
|
|
336
|
-
/**
|
|
337
|
-
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
338
|
-
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
339
|
-
*/
|
|
340
|
-
module.exports.buildInfo = function() {
|
|
341
|
-
const ret = wasm.buildInfo();
|
|
342
|
-
return ret;
|
|
343
|
-
};
|
|
344
|
-
|
|
345
330
|
/**
|
|
346
331
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
347
332
|
* @param {string} lhs
|
|
@@ -526,16 +511,30 @@ module.exports.decompressWitnessStack = function(compressed_witness) {
|
|
|
526
511
|
return takeFromExternrefTable0(ret[0]);
|
|
527
512
|
};
|
|
528
513
|
|
|
514
|
+
/**
|
|
515
|
+
* Sets the package's logging level.
|
|
516
|
+
*
|
|
517
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
518
|
+
*/
|
|
519
|
+
module.exports.initLogLevel = function(filter) {
|
|
520
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
521
|
+
const len0 = WASM_VECTOR_LEN;
|
|
522
|
+
const ret = wasm.initLogLevel(ptr0, len0);
|
|
523
|
+
if (ret[1]) {
|
|
524
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
|
|
529
528
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
530
|
-
wasm.
|
|
529
|
+
wasm.closure265_externref_shim(arg0, arg1, arg2);
|
|
531
530
|
}
|
|
532
531
|
|
|
533
532
|
function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
|
|
534
|
-
wasm.
|
|
533
|
+
wasm.closure830_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
535
534
|
}
|
|
536
535
|
|
|
537
536
|
function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
|
|
538
|
-
wasm.
|
|
537
|
+
wasm.closure834_externref_shim(arg0, arg1, arg2, arg3);
|
|
539
538
|
}
|
|
540
539
|
|
|
541
540
|
module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
@@ -814,7 +813,7 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
814
813
|
};
|
|
815
814
|
|
|
816
815
|
module.exports.__wbindgen_closure_wrapper739 = function(arg0, arg1, arg2) {
|
|
817
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
816
|
+
const ret = makeMutClosure(arg0, arg1, 266, __wbg_adapter_30);
|
|
818
817
|
return ret;
|
|
819
818
|
};
|
|
820
819
|
|
package/nodejs/acvm_js_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const buildInfo: () => any;
|
|
4
5
|
export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
|
|
5
6
|
export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
|
|
6
7
|
export const executeProgram: (a: number, b: number, c: any, d: any) => any;
|
|
7
|
-
export const initLogLevel: (a: number, b: number) => [number, number];
|
|
8
8
|
export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
9
9
|
export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
10
10
|
export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
11
|
-
export const buildInfo: () => any;
|
|
12
11
|
export const and: (a: any, b: any) => any;
|
|
13
12
|
export const xor: (a: any, b: any) => any;
|
|
14
13
|
export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
@@ -19,6 +18,7 @@ export const compressWitness: (a: any) => [number, number, number, number];
|
|
|
19
18
|
export const decompressWitness: (a: number, b: number) => [number, number, number];
|
|
20
19
|
export const compressWitnessStack: (a: any) => [number, number, number, number];
|
|
21
20
|
export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
21
|
+
export const initLogLevel: (a: number, b: number) => [number, number];
|
|
22
22
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
23
23
|
export const __externref_table_alloc: () => number;
|
|
24
24
|
export const __wbindgen_export_2: WebAssembly.Table;
|
|
@@ -27,7 +27,7 @@ export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
|
27
27
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
28
28
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
29
29
|
export const __externref_table_dealloc: (a: number) => void;
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
30
|
+
export const closure265_externref_shim: (a: number, b: number, c: any) => void;
|
|
31
|
+
export const closure830_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
|
|
32
|
+
export const closure834_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,5 +1,10 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
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.
|
|
6
|
+
*/
|
|
7
|
+
export function buildInfo(): BuildInfo;
|
|
3
8
|
/**
|
|
4
9
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
5
10
|
*
|
|
@@ -28,12 +33,6 @@ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_wit
|
|
|
28
33
|
* @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
|
|
29
34
|
*/
|
|
30
35
|
export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
|
|
31
|
-
/**
|
|
32
|
-
* Sets the package's logging level.
|
|
33
|
-
*
|
|
34
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
35
|
-
*/
|
|
36
|
-
export function initLogLevel(filter: string): void;
|
|
37
36
|
/**
|
|
38
37
|
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
39
38
|
*
|
|
@@ -58,11 +57,6 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
|
|
|
58
57
|
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
59
58
|
*/
|
|
60
59
|
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
61
|
-
/**
|
|
62
|
-
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
63
|
-
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
64
|
-
*/
|
|
65
|
-
export function buildInfo(): BuildInfo;
|
|
66
60
|
/**
|
|
67
61
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
68
62
|
*/
|
|
@@ -116,6 +110,26 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
|
116
110
|
* @returns {WitnessStack} The decompressed witness stack.
|
|
117
111
|
*/
|
|
118
112
|
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
113
|
+
/**
|
|
114
|
+
* Sets the package's logging level.
|
|
115
|
+
*
|
|
116
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
117
|
+
*/
|
|
118
|
+
export function initLogLevel(filter: string): void;
|
|
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;
|
|
@@ -139,6 +153,20 @@ export type WitnessStack = Array<StackItem>;
|
|
|
139
153
|
|
|
140
154
|
|
|
141
155
|
|
|
156
|
+
export type ForeignCallInput = string[]
|
|
157
|
+
export type ForeignCallOutput = string | string[]
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* A callback which performs an foreign call and returns the response.
|
|
161
|
+
* @callback ForeignCallHandler
|
|
162
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
163
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
164
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
165
|
+
*/
|
|
166
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
142
170
|
// Map from witness index to hex string value of witness.
|
|
143
171
|
export type WitnessMap = Map<number, string>;
|
|
144
172
|
|
|
@@ -154,46 +182,17 @@ export type SolvedAndReturnWitness = {
|
|
|
154
182
|
|
|
155
183
|
|
|
156
184
|
|
|
157
|
-
/**
|
|
158
|
-
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
159
|
-
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
|
160
|
-
* @property {string} version - The version of the package at the built git commit.
|
|
161
|
-
* @property {boolean} dirty - Whether the package contained uncommitted changes when built.
|
|
162
|
-
*/
|
|
163
|
-
export type BuildInfo = {
|
|
164
|
-
gitHash: string;
|
|
165
|
-
version: string;
|
|
166
|
-
dirty: string;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
export type ForeignCallInput = string[]
|
|
172
|
-
export type ForeignCallOutput = string | string[]
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* A callback which performs an foreign call and returns the response.
|
|
176
|
-
* @callback ForeignCallHandler
|
|
177
|
-
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
178
|
-
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
179
|
-
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
180
|
-
*/
|
|
181
|
-
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
185
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
186
186
|
|
|
187
187
|
export interface InitOutput {
|
|
188
188
|
readonly memory: WebAssembly.Memory;
|
|
189
|
+
readonly buildInfo: () => any;
|
|
189
190
|
readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
|
|
190
191
|
readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
|
|
191
192
|
readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
|
|
192
|
-
readonly initLogLevel: (a: number, b: number) => [number, number];
|
|
193
193
|
readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
194
194
|
readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
195
195
|
readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
196
|
-
readonly buildInfo: () => any;
|
|
197
196
|
readonly and: (a: any, b: any) => any;
|
|
198
197
|
readonly xor: (a: any, b: any) => any;
|
|
199
198
|
readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
@@ -204,6 +203,7 @@ export interface InitOutput {
|
|
|
204
203
|
readonly decompressWitness: (a: number, b: number) => [number, number, number];
|
|
205
204
|
readonly compressWitnessStack: (a: any) => [number, number, number, number];
|
|
206
205
|
readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
206
|
+
readonly initLogLevel: (a: number, b: number) => [number, number];
|
|
207
207
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
208
208
|
readonly __externref_table_alloc: () => number;
|
|
209
209
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
@@ -212,9 +212,9 @@ export interface InitOutput {
|
|
|
212
212
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
213
213
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
214
214
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
215
|
-
readonly
|
|
216
|
-
readonly
|
|
217
|
-
readonly
|
|
215
|
+
readonly closure265_externref_shim: (a: number, b: number, c: any) => void;
|
|
216
|
+
readonly closure830_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
|
|
217
|
+
readonly closure834_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
218
218
|
readonly __wbindgen_start: () => void;
|
|
219
219
|
}
|
|
220
220
|
|
package/web/acvm_js.js
CHANGED
|
@@ -197,6 +197,14 @@ function debugString(val) {
|
|
|
197
197
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
198
198
|
return className;
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
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.
|
|
203
|
+
*/
|
|
204
|
+
export function buildInfo() {
|
|
205
|
+
const ret = wasm.buildInfo();
|
|
206
|
+
return ret;
|
|
207
|
+
}
|
|
200
208
|
|
|
201
209
|
function passArray8ToWasm0(arg, malloc) {
|
|
202
210
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
@@ -255,20 +263,6 @@ function takeFromExternrefTable0(idx) {
|
|
|
255
263
|
wasm.__externref_table_dealloc(idx);
|
|
256
264
|
return value;
|
|
257
265
|
}
|
|
258
|
-
/**
|
|
259
|
-
* Sets the package's logging level.
|
|
260
|
-
*
|
|
261
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
262
|
-
*/
|
|
263
|
-
export function initLogLevel(filter) {
|
|
264
|
-
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
-
const len0 = WASM_VECTOR_LEN;
|
|
266
|
-
const ret = wasm.initLogLevel(ptr0, len0);
|
|
267
|
-
if (ret[1]) {
|
|
268
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
266
|
/**
|
|
273
267
|
* Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
|
|
274
268
|
*
|
|
@@ -329,15 +323,6 @@ export function getPublicWitness(program, solved_witness) {
|
|
|
329
323
|
return takeFromExternrefTable0(ret[0]);
|
|
330
324
|
}
|
|
331
325
|
|
|
332
|
-
/**
|
|
333
|
-
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
334
|
-
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
335
|
-
*/
|
|
336
|
-
export function buildInfo() {
|
|
337
|
-
const ret = wasm.buildInfo();
|
|
338
|
-
return ret;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
326
|
/**
|
|
342
327
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
343
328
|
* @param {string} lhs
|
|
@@ -522,16 +507,30 @@ export function decompressWitnessStack(compressed_witness) {
|
|
|
522
507
|
return takeFromExternrefTable0(ret[0]);
|
|
523
508
|
}
|
|
524
509
|
|
|
510
|
+
/**
|
|
511
|
+
* Sets the package's logging level.
|
|
512
|
+
*
|
|
513
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
514
|
+
*/
|
|
515
|
+
export function initLogLevel(filter) {
|
|
516
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
517
|
+
const len0 = WASM_VECTOR_LEN;
|
|
518
|
+
const ret = wasm.initLogLevel(ptr0, len0);
|
|
519
|
+
if (ret[1]) {
|
|
520
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
525
524
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
526
|
-
wasm.
|
|
525
|
+
wasm.closure265_externref_shim(arg0, arg1, arg2);
|
|
527
526
|
}
|
|
528
527
|
|
|
529
528
|
function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
|
|
530
|
-
wasm.
|
|
529
|
+
wasm.closure830_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
531
530
|
}
|
|
532
531
|
|
|
533
532
|
function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
|
|
534
|
-
wasm.
|
|
533
|
+
wasm.closure834_externref_shim(arg0, arg1, arg2, arg3);
|
|
535
534
|
}
|
|
536
535
|
|
|
537
536
|
async function __wbg_load(module, imports) {
|
|
@@ -798,7 +797,7 @@ function __wbg_get_imports() {
|
|
|
798
797
|
return ret;
|
|
799
798
|
};
|
|
800
799
|
imports.wbg.__wbindgen_closure_wrapper739 = function(arg0, arg1, arg2) {
|
|
801
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
800
|
+
const ret = makeMutClosure(arg0, arg1, 266, __wbg_adapter_30);
|
|
802
801
|
return ret;
|
|
803
802
|
};
|
|
804
803
|
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,14 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const buildInfo: () => any;
|
|
4
5
|
export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
|
|
5
6
|
export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
|
|
6
7
|
export const executeProgram: (a: number, b: number, c: any, d: any) => any;
|
|
7
|
-
export const initLogLevel: (a: number, b: number) => [number, number];
|
|
8
8
|
export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
9
9
|
export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
10
10
|
export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
11
|
-
export const buildInfo: () => any;
|
|
12
11
|
export const and: (a: any, b: any) => any;
|
|
13
12
|
export const xor: (a: any, b: any) => any;
|
|
14
13
|
export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
@@ -19,6 +18,7 @@ export const compressWitness: (a: any) => [number, number, number, number];
|
|
|
19
18
|
export const decompressWitness: (a: number, b: number) => [number, number, number];
|
|
20
19
|
export const compressWitnessStack: (a: any) => [number, number, number, number];
|
|
21
20
|
export const decompressWitnessStack: (a: number, b: number) => [number, number, number];
|
|
21
|
+
export const initLogLevel: (a: number, b: number) => [number, number];
|
|
22
22
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
23
23
|
export const __externref_table_alloc: () => number;
|
|
24
24
|
export const __wbindgen_export_2: WebAssembly.Table;
|
|
@@ -27,7 +27,7 @@ export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
|
27
27
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
28
28
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
29
29
|
export const __externref_table_dealloc: (a: number) => void;
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
30
|
+
export const closure265_externref_shim: (a: number, b: number, c: any) => void;
|
|
31
|
+
export const closure830_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
|
|
32
|
+
export const closure834_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
33
33
|
export const __wbindgen_start: () => void;
|