@noir-lang/noir_wasm 0.26.0-da27e34.nightly → 0.27.0-053d5e8.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.
@@ -1,13 +1,13 @@
1
- export function init_log_level(level: string): void;
2
- export function build_info(): any;
3
1
  export function compile_program_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ProgramCompileResult;
4
2
  export function compile_contract_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ContractCompileResult;
3
+ export function init_log_level(level: string): void;
4
+ export function build_info(): any;
5
5
  export function compile_program(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ProgramCompileResult;
6
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 __wbg_constructor_dc2096d1a846456a(arg0: any): number;
8
+ export function __wbg_constructor_d324422a76f57e97(arg0: any): number;
9
9
  export function __wbindgen_is_undefined(arg0: any): boolean;
10
- export function __wbg_constructor_16652445ed5bfc27(): number;
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;
@@ -1,12 +1,4 @@
1
1
  /**
2
- * @param {string} level
3
- */
4
- export function init_log_level(level: string): void;
5
- /**
6
- * @returns {any}
7
- */
8
- export function build_info(): any;
9
- /**
10
2
  * This is a method that exposes the same API as `compile`
11
3
  * But uses the Context based APi internally
12
4
  * @param {string} entry_point
@@ -25,6 +17,14 @@ export function compile_program_(entry_point: string, dependency_graph: Dependen
25
17
  */
26
18
  export function compile_contract_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ContractCompileResult;
27
19
  /**
20
+ * @param {string} level
21
+ */
22
+ export function init_log_level(level: string): void;
23
+ /**
24
+ * @returns {any}
25
+ */
26
+ export function build_info(): any;
27
+ /**
28
28
  * @param {string} entry_point
29
29
  * @param {DependencyGraph | undefined} dependency_graph
30
30
  * @param {PathToFileSourceMap} file_source_map
@@ -1,33 +1,45 @@
1
1
  import { Abi, AbiType } from '@noir-lang/types';
2
2
  /**
3
- * A named type.
3
+ * A basic value.
4
4
  */
5
- export interface ABIVariable {
5
+ export interface BasicValue<T extends string, V> {
6
6
  /**
7
- * The name of the variable.
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
- * The type of the variable.
12
- */
13
- type: AbiType;
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 contract event.
32
+ * A named type.
17
33
  */
18
- export interface EventAbi {
34
+ export interface ABIVariable {
19
35
  /**
20
- * The event name.
36
+ * The name of the variable.
21
37
  */
22
38
  name: string;
23
39
  /**
24
- * Fully qualified name of the event.
25
- */
26
- path: string;
27
- /**
28
- * The fields of the event.
40
+ * The type of the variable.
29
41
  */
30
- fields: ABIVariable[];
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
- /** The events of the contract */
60
- events: EventAbi[];
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
  }
@@ -118,6 +132,15 @@ export interface DebugInfo {
118
132
  */
119
133
  locations: Record<OpcodeLocation, SourceCodeLocation[]>;
120
134
  }
135
+ /**
136
+ * The debug information for a given program.
137
+ */
138
+ export interface ProgramDebugInfo {
139
+ /**
140
+ * An array that maps to each function of a program.
141
+ */
142
+ debug_infos: Array<DebugInfo>;
143
+ }
121
144
  /**
122
145
  * Maps a file ID to its metadata for debugging purposes.
123
146
  */