@noir-lang/noir_wasm 0.18.0-2c9fe26.nightly → 0.18.0-56ee9e3.aztec
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/noir_wasm.d.ts +41 -10
- package/nodejs/noir_wasm.js +25 -20
- package/nodejs/noir_wasm_bg.wasm +0 -0
- package/nodejs/noir_wasm_bg.wasm.d.ts +2 -2
- package/package.json +2 -2
- package/web/noir_wasm.d.ts +43 -12
- package/web/noir_wasm.js +24 -20
- package/web/noir_wasm_bg.wasm +0 -0
- package/web/noir_wasm_bg.wasm.d.ts +2 -2
package/nodejs/noir_wasm.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* @param {string} level
|
|
5
|
+
*/
|
|
6
|
+
export function init_log_level(level: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* @returns {any}
|
|
9
|
+
*/
|
|
10
|
+
export function build_info(): any;
|
|
11
|
+
/**
|
|
4
12
|
* @param {Uint8Array} bytes
|
|
5
13
|
* @returns {any}
|
|
6
14
|
*/
|
|
@@ -14,17 +22,9 @@ export function acir_write_bytes(acir: any): Uint8Array;
|
|
|
14
22
|
* @param {string} entry_point
|
|
15
23
|
* @param {boolean | undefined} contracts
|
|
16
24
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
17
|
-
* @returns {
|
|
18
|
-
*/
|
|
19
|
-
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any;
|
|
20
|
-
/**
|
|
21
|
-
* @param {string} level
|
|
22
|
-
*/
|
|
23
|
-
export function init_log_level(level: string): void;
|
|
24
|
-
/**
|
|
25
|
-
* @returns {any}
|
|
25
|
+
* @returns {CompileResult}
|
|
26
26
|
*/
|
|
27
|
-
export function
|
|
27
|
+
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): CompileResult;
|
|
28
28
|
|
|
29
29
|
export type Diagnostic = {
|
|
30
30
|
message: string;
|
|
@@ -48,4 +48,35 @@ export type DependencyGraph = {
|
|
|
48
48
|
library_dependencies: Readonly<Record<string, readonly string[]>>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
export type CompiledContract = {
|
|
52
|
+
noir_version: string;
|
|
53
|
+
name: string;
|
|
54
|
+
backend: string;
|
|
55
|
+
functions: Array<any>;
|
|
56
|
+
events: Array<any>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type CompiledProgram = {
|
|
60
|
+
noir_version: string;
|
|
61
|
+
backend: string;
|
|
62
|
+
abi: any;
|
|
63
|
+
bytecode: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type DebugArtifact = {
|
|
67
|
+
debug_symbols: Array<any>;
|
|
68
|
+
file_map: Record<number, any>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type CompileResult = (
|
|
72
|
+
| {
|
|
73
|
+
contract: CompiledContract;
|
|
74
|
+
debug: DebugArtifact;
|
|
75
|
+
}
|
|
76
|
+
| {
|
|
77
|
+
program: CompiledProgram;
|
|
78
|
+
debug: DebugArtifact;
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
|
|
51
82
|
|
package/nodejs/noir_wasm.js
CHANGED
|
@@ -183,6 +183,22 @@ function debugString(val) {
|
|
|
183
183
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
184
184
|
return className;
|
|
185
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* @param {string} level
|
|
188
|
+
*/
|
|
189
|
+
module.exports.init_log_level = function(level) {
|
|
190
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
191
|
+
const len0 = WASM_VECTOR_LEN;
|
|
192
|
+
wasm.init_log_level(ptr0, len0);
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @returns {any}
|
|
197
|
+
*/
|
|
198
|
+
module.exports.build_info = function() {
|
|
199
|
+
const ret = wasm.build_info();
|
|
200
|
+
return takeObject(ret);
|
|
201
|
+
};
|
|
186
202
|
|
|
187
203
|
function passArray8ToWasm0(arg, malloc) {
|
|
188
204
|
const ptr = malloc(arg.length * 1) >>> 0;
|
|
@@ -227,7 +243,7 @@ module.exports.acir_write_bytes = function(acir) {
|
|
|
227
243
|
* @param {string} entry_point
|
|
228
244
|
* @param {boolean | undefined} contracts
|
|
229
245
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
230
|
-
* @returns {
|
|
246
|
+
* @returns {CompileResult}
|
|
231
247
|
*/
|
|
232
248
|
module.exports.compile = function(entry_point, contracts, dependency_graph) {
|
|
233
249
|
try {
|
|
@@ -254,35 +270,24 @@ function handleError(f, args) {
|
|
|
254
270
|
wasm.__wbindgen_export_3(addHeapObject(e));
|
|
255
271
|
}
|
|
256
272
|
}
|
|
257
|
-
/**
|
|
258
|
-
* @param {string} level
|
|
259
|
-
*/
|
|
260
|
-
module.exports.init_log_level = function(level) {
|
|
261
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
262
|
-
const len0 = WASM_VECTOR_LEN;
|
|
263
|
-
wasm.init_log_level(ptr0, len0);
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* @returns {any}
|
|
268
|
-
*/
|
|
269
|
-
module.exports.build_info = function() {
|
|
270
|
-
const ret = wasm.build_info();
|
|
271
|
-
return takeObject(ret);
|
|
272
|
-
};
|
|
273
273
|
|
|
274
274
|
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
275
275
|
takeObject(arg0);
|
|
276
276
|
};
|
|
277
277
|
|
|
278
|
+
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
279
|
+
const ret = getObject(arg0) === undefined;
|
|
280
|
+
return ret;
|
|
281
|
+
};
|
|
282
|
+
|
|
278
283
|
module.exports.__wbg_constructor_bc58db5a3b38f16c = function(arg0) {
|
|
279
284
|
const ret = new Error(takeObject(arg0));
|
|
280
285
|
return addHeapObject(ret);
|
|
281
286
|
};
|
|
282
287
|
|
|
283
|
-
module.exports.
|
|
284
|
-
const ret =
|
|
285
|
-
return ret;
|
|
288
|
+
module.exports.__wbg_constructor_e29c95824faa216c = function() {
|
|
289
|
+
const ret = new Object();
|
|
290
|
+
return addHeapObject(ret);
|
|
286
291
|
};
|
|
287
292
|
|
|
288
293
|
module.exports.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {
|
package/nodejs/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export function init_log_level(a: number, b: number): void;
|
|
5
|
+
export function build_info(): number;
|
|
4
6
|
export function acir_read_bytes(a: number, b: number): number;
|
|
5
7
|
export function acir_write_bytes(a: number, b: number): void;
|
|
6
8
|
export function compile(a: number, b: number, c: number, d: number, e: number): void;
|
|
7
|
-
export function init_log_level(a: number, b: number): void;
|
|
8
|
-
export function build_info(): number;
|
|
9
9
|
export function __wbindgen_export_0(a: number): number;
|
|
10
10
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
|
11
11
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"collaborators": [
|
|
4
4
|
"The Noir Team <team@noir-lang.org>"
|
|
5
5
|
],
|
|
6
|
-
"version": "0.18.0-
|
|
6
|
+
"version": "0.18.0-56ee9e3.aztec",
|
|
7
7
|
"license": "(MIT OR Apache-2.0)",
|
|
8
8
|
"main": "./nodejs/noir_wasm.js",
|
|
9
9
|
"types": "./web/noir_wasm.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"install:from:nix": "yarn clean && yarn build:nix && cp -rL ./result/noir_wasm/nodejs ./ && cp -rL ./result/noir_wasm/web ./"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@noir-lang/source-resolver": "0.18.0-
|
|
34
|
+
"@noir-lang/source-resolver": "0.18.0-56ee9e3.aztec"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@esm-bundle/chai": "^4.3.4-fix.0",
|
package/web/noir_wasm.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
* @param {string} level
|
|
5
|
+
*/
|
|
6
|
+
export function init_log_level(level: string): void;
|
|
7
|
+
/**
|
|
8
|
+
* @returns {any}
|
|
9
|
+
*/
|
|
10
|
+
export function build_info(): any;
|
|
11
|
+
/**
|
|
4
12
|
* @param {Uint8Array} bytes
|
|
5
13
|
* @returns {any}
|
|
6
14
|
*/
|
|
@@ -14,17 +22,9 @@ export function acir_write_bytes(acir: any): Uint8Array;
|
|
|
14
22
|
* @param {string} entry_point
|
|
15
23
|
* @param {boolean | undefined} contracts
|
|
16
24
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
17
|
-
* @returns {
|
|
18
|
-
*/
|
|
19
|
-
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): any;
|
|
20
|
-
/**
|
|
21
|
-
* @param {string} level
|
|
22
|
-
*/
|
|
23
|
-
export function init_log_level(level: string): void;
|
|
24
|
-
/**
|
|
25
|
-
* @returns {any}
|
|
25
|
+
* @returns {CompileResult}
|
|
26
26
|
*/
|
|
27
|
-
export function
|
|
27
|
+
export function compile(entry_point: string, contracts?: boolean, dependency_graph?: DependencyGraph): CompileResult;
|
|
28
28
|
|
|
29
29
|
export type Diagnostic = {
|
|
30
30
|
message: string;
|
|
@@ -48,17 +48,48 @@ export type DependencyGraph = {
|
|
|
48
48
|
library_dependencies: Readonly<Record<string, readonly string[]>>;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
export type CompiledContract = {
|
|
52
|
+
noir_version: string;
|
|
53
|
+
name: string;
|
|
54
|
+
backend: string;
|
|
55
|
+
functions: Array<any>;
|
|
56
|
+
events: Array<any>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export type CompiledProgram = {
|
|
60
|
+
noir_version: string;
|
|
61
|
+
backend: string;
|
|
62
|
+
abi: any;
|
|
63
|
+
bytecode: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type DebugArtifact = {
|
|
67
|
+
debug_symbols: Array<any>;
|
|
68
|
+
file_map: Record<number, any>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type CompileResult = (
|
|
72
|
+
| {
|
|
73
|
+
contract: CompiledContract;
|
|
74
|
+
debug: DebugArtifact;
|
|
75
|
+
}
|
|
76
|
+
| {
|
|
77
|
+
program: CompiledProgram;
|
|
78
|
+
debug: DebugArtifact;
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
|
|
51
82
|
|
|
52
83
|
|
|
53
84
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
54
85
|
|
|
55
86
|
export interface InitOutput {
|
|
56
87
|
readonly memory: WebAssembly.Memory;
|
|
88
|
+
readonly init_log_level: (a: number, b: number) => void;
|
|
89
|
+
readonly build_info: () => number;
|
|
57
90
|
readonly acir_read_bytes: (a: number, b: number) => number;
|
|
58
91
|
readonly acir_write_bytes: (a: number, b: number) => void;
|
|
59
92
|
readonly compile: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
60
|
-
readonly init_log_level: (a: number, b: number) => void;
|
|
61
|
-
readonly build_info: () => number;
|
|
62
93
|
readonly __wbindgen_export_0: (a: number) => number;
|
|
63
94
|
readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
|
|
64
95
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
package/web/noir_wasm.js
CHANGED
|
@@ -181,6 +181,22 @@ function debugString(val) {
|
|
|
181
181
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
182
182
|
return className;
|
|
183
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* @param {string} level
|
|
186
|
+
*/
|
|
187
|
+
export function init_log_level(level) {
|
|
188
|
+
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
189
|
+
const len0 = WASM_VECTOR_LEN;
|
|
190
|
+
wasm.init_log_level(ptr0, len0);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @returns {any}
|
|
195
|
+
*/
|
|
196
|
+
export function build_info() {
|
|
197
|
+
const ret = wasm.build_info();
|
|
198
|
+
return takeObject(ret);
|
|
199
|
+
}
|
|
184
200
|
|
|
185
201
|
function passArray8ToWasm0(arg, malloc) {
|
|
186
202
|
const ptr = malloc(arg.length * 1) >>> 0;
|
|
@@ -225,7 +241,7 @@ export function acir_write_bytes(acir) {
|
|
|
225
241
|
* @param {string} entry_point
|
|
226
242
|
* @param {boolean | undefined} contracts
|
|
227
243
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
228
|
-
* @returns {
|
|
244
|
+
* @returns {CompileResult}
|
|
229
245
|
*/
|
|
230
246
|
export function compile(entry_point, contracts, dependency_graph) {
|
|
231
247
|
try {
|
|
@@ -252,22 +268,6 @@ function handleError(f, args) {
|
|
|
252
268
|
wasm.__wbindgen_export_3(addHeapObject(e));
|
|
253
269
|
}
|
|
254
270
|
}
|
|
255
|
-
/**
|
|
256
|
-
* @param {string} level
|
|
257
|
-
*/
|
|
258
|
-
export function init_log_level(level) {
|
|
259
|
-
const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
260
|
-
const len0 = WASM_VECTOR_LEN;
|
|
261
|
-
wasm.init_log_level(ptr0, len0);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @returns {any}
|
|
266
|
-
*/
|
|
267
|
-
export function build_info() {
|
|
268
|
-
const ret = wasm.build_info();
|
|
269
|
-
return takeObject(ret);
|
|
270
|
-
}
|
|
271
271
|
|
|
272
272
|
async function __wbg_load(module, imports) {
|
|
273
273
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
@@ -306,13 +306,17 @@ function __wbg_get_imports() {
|
|
|
306
306
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
307
307
|
takeObject(arg0);
|
|
308
308
|
};
|
|
309
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
310
|
+
const ret = getObject(arg0) === undefined;
|
|
311
|
+
return ret;
|
|
312
|
+
};
|
|
309
313
|
imports.wbg.__wbg_constructor_bc58db5a3b38f16c = function(arg0) {
|
|
310
314
|
const ret = new Error(takeObject(arg0));
|
|
311
315
|
return addHeapObject(ret);
|
|
312
316
|
};
|
|
313
|
-
imports.wbg.
|
|
314
|
-
const ret =
|
|
315
|
-
return ret;
|
|
317
|
+
imports.wbg.__wbg_constructor_e29c95824faa216c = function() {
|
|
318
|
+
const ret = new Object();
|
|
319
|
+
return addHeapObject(ret);
|
|
316
320
|
};
|
|
317
321
|
imports.wbg.__wbg_readfile_a8c4f775fbe0578e = function() { return handleError(function (arg0, arg1, arg2) {
|
|
318
322
|
const ret = read_file(getStringFromWasm0(arg1, arg2));
|
package/web/noir_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export function init_log_level(a: number, b: number): void;
|
|
5
|
+
export function build_info(): number;
|
|
4
6
|
export function acir_read_bytes(a: number, b: number): number;
|
|
5
7
|
export function acir_write_bytes(a: number, b: number): void;
|
|
6
8
|
export function compile(a: number, b: number, c: number, d: number, e: number): void;
|
|
7
|
-
export function init_log_level(a: number, b: number): void;
|
|
8
|
-
export function build_info(): number;
|
|
9
9
|
export function __wbindgen_export_0(a: number): number;
|
|
10
10
|
export function __wbindgen_export_1(a: number, b: number, c: number): number;
|
|
11
11
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|