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