@noir-lang/noir_wasm 0.27.0 → 0.28.0-7dd2c5e.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.
@@ -6,8 +6,8 @@ export function compile_program_(entry_point: string, dependency_graph: Dependen
6
6
  export function compile_contract_(entry_point: string, dependency_graph: DependencyGraph | undefined, file_source_map: PathToFileSourceMap): ContractCompileResult;
7
7
  export function __wbindgen_is_undefined(arg0: any): boolean;
8
8
  export function __wbindgen_object_drop_ref(arg0: any): void;
9
- export function __wbg_constructor_d324422a76f57e97(arg0: any): number;
10
- export function __wbg_constructor_5ba06a405a88a2ec(): number;
9
+ export function __wbg_constructor_4e6c560331d732c3(arg0: any): number;
10
+ export function __wbg_constructor_01989097aed0e4cd(): 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,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
  */