@noir-lang/noir_wasm 0.26.0 → 0.27.0-21f9f6f.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/README.md +0 -14
- package/build/cjs/package.json +1 -1
- package/build/esm/package.json +1 -1
- package/dist/node/index_bg.wasm +0 -0
- package/dist/node/main.js +30 -17
- package/dist/node/main.js.map +1 -1
- package/dist/types/build/cjs/index.d.ts +6 -4
- package/dist/types/build/esm/index.d.ts +8 -8
- package/dist/types/src/noir/dependencies/github-dependency-resolver.d.ts +1 -1
- package/dist/types/src/types/noir_artifact.d.ts +32 -18
- package/dist/web/main.mjs +29 -18
- package/dist/web/main.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export function init_log_level(level: string): void;
|
|
2
2
|
export function build_info(): any;
|
|
3
|
-
export function compile_program_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ProgramCompileResult;
|
|
4
|
-
export function compile_contract_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ContractCompileResult;
|
|
5
3
|
export function compile_program(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ProgramCompileResult;
|
|
6
4
|
export function compile_contract(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ContractCompileResult;
|
|
5
|
+
export function compile_program_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ProgramCompileResult;
|
|
6
|
+
export function compile_contract_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ContractCompileResult;
|
|
7
7
|
export function __wbindgen_object_drop_ref(arg0: any): void;
|
|
8
|
-
export function
|
|
8
|
+
export function __wbg_constructor_d324422a76f57e97(arg0: any): number;
|
|
9
9
|
export function __wbindgen_is_undefined(arg0: any): boolean;
|
|
10
|
-
export function
|
|
10
|
+
export function __wbg_constructor_5ba06a405a88a2ec(): number;
|
|
11
11
|
export function __wbg_new_abda76e883ba8a5f(): number;
|
|
12
12
|
export function __wbg_stack_658279fe44541cf6(arg0: any, arg1: any): void;
|
|
13
13
|
export function __wbg_error_f851667af71bcfc6(arg0: any, arg1: any): void;
|
|
@@ -21,6 +21,8 @@ export function __wbg_info_24d8f53d98f12b95(arg0: any, arg1: any, arg2: any, arg
|
|
|
21
21
|
export function __wbg_warn_9bdd743e9f5fe1e0(arg0: any): void;
|
|
22
22
|
export function __wbg_warn_8342bfbc6028193a(arg0: any, arg1: any, arg2: any, arg3: any): void;
|
|
23
23
|
export function __wbindgen_string_get(arg0: any, arg1: any): void;
|
|
24
|
+
export function __wbg_getTime_40bd09e020e8bc8c(arg0: any): any;
|
|
25
|
+
export function __wbg_new0_494c19a27871d56f(): number;
|
|
24
26
|
export function __wbg_parse_76a8a18ca3f8730b(...args: any[]): any;
|
|
25
27
|
export function __wbg_stringify_d06ad2addc54d51e(...args: any[]): any;
|
|
26
28
|
export function __wbg_set_07da13cc24b69217(...args: any[]): any;
|
|
@@ -7,37 +7,37 @@ export function init_log_level(level: string): void;
|
|
|
7
7
|
*/
|
|
8
8
|
export function build_info(): any;
|
|
9
9
|
/**
|
|
10
|
-
* This is a method that exposes the same API as `compile`
|
|
11
|
-
* But uses the Context based APi internally
|
|
12
10
|
* @param {string} entry_point
|
|
13
11
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
14
12
|
* @param {PathToFileSourceMap} file_source_map
|
|
15
13
|
* @returns {ProgramCompileResult}
|
|
16
14
|
*/
|
|
17
|
-
export function
|
|
15
|
+
export function compile_program(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ProgramCompileResult;
|
|
18
16
|
/**
|
|
19
|
-
* This is a method that exposes the same API as `compile`
|
|
20
|
-
* But uses the Context based APi internally
|
|
21
17
|
* @param {string} entry_point
|
|
22
18
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
23
19
|
* @param {PathToFileSourceMap} file_source_map
|
|
24
20
|
* @returns {ContractCompileResult}
|
|
25
21
|
*/
|
|
26
|
-
export function
|
|
22
|
+
export function compile_contract(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ContractCompileResult;
|
|
27
23
|
/**
|
|
24
|
+
* This is a method that exposes the same API as `compile`
|
|
25
|
+
* But uses the Context based APi internally
|
|
28
26
|
* @param {string} entry_point
|
|
29
27
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
30
28
|
* @param {PathToFileSourceMap} file_source_map
|
|
31
29
|
* @returns {ProgramCompileResult}
|
|
32
30
|
*/
|
|
33
|
-
export function
|
|
31
|
+
export function compile_program_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ProgramCompileResult;
|
|
34
32
|
/**
|
|
33
|
+
* This is a method that exposes the same API as `compile`
|
|
34
|
+
* But uses the Context based APi internally
|
|
35
35
|
* @param {string} entry_point
|
|
36
36
|
* @param {DependencyGraph | undefined} dependency_graph
|
|
37
37
|
* @param {PathToFileSourceMap} file_source_map
|
|
38
38
|
* @returns {ContractCompileResult}
|
|
39
39
|
*/
|
|
40
|
-
export function
|
|
40
|
+
export function compile_contract_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ContractCompileResult;
|
|
41
41
|
/**
|
|
42
42
|
* This is a wrapper class that is wasm-bindgen compatible
|
|
43
43
|
* We do not use js_name and rename it like CrateId because
|
|
@@ -7,7 +7,7 @@ import { DependencyConfig, GitDependencyConfig } from '../../types/noir_package_
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class GithubDependencyResolver implements DependencyResolver {
|
|
9
9
|
#private;
|
|
10
|
-
constructor(fm: FileManager);
|
|
10
|
+
constructor(fm: FileManager, fetcher: typeof fetch);
|
|
11
11
|
/**
|
|
12
12
|
* Resolves a dependency from github. Returns null if URL is for a different website.
|
|
13
13
|
* @param _pkg - The package to resolve the dependency for
|
|
@@ -1,33 +1,45 @@
|
|
|
1
1
|
import { Abi, AbiType } from '@noir-lang/types';
|
|
2
2
|
/**
|
|
3
|
-
* A
|
|
3
|
+
* A basic value.
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface BasicValue<T extends string, V> {
|
|
6
6
|
/**
|
|
7
|
-
* The
|
|
7
|
+
* The kind of the value.
|
|
8
8
|
*/
|
|
9
|
+
kind: T;
|
|
10
|
+
value: V;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An exported value.
|
|
14
|
+
*/
|
|
15
|
+
export type AbiValue = BasicValue<'boolean', boolean> | BasicValue<'string', string> | BasicValue<'array', AbiValue[]> | TupleValue | IntegerValue | StructValue;
|
|
16
|
+
export type TypedStructFieldValue<T> = {
|
|
9
17
|
name: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
value: T;
|
|
19
|
+
};
|
|
20
|
+
export interface StructValue {
|
|
21
|
+
kind: 'struct';
|
|
22
|
+
fields: TypedStructFieldValue<AbiValue>[];
|
|
23
|
+
}
|
|
24
|
+
export interface TupleValue {
|
|
25
|
+
kind: 'tuple';
|
|
26
|
+
fields: AbiValue[];
|
|
27
|
+
}
|
|
28
|
+
export interface IntegerValue extends BasicValue<'integer', string> {
|
|
29
|
+
sign: boolean;
|
|
14
30
|
}
|
|
15
31
|
/**
|
|
16
|
-
* A
|
|
32
|
+
* A named type.
|
|
17
33
|
*/
|
|
18
|
-
export interface
|
|
34
|
+
export interface ABIVariable {
|
|
19
35
|
/**
|
|
20
|
-
* The
|
|
36
|
+
* The name of the variable.
|
|
21
37
|
*/
|
|
22
38
|
name: string;
|
|
23
39
|
/**
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
path: string;
|
|
27
|
-
/**
|
|
28
|
-
* The fields of the event.
|
|
40
|
+
* The type of the variable.
|
|
29
41
|
*/
|
|
30
|
-
|
|
42
|
+
type: AbiType;
|
|
31
43
|
}
|
|
32
44
|
/**
|
|
33
45
|
* The compilation result of an Noir function.
|
|
@@ -56,8 +68,10 @@ export interface ContractArtifact {
|
|
|
56
68
|
noir_version: string;
|
|
57
69
|
/** The functions of the contract. */
|
|
58
70
|
functions: NoirFunctionEntry[];
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
outputs: {
|
|
72
|
+
structs: Record<string, AbiType[]>;
|
|
73
|
+
globals: Record<string, AbiValue[]>;
|
|
74
|
+
};
|
|
61
75
|
/** The map of file ID to the source code and path of the file. */
|
|
62
76
|
file_map: DebugFileMap;
|
|
63
77
|
}
|