@aztec/noir-acvm_js 1.2.0 → 2.0.0-nightly.20250813
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 +40 -40
- package/nodejs/acvm_js.js +42 -42
- 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 +45 -45
- package/web/acvm_js.js +41 -41
- 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,16 +1,5 @@
|
|
|
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;
|
|
8
|
-
/**
|
|
9
|
-
* Sets the package's logging level.
|
|
10
|
-
*
|
|
11
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
12
|
-
*/
|
|
13
|
-
export function initLogLevel(filter: string): void;
|
|
14
3
|
/**
|
|
15
4
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
16
5
|
*/
|
|
@@ -35,6 +24,11 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
|
|
|
35
24
|
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
36
25
|
*/
|
|
37
26
|
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
29
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
30
|
+
*/
|
|
31
|
+
export function buildInfo(): BuildInfo;
|
|
38
32
|
/**
|
|
39
33
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
40
34
|
*
|
|
@@ -116,6 +110,21 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
|
|
|
116
110
|
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
117
111
|
*/
|
|
118
112
|
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
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
|
+
export type StackItem = {
|
|
121
|
+
index: number;
|
|
122
|
+
witness: WitnessMap;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type WitnessStack = Array<StackItem>;
|
|
126
|
+
|
|
127
|
+
|
|
119
128
|
|
|
120
129
|
/**
|
|
121
130
|
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
@@ -131,17 +140,17 @@ export type BuildInfo = {
|
|
|
131
140
|
|
|
132
141
|
|
|
133
142
|
|
|
134
|
-
export type
|
|
135
|
-
|
|
136
|
-
data: string[];
|
|
137
|
-
};
|
|
143
|
+
export type ForeignCallInput = string[]
|
|
144
|
+
export type ForeignCallOutput = string | string[]
|
|
138
145
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
146
|
+
/**
|
|
147
|
+
* A callback which performs an foreign call and returns the response.
|
|
148
|
+
* @callback ForeignCallHandler
|
|
149
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
150
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
151
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
152
|
+
*/
|
|
153
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
145
154
|
|
|
146
155
|
|
|
147
156
|
|
|
@@ -160,25 +169,16 @@ export type SolvedAndReturnWitness = {
|
|
|
160
169
|
|
|
161
170
|
|
|
162
171
|
|
|
163
|
-
export type
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
* A callback which performs an foreign call and returns the response.
|
|
168
|
-
* @callback ForeignCallHandler
|
|
169
|
-
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
170
|
-
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
171
|
-
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
172
|
-
*/
|
|
173
|
-
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
export type StackItem = {
|
|
178
|
-
index: number;
|
|
179
|
-
witness: WitnessMap;
|
|
180
|
-
}
|
|
172
|
+
export type RawAssertionPayload = {
|
|
173
|
+
selector: string;
|
|
174
|
+
data: string[];
|
|
175
|
+
};
|
|
181
176
|
|
|
182
|
-
export type
|
|
177
|
+
export type ExecutionError = Error & {
|
|
178
|
+
callStack?: string[];
|
|
179
|
+
rawAssertionPayload?: RawAssertionPayload;
|
|
180
|
+
acirFunctionId?: number;
|
|
181
|
+
brilligFunctionId?: number;
|
|
182
|
+
};
|
|
183
183
|
|
|
184
184
|
|
package/nodejs/acvm_js.js
CHANGED
|
@@ -201,34 +201,6 @@ 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
|
-
};
|
|
212
|
-
|
|
213
|
-
function takeFromExternrefTable0(idx) {
|
|
214
|
-
const value = wasm.__wbindgen_export_2.get(idx);
|
|
215
|
-
wasm.__externref_table_dealloc(idx);
|
|
216
|
-
return value;
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Sets the package's logging level.
|
|
220
|
-
*
|
|
221
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
222
|
-
*/
|
|
223
|
-
module.exports.initLogLevel = function(filter) {
|
|
224
|
-
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
225
|
-
const len0 = WASM_VECTOR_LEN;
|
|
226
|
-
const ret = wasm.initLogLevel(ptr0, len0);
|
|
227
|
-
if (ret[1]) {
|
|
228
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
|
|
232
204
|
/**
|
|
233
205
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
234
206
|
* @param {string} lhs
|
|
@@ -355,6 +327,20 @@ module.exports.ecdsa_secp256r1_verify = function(hashed_msg, public_key_x_bytes,
|
|
|
355
327
|
return ret !== 0;
|
|
356
328
|
};
|
|
357
329
|
|
|
330
|
+
/**
|
|
331
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
332
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
333
|
+
*/
|
|
334
|
+
module.exports.buildInfo = function() {
|
|
335
|
+
const ret = wasm.buildInfo();
|
|
336
|
+
return ret;
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
function takeFromExternrefTable0(idx) {
|
|
340
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
341
|
+
wasm.__externref_table_dealloc(idx);
|
|
342
|
+
return value;
|
|
343
|
+
}
|
|
358
344
|
/**
|
|
359
345
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
360
346
|
*
|
|
@@ -526,16 +512,30 @@ module.exports.getPublicWitness = function(program, solved_witness) {
|
|
|
526
512
|
return takeFromExternrefTable0(ret[0]);
|
|
527
513
|
};
|
|
528
514
|
|
|
515
|
+
/**
|
|
516
|
+
* Sets the package's logging level.
|
|
517
|
+
*
|
|
518
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
519
|
+
*/
|
|
520
|
+
module.exports.initLogLevel = function(filter) {
|
|
521
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
522
|
+
const len0 = WASM_VECTOR_LEN;
|
|
523
|
+
const ret = wasm.initLogLevel(ptr0, len0);
|
|
524
|
+
if (ret[1]) {
|
|
525
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
|
|
529
529
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
530
|
-
wasm.
|
|
530
|
+
wasm.closure645_externref_shim(arg0, arg1, arg2);
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
|
|
534
|
-
wasm.
|
|
534
|
+
wasm.closure1317_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
|
|
538
|
-
wasm.
|
|
538
|
+
wasm.closure1321_externref_shim(arg0, arg1, arg2, arg3);
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
module.exports.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
@@ -553,12 +553,12 @@ module.exports.__wbg_call_833bed5770ea2041 = function() { return handleError(fun
|
|
|
553
553
|
return ret;
|
|
554
554
|
}, arguments) };
|
|
555
555
|
|
|
556
|
-
module.exports.
|
|
556
|
+
module.exports.__wbg_constructor_3bdba527a5bb7a7b = function(arg0) {
|
|
557
557
|
const ret = new Error(arg0);
|
|
558
558
|
return ret;
|
|
559
559
|
};
|
|
560
560
|
|
|
561
|
-
module.exports.
|
|
561
|
+
module.exports.__wbg_constructor_be6a5ff8707e88dc = function(arg0) {
|
|
562
562
|
const ret = new Error(arg0);
|
|
563
563
|
return ret;
|
|
564
564
|
};
|
|
@@ -679,11 +679,6 @@ module.exports.__wbg_new_5e0be73521bc8c17 = function() {
|
|
|
679
679
|
return ret;
|
|
680
680
|
};
|
|
681
681
|
|
|
682
|
-
module.exports.__wbg_new_63dcb8fa4e4ab11b = function() {
|
|
683
|
-
const ret = new Map();
|
|
684
|
-
return ret;
|
|
685
|
-
};
|
|
686
|
-
|
|
687
682
|
module.exports.__wbg_new_78feb108b6472713 = function() {
|
|
688
683
|
const ret = new Array();
|
|
689
684
|
return ret;
|
|
@@ -694,13 +689,18 @@ module.exports.__wbg_new_8a6f238a6ece86ea = function() {
|
|
|
694
689
|
return ret;
|
|
695
690
|
};
|
|
696
691
|
|
|
692
|
+
module.exports.__wbg_new_c06a0171106489b5 = function() {
|
|
693
|
+
const ret = new Array();
|
|
694
|
+
return ret;
|
|
695
|
+
};
|
|
696
|
+
|
|
697
697
|
module.exports.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
|
|
698
698
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
699
699
|
return ret;
|
|
700
700
|
};
|
|
701
701
|
|
|
702
|
-
module.exports.
|
|
703
|
-
const ret = new
|
|
702
|
+
module.exports.__wbg_new_f822c4e7d0972af6 = function() {
|
|
703
|
+
const ret = new Map();
|
|
704
704
|
return ret;
|
|
705
705
|
};
|
|
706
706
|
|
|
@@ -813,8 +813,8 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
813
813
|
return ret;
|
|
814
814
|
};
|
|
815
815
|
|
|
816
|
-
module.exports.
|
|
817
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
816
|
+
module.exports.__wbindgen_closure_wrapper2145 = function(arg0, arg1, arg2) {
|
|
817
|
+
const ret = makeMutClosure(arg0, arg1, 646, __wbg_adapter_30);
|
|
818
818
|
return ret;
|
|
819
819
|
};
|
|
820
820
|
|
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;
|
|
5
|
-
export const initLogLevel: (a: number, b: number) => [number, number];
|
|
6
4
|
export const and: (a: any, b: any) => any;
|
|
7
5
|
export const xor: (a: any, b: any) => any;
|
|
8
6
|
export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
9
7
|
export const blake2s256: (a: number, b: number) => [number, number];
|
|
10
8
|
export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
11
9
|
export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
10
|
+
export const buildInfo: () => any;
|
|
12
11
|
export const compressWitness: (a: any) => [number, number, number, number];
|
|
13
12
|
export const decompressWitness: (a: number, b: number) => [number, number, number];
|
|
14
13
|
export const compressWitnessStack: (a: any) => [number, number, number, number];
|
|
@@ -19,6 +18,7 @@ export const executeProgram: (a: number, b: number, c: any, d: any) => any;
|
|
|
19
18
|
export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
20
19
|
export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
21
20
|
export const getPublicWitness: (a: number, b: number, c: any) => [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 closure645_externref_shim: (a: number, b: number, c: any) => void;
|
|
31
|
+
export const closure1317_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
|
|
32
|
+
export const closure1321_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,16 +1,5 @@
|
|
|
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;
|
|
8
|
-
/**
|
|
9
|
-
* Sets the package's logging level.
|
|
10
|
-
*
|
|
11
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
12
|
-
*/
|
|
13
|
-
export function initLogLevel(filter: string): void;
|
|
14
3
|
/**
|
|
15
4
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
16
5
|
*/
|
|
@@ -35,6 +24,11 @@ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_byte
|
|
|
35
24
|
* Verifies a ECDSA signature over the secp256r1 curve.
|
|
36
25
|
*/
|
|
37
26
|
export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
29
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
30
|
+
*/
|
|
31
|
+
export function buildInfo(): BuildInfo;
|
|
38
32
|
/**
|
|
39
33
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
40
34
|
*
|
|
@@ -116,6 +110,21 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
|
|
|
116
110
|
* @returns {WitnessMap} A witness map containing the circuit's public inputs.
|
|
117
111
|
*/
|
|
118
112
|
export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
|
|
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
|
+
export type StackItem = {
|
|
121
|
+
index: number;
|
|
122
|
+
witness: WitnessMap;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type WitnessStack = Array<StackItem>;
|
|
126
|
+
|
|
127
|
+
|
|
119
128
|
|
|
120
129
|
/**
|
|
121
130
|
* @typedef {Object} BuildInfo - Information about how the installed package was built
|
|
@@ -131,17 +140,17 @@ export type BuildInfo = {
|
|
|
131
140
|
|
|
132
141
|
|
|
133
142
|
|
|
134
|
-
export type
|
|
135
|
-
|
|
136
|
-
data: string[];
|
|
137
|
-
};
|
|
143
|
+
export type ForeignCallInput = string[]
|
|
144
|
+
export type ForeignCallOutput = string | string[]
|
|
138
145
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
146
|
+
/**
|
|
147
|
+
* A callback which performs an foreign call and returns the response.
|
|
148
|
+
* @callback ForeignCallHandler
|
|
149
|
+
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
150
|
+
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
151
|
+
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
152
|
+
*/
|
|
153
|
+
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
145
154
|
|
|
146
155
|
|
|
147
156
|
|
|
@@ -160,26 +169,17 @@ export type SolvedAndReturnWitness = {
|
|
|
160
169
|
|
|
161
170
|
|
|
162
171
|
|
|
163
|
-
export type
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
* A callback which performs an foreign call and returns the response.
|
|
168
|
-
* @callback ForeignCallHandler
|
|
169
|
-
* @param {string} name - The identifier for the type of foreign call being performed.
|
|
170
|
-
* @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
|
|
171
|
-
* @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
|
|
172
|
-
*/
|
|
173
|
-
export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
export type StackItem = {
|
|
178
|
-
index: number;
|
|
179
|
-
witness: WitnessMap;
|
|
180
|
-
}
|
|
172
|
+
export type RawAssertionPayload = {
|
|
173
|
+
selector: string;
|
|
174
|
+
data: string[];
|
|
175
|
+
};
|
|
181
176
|
|
|
182
|
-
export type
|
|
177
|
+
export type ExecutionError = Error & {
|
|
178
|
+
callStack?: string[];
|
|
179
|
+
rawAssertionPayload?: RawAssertionPayload;
|
|
180
|
+
acirFunctionId?: number;
|
|
181
|
+
brilligFunctionId?: number;
|
|
182
|
+
};
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
|
|
@@ -187,14 +187,13 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
187
187
|
|
|
188
188
|
export interface InitOutput {
|
|
189
189
|
readonly memory: WebAssembly.Memory;
|
|
190
|
-
readonly buildInfo: () => any;
|
|
191
|
-
readonly initLogLevel: (a: number, b: number) => [number, number];
|
|
192
190
|
readonly and: (a: any, b: any) => any;
|
|
193
191
|
readonly xor: (a: any, b: any) => any;
|
|
194
192
|
readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
195
193
|
readonly blake2s256: (a: number, b: number) => [number, number];
|
|
196
194
|
readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
197
195
|
readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
196
|
+
readonly buildInfo: () => any;
|
|
198
197
|
readonly compressWitness: (a: any) => [number, number, number, number];
|
|
199
198
|
readonly decompressWitness: (a: number, b: number) => [number, number, number];
|
|
200
199
|
readonly compressWitnessStack: (a: any) => [number, number, number, number];
|
|
@@ -205,6 +204,7 @@ export interface InitOutput {
|
|
|
205
204
|
readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
206
205
|
readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
207
206
|
readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
207
|
+
readonly initLogLevel: (a: number, b: number) => [number, number];
|
|
208
208
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
209
209
|
readonly __externref_table_alloc: () => number;
|
|
210
210
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
|
@@ -213,9 +213,9 @@ export interface InitOutput {
|
|
|
213
213
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
214
214
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
215
215
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
216
|
-
readonly
|
|
217
|
-
readonly
|
|
218
|
-
readonly
|
|
216
|
+
readonly closure645_externref_shim: (a: number, b: number, c: any) => void;
|
|
217
|
+
readonly closure1317_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
|
|
218
|
+
readonly closure1321_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
|
@@ -197,34 +197,6 @@ 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
|
-
}
|
|
208
|
-
|
|
209
|
-
function takeFromExternrefTable0(idx) {
|
|
210
|
-
const value = wasm.__wbindgen_export_2.get(idx);
|
|
211
|
-
wasm.__externref_table_dealloc(idx);
|
|
212
|
-
return value;
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Sets the package's logging level.
|
|
216
|
-
*
|
|
217
|
-
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
218
|
-
*/
|
|
219
|
-
export function initLogLevel(filter) {
|
|
220
|
-
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
221
|
-
const len0 = WASM_VECTOR_LEN;
|
|
222
|
-
const ret = wasm.initLogLevel(ptr0, len0);
|
|
223
|
-
if (ret[1]) {
|
|
224
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
200
|
/**
|
|
229
201
|
* Performs a bitwise AND operation between `lhs` and `rhs`
|
|
230
202
|
* @param {string} lhs
|
|
@@ -351,6 +323,20 @@ export function ecdsa_secp256r1_verify(hashed_msg, public_key_x_bytes, public_ke
|
|
|
351
323
|
return ret !== 0;
|
|
352
324
|
}
|
|
353
325
|
|
|
326
|
+
/**
|
|
327
|
+
* Returns the `BuildInfo` object containing information about how the installed package was built.
|
|
328
|
+
* @returns {BuildInfo} - Information on how the installed package was built.
|
|
329
|
+
*/
|
|
330
|
+
export function buildInfo() {
|
|
331
|
+
const ret = wasm.buildInfo();
|
|
332
|
+
return ret;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function takeFromExternrefTable0(idx) {
|
|
336
|
+
const value = wasm.__wbindgen_export_2.get(idx);
|
|
337
|
+
wasm.__externref_table_dealloc(idx);
|
|
338
|
+
return value;
|
|
339
|
+
}
|
|
354
340
|
/**
|
|
355
341
|
* Compresses a `WitnessMap` into the binary format outputted by Nargo.
|
|
356
342
|
*
|
|
@@ -522,16 +508,30 @@ export function getPublicWitness(program, solved_witness) {
|
|
|
522
508
|
return takeFromExternrefTable0(ret[0]);
|
|
523
509
|
}
|
|
524
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Sets the package's logging level.
|
|
513
|
+
*
|
|
514
|
+
* @param {LogLevel} level - The maximum level of logging to be emitted.
|
|
515
|
+
*/
|
|
516
|
+
export function initLogLevel(filter) {
|
|
517
|
+
const ptr0 = passStringToWasm0(filter, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
518
|
+
const len0 = WASM_VECTOR_LEN;
|
|
519
|
+
const ret = wasm.initLogLevel(ptr0, len0);
|
|
520
|
+
if (ret[1]) {
|
|
521
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
525
|
function __wbg_adapter_30(arg0, arg1, arg2) {
|
|
526
|
-
wasm.
|
|
526
|
+
wasm.closure645_externref_shim(arg0, arg1, arg2);
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
function __wbg_adapter_89(arg0, arg1, arg2, arg3, arg4) {
|
|
530
|
-
wasm.
|
|
530
|
+
wasm.closure1317_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
function __wbg_adapter_110(arg0, arg1, arg2, arg3) {
|
|
534
|
-
wasm.
|
|
534
|
+
wasm.closure1321_externref_shim(arg0, arg1, arg2, arg3);
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
async function __wbg_load(module, imports) {
|
|
@@ -580,11 +580,11 @@ function __wbg_get_imports() {
|
|
|
580
580
|
const ret = arg0.call(arg1, arg2, arg3);
|
|
581
581
|
return ret;
|
|
582
582
|
}, arguments) };
|
|
583
|
-
imports.wbg.
|
|
583
|
+
imports.wbg.__wbg_constructor_3bdba527a5bb7a7b = function(arg0) {
|
|
584
584
|
const ret = new Error(arg0);
|
|
585
585
|
return ret;
|
|
586
586
|
};
|
|
587
|
-
imports.wbg.
|
|
587
|
+
imports.wbg.__wbg_constructor_be6a5ff8707e88dc = function(arg0) {
|
|
588
588
|
const ret = new Error(arg0);
|
|
589
589
|
return ret;
|
|
590
590
|
};
|
|
@@ -689,10 +689,6 @@ function __wbg_get_imports() {
|
|
|
689
689
|
const ret = new Map();
|
|
690
690
|
return ret;
|
|
691
691
|
};
|
|
692
|
-
imports.wbg.__wbg_new_63dcb8fa4e4ab11b = function() {
|
|
693
|
-
const ret = new Map();
|
|
694
|
-
return ret;
|
|
695
|
-
};
|
|
696
692
|
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
697
693
|
const ret = new Array();
|
|
698
694
|
return ret;
|
|
@@ -701,12 +697,16 @@ function __wbg_get_imports() {
|
|
|
701
697
|
const ret = new Error();
|
|
702
698
|
return ret;
|
|
703
699
|
};
|
|
700
|
+
imports.wbg.__wbg_new_c06a0171106489b5 = function() {
|
|
701
|
+
const ret = new Array();
|
|
702
|
+
return ret;
|
|
703
|
+
};
|
|
704
704
|
imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
|
|
705
705
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
706
706
|
return ret;
|
|
707
707
|
};
|
|
708
|
-
imports.wbg.
|
|
709
|
-
const ret = new
|
|
708
|
+
imports.wbg.__wbg_new_f822c4e7d0972af6 = function() {
|
|
709
|
+
const ret = new Map();
|
|
710
710
|
return ret;
|
|
711
711
|
};
|
|
712
712
|
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
@@ -797,8 +797,8 @@ function __wbg_get_imports() {
|
|
|
797
797
|
const ret = false;
|
|
798
798
|
return ret;
|
|
799
799
|
};
|
|
800
|
-
imports.wbg.
|
|
801
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
800
|
+
imports.wbg.__wbindgen_closure_wrapper2145 = function(arg0, arg1, arg2) {
|
|
801
|
+
const ret = makeMutClosure(arg0, arg1, 646, __wbg_adapter_30);
|
|
802
802
|
return ret;
|
|
803
803
|
};
|
|
804
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,14 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const buildInfo: () => any;
|
|
5
|
-
export const initLogLevel: (a: number, b: number) => [number, number];
|
|
6
4
|
export const and: (a: any, b: any) => any;
|
|
7
5
|
export const xor: (a: any, b: any) => any;
|
|
8
6
|
export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
|
|
9
7
|
export const blake2s256: (a: number, b: number) => [number, number];
|
|
10
8
|
export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
11
9
|
export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
10
|
+
export const buildInfo: () => any;
|
|
12
11
|
export const compressWitness: (a: any) => [number, number, number, number];
|
|
13
12
|
export const decompressWitness: (a: number, b: number) => [number, number, number];
|
|
14
13
|
export const compressWitnessStack: (a: any) => [number, number, number, number];
|
|
@@ -19,6 +18,7 @@ export const executeProgram: (a: number, b: number, c: any, d: any) => any;
|
|
|
19
18
|
export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
20
19
|
export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
|
|
21
20
|
export const getPublicWitness: (a: number, b: number, c: any) => [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 closure645_externref_shim: (a: number, b: number, c: any) => void;
|
|
31
|
+
export const closure1317_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
|
|
32
|
+
export const closure1321_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
33
33
|
export const __wbindgen_start: () => void;
|