@noir-lang/noir_wasm 0.22.0-fbb51ed.nightly → 0.23.0-057c208.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.
Files changed (36) hide show
  1. package/build/cjs/package.json +15 -0
  2. package/build/esm/package.json +18 -0
  3. package/dist/node/index_bg.wasm +0 -0
  4. package/dist/node/main.js +12857 -0
  5. package/dist/node/main.js.map +1 -0
  6. package/dist/types/build/cjs/index.d.ts +93 -0
  7. package/dist/types/build/esm/index.d.ts +92 -0
  8. package/dist/types/src/index.d.cts +8 -0
  9. package/dist/types/src/index.d.mts +8 -0
  10. package/dist/types/src/noir/debug.d.ts +2 -0
  11. package/dist/types/src/noir/dependencies/dependency-manager.d.ts +48 -0
  12. package/dist/types/src/noir/dependencies/dependency-resolver.d.ts +22 -0
  13. package/dist/types/src/noir/dependencies/github-dependency-resolver.d.ts +29 -0
  14. package/dist/types/src/noir/dependencies/local-dependency-resolver.d.ts +12 -0
  15. package/dist/types/src/noir/file-manager/file-manager.d.ts +74 -0
  16. package/dist/types/src/noir/file-manager/memfs-file-manager.d.ts +8 -0
  17. package/dist/types/src/noir/file-manager/nodejs-file-manager.d.ts +7 -0
  18. package/dist/types/src/noir/noir-wasm-compiler.d.ts +31 -0
  19. package/dist/types/src/noir/package.d.ts +81 -0
  20. package/dist/types/src/types/noir_artifact.d.ts +173 -0
  21. package/dist/types/src/types/noir_package_config.d.ts +44 -0
  22. package/dist/types/src/utils.d.ts +5 -0
  23. package/dist/types/web-test-runner.config.d.mts +9 -0
  24. package/dist/types/webpack.config.d.ts +4 -0
  25. package/dist/web/index.html +9 -0
  26. package/dist/web/main.mjs +35340 -0
  27. package/dist/web/main.mjs.map +1 -0
  28. package/package.json +56 -16
  29. package/nodejs/noir_wasm.d.ts +0 -139
  30. package/nodejs/noir_wasm.js +0 -575
  31. package/nodejs/noir_wasm_bg.wasm +0 -0
  32. package/nodejs/noir_wasm_bg.wasm.d.ts +0 -23
  33. package/web/noir_wasm.d.ts +0 -186
  34. package/web/noir_wasm.js +0 -628
  35. package/web/noir_wasm_bg.wasm +0 -0
  36. package/web/noir_wasm_bg.wasm.d.ts +0 -23
@@ -1,186 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * This is a method that exposes the same API as `compile`
5
- * But uses the Context based APi internally
6
- * @param {string} entry_point
7
- * @param {boolean | undefined} contracts
8
- * @param {DependencyGraph | undefined} dependency_graph
9
- * @param {PathToFileSourceMap} file_source_map
10
- * @returns {CompileResult}
11
- */
12
- export function compile_(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
13
- /**
14
- * @param {string} filter
15
- */
16
- export function init_log_level(filter: string): void;
17
- /**
18
- * @returns {any}
19
- */
20
- export function build_info(): any;
21
- /**
22
- * @param {string} entry_point
23
- * @param {boolean | undefined} contracts
24
- * @param {DependencyGraph | undefined} dependency_graph
25
- * @param {PathToFileSourceMap} file_source_map
26
- * @returns {CompileResult}
27
- */
28
- export function compile(entry_point: string, contracts: boolean | undefined, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): CompileResult;
29
-
30
- export type Diagnostic = {
31
- message: string;
32
- file: string;
33
- secondaries: ReadonlyArray<{
34
- message: string;
35
- start: number;
36
- end: number;
37
- }>;
38
- }
39
-
40
- export interface CompileError extends Error {
41
- message: string;
42
- diagnostics: ReadonlyArray<Diagnostic>;
43
- }
44
-
45
-
46
-
47
- export type DependencyGraph = {
48
- root_dependencies: readonly string[];
49
- library_dependencies: Readonly<Record<string, readonly string[]>>;
50
- }
51
-
52
- export type CompiledContract = {
53
- noir_version: string;
54
- name: string;
55
- functions: Array<any>;
56
- events: Array<any>;
57
- };
58
-
59
- export type CompiledProgram = {
60
- noir_version: string;
61
- abi: any;
62
- bytecode: string;
63
- }
64
-
65
- export type DebugArtifact = {
66
- debug_symbols: Array<any>;
67
- file_map: Record<number, any>;
68
- warnings: Array<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
-
82
-
83
- /**
84
- * This is a wrapper class that is wasm-bindgen compatible
85
- * We do not use js_name and rename it like CrateId because
86
- * then the impl block is not picked up in javascript.
87
- */
88
- export class CompilerContext {
89
- free(): void;
90
- /**
91
- * @param {PathToFileSourceMap} source_map
92
- */
93
- constructor(source_map: PathToFileSourceMap);
94
- /**
95
- * @param {string} path_to_crate
96
- * @returns {CrateId}
97
- */
98
- process_root_crate(path_to_crate: string): CrateId;
99
- /**
100
- * @param {string} path_to_crate
101
- * @returns {CrateId}
102
- */
103
- process_dependency_crate(path_to_crate: string): CrateId;
104
- /**
105
- * @param {string} crate_name
106
- * @param {CrateId} from
107
- * @param {CrateId} to
108
- */
109
- add_dependency_edge(crate_name: string, from: CrateId, to: CrateId): void;
110
- /**
111
- * @param {number} program_width
112
- * @returns {CompileResult}
113
- */
114
- compile_program(program_width: number): CompileResult;
115
- /**
116
- * @param {number} program_width
117
- * @returns {CompileResult}
118
- */
119
- compile_contract(program_width: number): CompileResult;
120
- }
121
- /**
122
- */
123
- export class CrateId {
124
- free(): void;
125
- }
126
- /**
127
- */
128
- export class PathToFileSourceMap {
129
- free(): void;
130
- /**
131
- */
132
- constructor();
133
- /**
134
- * @param {string} path
135
- * @param {string} source_code
136
- * @returns {boolean}
137
- */
138
- add_source_code(path: string, source_code: string): boolean;
139
- }
140
-
141
- export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
142
-
143
- export interface InitOutput {
144
- readonly memory: WebAssembly.Memory;
145
- readonly __wbg_compilercontext_free: (a: number) => void;
146
- readonly __wbg_crateid_free: (a: number) => void;
147
- readonly compilercontext_new: (a: number) => number;
148
- readonly compilercontext_process_root_crate: (a: number, b: number, c: number) => number;
149
- readonly compilercontext_process_dependency_crate: (a: number, b: number, c: number) => number;
150
- readonly compilercontext_add_dependency_edge: (a: number, b: number, c: number, d: number, e: number) => void;
151
- readonly compilercontext_compile_program: (a: number, b: number, c: number) => void;
152
- readonly compilercontext_compile_contract: (a: number, b: number, c: number) => void;
153
- readonly compile_: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
154
- readonly init_log_level: (a: number, b: number) => void;
155
- readonly build_info: () => number;
156
- readonly __wbg_pathtofilesourcemap_free: (a: number) => void;
157
- readonly pathtofilesourcemap_new: () => number;
158
- readonly pathtofilesourcemap_add_source_code: (a: number, b: number, c: number, d: number, e: number) => number;
159
- readonly compile: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
160
- readonly __wbindgen_export_0: (a: number) => number;
161
- readonly __wbindgen_export_1: (a: number, b: number, c: number) => number;
162
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
163
- readonly __wbindgen_export_2: (a: number, b: number) => void;
164
- readonly __wbindgen_export_3: (a: number) => void;
165
- }
166
-
167
- export type SyncInitInput = BufferSource | WebAssembly.Module;
168
- /**
169
- * Instantiates the given `module`, which can either be bytes or
170
- * a precompiled `WebAssembly.Module`.
171
- *
172
- * @param {SyncInitInput} module
173
- *
174
- * @returns {InitOutput}
175
- */
176
- export function initSync(module: SyncInitInput): InitOutput;
177
-
178
- /**
179
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
180
- * for everything else, calls `WebAssembly.instantiate` directly.
181
- *
182
- * @param {InitInput | Promise<InitInput>} module_or_path
183
- *
184
- * @returns {Promise<InitOutput>}
185
- */
186
- export default function __wbg_init (module_or_path?: InitInput | Promise<InitInput>): Promise<InitOutput>;