@noir-lang/acvm_js 0.47.0-e100017.nightly → 0.47.0-ef44270.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 +29 -29
- package/nodejs/acvm_js.js +57 -57
- package/nodejs/acvm_js_bg.wasm +0 -0
- package/nodejs/acvm_js_bg.wasm.d.ts +1 -1
- package/package.json +1 -1
- package/web/acvm_js.d.ts +30 -30
- package/web/acvm_js.js +53 -53
- package/web/acvm_js_bg.wasm +0 -0
- package/web/acvm_js_bg.wasm.d.ts +1 -1
package/nodejs/acvm_js.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* Sets the package's logging level.
|
|
5
|
+
*
|
|
6
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
7
|
+
*/
|
|
8
|
+
export function initLogLevel(filter: string): void;
|
|
9
|
+
/**
|
|
4
10
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
5
11
|
*
|
|
6
12
|
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
@@ -62,12 +68,6 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
|
|
|
62
68
|
*/
|
|
63
69
|
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
64
70
|
/**
|
|
65
|
-
* Sets the package's logging level.
|
|
66
|
-
*
|
|
67
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
68
|
-
*/
|
|
69
|
-
export function initLogLevel(filter: string): void;
|
|
70
|
-
/**
|
|
71
71
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
72
72
|
* @param {string} lhs
|
|
73
73
|
* @param {string} rhs
|
|
@@ -152,6 +152,29 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
|
152
152
|
*/
|
|
153
153
|
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
154
154
|
|
|
155
|
+
export type ForeignCallInput = string[]
|
|
156
|
+
export type ForeignCallOutput = string | string[]
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* A callback which performs an foreign call and returns the response.
|
|
160
|
+
* @callback ForeignCallHandler
|
|
161
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
162
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
163
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
164
|
+
*/
|
|
165
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
export type StackItem = {
|
|
170
|
+
index: number;
|
|
171
|
+
witness: WitnessMap;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type WitnessStack = Array<StackItem>;
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
155
178
|
export type RawAssertionPayload = {
|
|
156
179
|
selector: string;
|
|
157
180
|
data: string[];
|
|
@@ -178,29 +201,6 @@ export type SolvedAndReturnWitness = {
|
|
|
178
201
|
|
|
179
202
|
|
|
180
203
|
|
|
181
|
-
export type StackItem = {
|
|
182
|
-
index: number;
|
|
183
|
-
witness: WitnessMap;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export type WitnessStack = Array<StackItem>;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
export type ForeignCallInput = string[]
|
|
191
|
-
export type ForeignCallOutput = string | string[]
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* A callback which performs an foreign call and returns the response.
|
|
195
|
-
* @callback ForeignCallHandler
|
|
196
|
-
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
197
|
-
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
198
|
-
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
199
|
-
*/
|
|
200
|
-
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
204
|
/**
|
|
205
205
|
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
206
206
|
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
package/nodejs/acvm_js.js
CHANGED
|
@@ -23,6 +23,15 @@ function takeObject(idx) {
|
|
|
23
23
|
return ret;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
function addHeapObject(obj) {
|
|
27
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
28
|
+
const idx = heap_next;
|
|
29
|
+
heap_next = heap[idx];
|
|
30
|
+
|
|
31
|
+
heap[idx] = obj;
|
|
32
|
+
return idx;
|
|
33
|
+
}
|
|
34
|
+
|
|
26
35
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
27
36
|
|
|
28
37
|
cachedTextDecoder.decode();
|
|
@@ -41,15 +50,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
41
50
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
42
51
|
}
|
|
43
52
|
|
|
44
|
-
function addHeapObject(obj) {
|
|
45
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
46
|
-
const idx = heap_next;
|
|
47
|
-
heap_next = heap[idx];
|
|
48
|
-
|
|
49
|
-
heap[idx] = obj;
|
|
50
|
-
return idx;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
53
|
let WASM_VECTOR_LEN = 0;
|
|
54
54
|
|
|
55
55
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -220,6 +220,27 @@ function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
|
220
220
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380(arg0, arg1, addHeapObject(arg2));
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
/**
|
|
224
|
+
* Sets the package's logging level.
|
|
225
|
+
*
|
|
226
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
227
|
+
*/
|
|
228
|
+
module.exports.initLogLevel = function(filter) {
|
|
229
|
+
try {
|
|
230
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
231
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
232
|
+
const len0 = WASM_VECTOR_LEN;
|
|
233
|
+
wasm.initLogLevel(retptr, ptr0, len0);
|
|
234
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
235
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
236
|
+
if (r1) {
|
|
237
|
+
throw takeObject(r0);
|
|
238
|
+
}
|
|
239
|
+
} finally {
|
|
240
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
|
|
223
244
|
function passArray8ToWasm0(arg, malloc) {
|
|
224
245
|
const ptr = malloc(arg.length * 1) >>> 0;
|
|
225
246
|
getUint8Memory0().set(arg, ptr / 1);
|
|
@@ -356,27 +377,6 @@ module.exports.getPublicWitness = function(program, solved_witness) {
|
|
|
356
377
|
}
|
|
357
378
|
};
|
|
358
379
|
|
|
359
|
-
/**
|
|
360
|
-
* Sets the package's logging level.
|
|
361
|
-
*
|
|
362
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
363
|
-
*/
|
|
364
|
-
module.exports.initLogLevel = function(filter) {
|
|
365
|
-
try {
|
|
366
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
367
|
-
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
368
|
-
const len0 = WASM_VECTOR_LEN;
|
|
369
|
-
wasm.initLogLevel(retptr, ptr0, len0);
|
|
370
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
371
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
372
|
-
if (r1) {
|
|
373
|
-
throw takeObject(r0);
|
|
374
|
-
}
|
|
375
|
-
} finally {
|
|
376
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
|
|
380
380
|
/**
|
|
381
381
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
382
382
|
* @param {string} lhs
|
|
@@ -635,14 +635,29 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
635
635
|
takeObject(arg0);
|
|
636
636
|
};
|
|
637
637
|
|
|
638
|
-
module.exports.
|
|
639
|
-
const
|
|
638
|
+
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
639
|
+
const obj = takeObject(arg0).original;
|
|
640
|
+
if (obj.cnt-- == 1) {
|
|
641
|
+
obj.a = 0;
|
|
642
|
+
return true;
|
|
643
|
+
}
|
|
644
|
+
const ret = false;
|
|
645
|
+
return ret;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
module.exports.__wbg_new_f139361aad331bd0 = function() {
|
|
649
|
+
const ret = new Array();
|
|
640
650
|
return addHeapObject(ret);
|
|
641
651
|
};
|
|
642
652
|
|
|
643
|
-
module.exports.
|
|
644
|
-
const ret =
|
|
645
|
-
return ret;
|
|
653
|
+
module.exports.__wbindgen_number_new = function(arg0) {
|
|
654
|
+
const ret = arg0;
|
|
655
|
+
return addHeapObject(ret);
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
659
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
660
|
+
return addHeapObject(ret);
|
|
646
661
|
};
|
|
647
662
|
|
|
648
663
|
module.exports.__wbg_constructor_971e67e66cc5bd6a = function(arg0) {
|
|
@@ -650,13 +665,13 @@ module.exports.__wbg_constructor_971e67e66cc5bd6a = function(arg0) {
|
|
|
650
665
|
return addHeapObject(ret);
|
|
651
666
|
};
|
|
652
667
|
|
|
653
|
-
module.exports.
|
|
654
|
-
const ret =
|
|
655
|
-
return
|
|
668
|
+
module.exports.__wbindgen_is_array = function(arg0) {
|
|
669
|
+
const ret = Array.isArray(getObject(arg0));
|
|
670
|
+
return ret;
|
|
656
671
|
};
|
|
657
672
|
|
|
658
|
-
module.exports.
|
|
659
|
-
const ret =
|
|
673
|
+
module.exports.__wbg_new_193bac1dd2be232d = function() {
|
|
674
|
+
const ret = new Map();
|
|
660
675
|
return addHeapObject(ret);
|
|
661
676
|
};
|
|
662
677
|
|
|
@@ -681,21 +696,6 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
681
696
|
return ret;
|
|
682
697
|
};
|
|
683
698
|
|
|
684
|
-
module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
685
|
-
const obj = takeObject(arg0).original;
|
|
686
|
-
if (obj.cnt-- == 1) {
|
|
687
|
-
obj.a = 0;
|
|
688
|
-
return true;
|
|
689
|
-
}
|
|
690
|
-
const ret = false;
|
|
691
|
-
return ret;
|
|
692
|
-
};
|
|
693
|
-
|
|
694
|
-
module.exports.__wbg_new_f139361aad331bd0 = function() {
|
|
695
|
-
const ret = new Array();
|
|
696
|
-
return addHeapObject(ret);
|
|
697
|
-
};
|
|
698
|
-
|
|
699
699
|
module.exports.__wbg_new_abda76e883ba8a5f = function() {
|
|
700
700
|
const ret = new Error();
|
|
701
701
|
return addHeapObject(ret);
|
|
@@ -914,8 +914,8 @@ module.exports.__wbindgen_throw = function(arg0, arg1) {
|
|
|
914
914
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
915
915
|
};
|
|
916
916
|
|
|
917
|
-
module.exports.
|
|
918
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
917
|
+
module.exports.__wbindgen_closure_wrapper743 = function(arg0, arg1, arg2) {
|
|
918
|
+
const ret = makeMutClosure(arg0, arg1, 241, __wbg_adapter_22);
|
|
919
919
|
return addHeapObject(ret);
|
|
920
920
|
};
|
|
921
921
|
|
package/nodejs/acvm_js_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export function initLogLevel(a: number, b: number, c: number): void;
|
|
4
5
|
export function executeCircuit(a: number, b: number, c: number, d: number): number;
|
|
5
6
|
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
|
|
6
7
|
export function executeProgram(a: number, b: number, c: number, d: number): number;
|
|
7
8
|
export function getReturnWitness(a: number, b: number, c: number, d: number): void;
|
|
8
9
|
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
|
|
9
10
|
export function getPublicWitness(a: number, b: number, c: number, d: number): void;
|
|
10
|
-
export function initLogLevel(a: number, b: number, c: number): void;
|
|
11
11
|
export function and(a: number, b: number): number;
|
|
12
12
|
export function xor(a: number, b: number): number;
|
|
13
13
|
export function sha256(a: number, b: number, c: number): void;
|
package/package.json
CHANGED
package/web/acvm_js.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* Sets the package's logging level.
|
|
5
|
+
*
|
|
6
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
7
|
+
*/
|
|
8
|
+
export function initLogLevel(filter: string): void;
|
|
9
|
+
/**
|
|
4
10
|
* Executes an ACIR circuit to generate the solved witness from the initial witness.
|
|
5
11
|
*
|
|
6
12
|
* @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
|
|
@@ -62,12 +68,6 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
|
|
|
62
68
|
*/
|
|
63
69
|
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
64
70
|
/**
|
|
65
|
-
* Sets the package's logging level.
|
|
66
|
-
*
|
|
67
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
68
|
-
*/
|
|
69
|
-
export function initLogLevel(filter: string): void;
|
|
70
|
-
/**
|
|
71
71
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
72
72
|
* @param {string} lhs
|
|
73
73
|
* @param {string} rhs
|
|
@@ -152,6 +152,29 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
|
|
|
152
152
|
*/
|
|
153
153
|
export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
|
|
154
154
|
|
|
155
|
+
export type ForeignCallInput = string[]
|
|
156
|
+
export type ForeignCallOutput = string | string[]
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* A callback which performs an foreign call and returns the response.
|
|
160
|
+
* @callback ForeignCallHandler
|
|
161
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
162
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
163
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
164
|
+
*/
|
|
165
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
export type StackItem = {
|
|
170
|
+
index: number;
|
|
171
|
+
witness: WitnessMap;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type WitnessStack = Array<StackItem>;
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
155
178
|
export type RawAssertionPayload = {
|
|
156
179
|
selector: string;
|
|
157
180
|
data: string[];
|
|
@@ -178,29 +201,6 @@ export type SolvedAndReturnWitness = {
|
|
|
178
201
|
|
|
179
202
|
|
|
180
203
|
|
|
181
|
-
export type StackItem = {
|
|
182
|
-
index: number;
|
|
183
|
-
witness: WitnessMap;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export type WitnessStack = Array<StackItem>;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
export type ForeignCallInput = string[]
|
|
191
|
-
export type ForeignCallOutput = string | string[]
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* A callback which performs an foreign call and returns the response.
|
|
195
|
-
* @callback ForeignCallHandler
|
|
196
|
-
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
197
|
-
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
198
|
-
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
199
|
-
*/
|
|
200
|
-
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
204
|
/**
|
|
205
205
|
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
206
206
|
* @property {string} gitHash - The hash of the git commit from which the package was built.
|
|
@@ -219,13 +219,13 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
219
219
|
|
|
220
220
|
export interface InitOutput {
|
|
221
221
|
readonly memory: WebAssembly.Memory;
|
|
222
|
+
readonly initLogLevel: (a: number, b: number, c: number) => void;
|
|
222
223
|
readonly executeCircuit: (a: number, b: number, c: number, d: number) => number;
|
|
223
224
|
readonly executeCircuitWithReturnWitness: (a: number, b: number, c: number, d: number) => number;
|
|
224
225
|
readonly executeProgram: (a: number, b: number, c: number, d: number) => number;
|
|
225
226
|
readonly getReturnWitness: (a: number, b: number, c: number, d: number) => void;
|
|
226
227
|
readonly getPublicParametersWitness: (a: number, b: number, c: number, d: number) => void;
|
|
227
228
|
readonly getPublicWitness: (a: number, b: number, c: number, d: number) => void;
|
|
228
|
-
readonly initLogLevel: (a: number, b: number, c: number) => void;
|
|
229
229
|
readonly and: (a: number, b: number) => number;
|
|
230
230
|
readonly xor: (a: number, b: number) => number;
|
|
231
231
|
readonly sha256: (a: number, b: number, c: number) => void;
|
package/web/acvm_js.js
CHANGED
|
@@ -20,6 +20,15 @@ function takeObject(idx) {
|
|
|
20
20
|
return ret;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
function addHeapObject(obj) {
|
|
24
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
25
|
+
const idx = heap_next;
|
|
26
|
+
heap_next = heap[idx];
|
|
27
|
+
|
|
28
|
+
heap[idx] = obj;
|
|
29
|
+
return idx;
|
|
30
|
+
}
|
|
31
|
+
|
|
23
32
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
24
33
|
|
|
25
34
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
@@ -38,15 +47,6 @@ function getStringFromWasm0(ptr, len) {
|
|
|
38
47
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
39
48
|
}
|
|
40
49
|
|
|
41
|
-
function addHeapObject(obj) {
|
|
42
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
43
|
-
const idx = heap_next;
|
|
44
|
-
heap_next = heap[idx];
|
|
45
|
-
|
|
46
|
-
heap[idx] = obj;
|
|
47
|
-
return idx;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
50
|
let WASM_VECTOR_LEN = 0;
|
|
51
51
|
|
|
52
52
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
@@ -217,6 +217,27 @@ function __wbg_adapter_22(arg0, arg1, arg2) {
|
|
|
217
217
|
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h36bac5ff3ea3c380(arg0, arg1, addHeapObject(arg2));
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Sets the package's logging level.
|
|
222
|
+
*
|
|
223
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
224
|
+
*/
|
|
225
|
+
export function initLogLevel(filter) {
|
|
226
|
+
try {
|
|
227
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
228
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
229
|
+
const len0 = WASM_VECTOR_LEN;
|
|
230
|
+
wasm.initLogLevel(retptr, ptr0, len0);
|
|
231
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
232
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
233
|
+
if (r1) {
|
|
234
|
+
throw takeObject(r0);
|
|
235
|
+
}
|
|
236
|
+
} finally {
|
|
237
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
220
241
|
function passArray8ToWasm0(arg, malloc) {
|
|
221
242
|
const ptr = malloc(arg.length * 1) >>> 0;
|
|
222
243
|
getUint8Memory0().set(arg, ptr / 1);
|
|
@@ -353,27 +374,6 @@ export function getPublicWitness(program, solved_witness) {
|
|
|
353
374
|
}
|
|
354
375
|
}
|
|
355
376
|
|
|
356
|
-
/**
|
|
357
|
-
* Sets the package's logging level.
|
|
358
|
-
*
|
|
359
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
360
|
-
*/
|
|
361
|
-
export function initLogLevel(filter) {
|
|
362
|
-
try {
|
|
363
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
364
|
-
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
365
|
-
const len0 = WASM_VECTOR_LEN;
|
|
366
|
-
wasm.initLogLevel(retptr, ptr0, len0);
|
|
367
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
368
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
369
|
-
if (r1) {
|
|
370
|
-
throw takeObject(r0);
|
|
371
|
-
}
|
|
372
|
-
} finally {
|
|
373
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
|
|
377
377
|
/**
|
|
378
378
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
379
379
|
* @param {string} lhs
|
|
@@ -665,26 +665,39 @@ function __wbg_get_imports() {
|
|
|
665
665
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
666
666
|
takeObject(arg0);
|
|
667
667
|
};
|
|
668
|
+
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
669
|
+
const obj = takeObject(arg0).original;
|
|
670
|
+
if (obj.cnt-- == 1) {
|
|
671
|
+
obj.a = 0;
|
|
672
|
+
return true;
|
|
673
|
+
}
|
|
674
|
+
const ret = false;
|
|
675
|
+
return ret;
|
|
676
|
+
};
|
|
677
|
+
imports.wbg.__wbg_new_f139361aad331bd0 = function() {
|
|
678
|
+
const ret = new Array();
|
|
679
|
+
return addHeapObject(ret);
|
|
680
|
+
};
|
|
681
|
+
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
682
|
+
const ret = arg0;
|
|
683
|
+
return addHeapObject(ret);
|
|
684
|
+
};
|
|
668
685
|
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
669
686
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
670
687
|
return addHeapObject(ret);
|
|
671
688
|
};
|
|
672
|
-
imports.wbg.__wbindgen_is_array = function(arg0) {
|
|
673
|
-
const ret = Array.isArray(getObject(arg0));
|
|
674
|
-
return ret;
|
|
675
|
-
};
|
|
676
689
|
imports.wbg.__wbg_constructor_971e67e66cc5bd6a = function(arg0) {
|
|
677
690
|
const ret = new Error(takeObject(arg0));
|
|
678
691
|
return addHeapObject(ret);
|
|
679
692
|
};
|
|
693
|
+
imports.wbg.__wbindgen_is_array = function(arg0) {
|
|
694
|
+
const ret = Array.isArray(getObject(arg0));
|
|
695
|
+
return ret;
|
|
696
|
+
};
|
|
680
697
|
imports.wbg.__wbg_new_193bac1dd2be232d = function() {
|
|
681
698
|
const ret = new Map();
|
|
682
699
|
return addHeapObject(ret);
|
|
683
700
|
};
|
|
684
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
685
|
-
const ret = arg0;
|
|
686
|
-
return addHeapObject(ret);
|
|
687
|
-
};
|
|
688
701
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
689
702
|
const obj = getObject(arg1);
|
|
690
703
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -703,19 +716,6 @@ function __wbg_get_imports() {
|
|
|
703
716
|
const ret = typeof(getObject(arg0)) === 'string';
|
|
704
717
|
return ret;
|
|
705
718
|
};
|
|
706
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
707
|
-
const obj = takeObject(arg0).original;
|
|
708
|
-
if (obj.cnt-- == 1) {
|
|
709
|
-
obj.a = 0;
|
|
710
|
-
return true;
|
|
711
|
-
}
|
|
712
|
-
const ret = false;
|
|
713
|
-
return ret;
|
|
714
|
-
};
|
|
715
|
-
imports.wbg.__wbg_new_f139361aad331bd0 = function() {
|
|
716
|
-
const ret = new Array();
|
|
717
|
-
return addHeapObject(ret);
|
|
718
|
-
};
|
|
719
719
|
imports.wbg.__wbg_new_abda76e883ba8a5f = function() {
|
|
720
720
|
const ret = new Error();
|
|
721
721
|
return addHeapObject(ret);
|
|
@@ -899,8 +899,8 @@ function __wbg_get_imports() {
|
|
|
899
899
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
900
900
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
901
901
|
};
|
|
902
|
-
imports.wbg.
|
|
903
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
902
|
+
imports.wbg.__wbindgen_closure_wrapper743 = function(arg0, arg1, arg2) {
|
|
903
|
+
const ret = makeMutClosure(arg0, arg1, 241, __wbg_adapter_22);
|
|
904
904
|
return addHeapObject(ret);
|
|
905
905
|
};
|
|
906
906
|
|
package/web/acvm_js_bg.wasm
CHANGED
|
Binary file
|
package/web/acvm_js_bg.wasm.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export function initLogLevel(a: number, b: number, c: number): void;
|
|
4
5
|
export function executeCircuit(a: number, b: number, c: number, d: number): number;
|
|
5
6
|
export function executeCircuitWithReturnWitness(a: number, b: number, c: number, d: number): number;
|
|
6
7
|
export function executeProgram(a: number, b: number, c: number, d: number): number;
|
|
7
8
|
export function getReturnWitness(a: number, b: number, c: number, d: number): void;
|
|
8
9
|
export function getPublicParametersWitness(a: number, b: number, c: number, d: number): void;
|
|
9
10
|
export function getPublicWitness(a: number, b: number, c: number, d: number): void;
|
|
10
|
-
export function initLogLevel(a: number, b: number, c: number): void;
|
|
11
11
|
export function and(a: number, b: number): number;
|
|
12
12
|
export function xor(a: number, b: number): number;
|
|
13
13
|
export function sha256(a: number, b: number, c: number): void;
|