@aztec/noir-acvm_js 0.0.1-commit.ff7989d6c → 0.0.1-commit.ffe5b04ea

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.
Binary file
@@ -8,26 +8,27 @@ export const decompressWitnessStack: (a: number, b: number) => [number, number,
8
8
  export const executeCircuit: (a: number, b: number, c: any, d: any) => any;
9
9
  export const executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
10
10
  export const executeProgram: (a: number, b: number, c: any, d: any) => any;
11
- export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
12
- export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
13
- export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
14
11
  export const and: (a: any, b: any) => any;
15
12
  export const xor: (a: any, b: any) => any;
16
13
  export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
17
14
  export const blake2s256: (a: number, b: number) => [number, number];
18
15
  export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
19
16
  export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
20
- export const buildInfo: () => any;
17
+ export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
18
+ export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
19
+ export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
21
20
  export const initLogLevel: (a: number, b: number) => [number, number];
21
+ export const buildInfo: () => any;
22
+ export const wasm_bindgen__closure__destroy__h589cd82bcdcce84d: (a: number, b: number) => void;
23
+ export const wasm_bindgen__convert__closures_____invoke__h149dcfc5e545a40e: (a: number, b: number, c: any, d: number, e: any) => void;
24
+ export const wasm_bindgen__convert__closures_____invoke__hd0bc2cf4f980f051: (a: number, b: number, c: any) => [number, number];
25
+ export const wasm_bindgen__convert__closures_____invoke__h5a259cce50f322a2: (a: number, b: number, c: any, d: any) => void;
26
+ export const wasm_bindgen__convert__closures_____invoke__h5a259cce50f322a2_21: (a: number, b: number, c: any, d: any) => void;
27
+ export const __wbindgen_malloc: (a: number, b: number) => number;
28
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
22
29
  export const __wbindgen_exn_store: (a: number) => void;
23
30
  export const __externref_table_alloc: () => number;
24
- export const __wbindgen_export_2: WebAssembly.Table;
31
+ export const __wbindgen_externrefs: WebAssembly.Table;
25
32
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
26
- export const __wbindgen_malloc: (a: number, b: number) => number;
27
- export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
28
- export const __wbindgen_export_6: WebAssembly.Table;
29
33
  export const __externref_table_dealloc: (a: number) => void;
30
- export const closure445_externref_shim: (a: number, b: number, c: any) => void;
31
- export const closure924_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
- export const closure928_externref_shim: (a: number, b: number, c: any, d: any) => void;
33
34
  export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/noir-acvm_js",
3
- "version": "0.0.1-commit.ff7989d6c",
3
+ "version": "0.0.1-commit.ffe5b04ea",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,7 +42,7 @@
42
42
  "@web/test-runner": "^0.20.2",
43
43
  "@web/test-runner-playwright": "^0.11.1",
44
44
  "chai": "^6.2.2",
45
- "eslint": "^10.0.0",
45
+ "eslint": "^10.0.2",
46
46
  "eslint-plugin-prettier": "^5.5.5",
47
47
  "mocha": "^11.7.5",
48
48
  "prettier": "3.8.1",
package/web/acvm_js.d.ts CHANGED
@@ -1,5 +1,88 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+
4
+ /**
5
+ * @typedef {Object} BuildInfo - Information about how the installed package was built
6
+ * @property {string} gitHash - The hash of the git commit from which the package was built.
7
+ * @property {string} version - The version of the package at the built git commit.
8
+ * @property {boolean} dirty - Whether the package contained uncommitted changes when built.
9
+ */
10
+ export type BuildInfo = {
11
+ gitHash: string;
12
+ version: string;
13
+ dirty: string;
14
+ }
15
+
16
+
17
+
18
+ // Map from witness index to hex string value of witness.
19
+ export type WitnessMap = Map<number, string>;
20
+
21
+ /**
22
+ * An execution result containing two witnesses.
23
+ * 1. The full solved witness of the execution.
24
+ * 2. The return witness which contains the given public return values within the full witness.
25
+ */
26
+ export type SolvedAndReturnWitness = {
27
+ solvedWitness: WitnessMap;
28
+ returnWitness: WitnessMap;
29
+ }
30
+
31
+
32
+
33
+ export type ForeignCallInput = string[]
34
+ export type ForeignCallOutput = string | string[]
35
+
36
+ /**
37
+ * A callback which performs an foreign call and returns the response.
38
+ * @callback ForeignCallHandler
39
+ * @param {string} name - The identifier for the type of foreign call being performed.
40
+ * @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
41
+ * @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
42
+ */
43
+ export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
44
+
45
+
46
+
47
+ export type RawAssertionPayload = {
48
+ selector: string;
49
+ data: string[];
50
+ };
51
+
52
+ export type ExecutionError = Error & {
53
+ callStack?: string[];
54
+ rawAssertionPayload?: RawAssertionPayload;
55
+ acirFunctionId?: number;
56
+ brilligFunctionId?: number;
57
+ };
58
+
59
+
60
+
61
+ export type StackItem = {
62
+ index: number;
63
+ witness: WitnessMap;
64
+ }
65
+
66
+ export type WitnessStack = Array<StackItem>;
67
+
68
+
69
+
70
+ /**
71
+ * Performs a bitwise AND operation between `lhs` and `rhs`
72
+ */
73
+ export function and(lhs: string, rhs: string): string;
74
+
75
+ /**
76
+ * Calculates the Blake2s256 hash of the input bytes
77
+ */
78
+ export function blake2s256(inputs: Uint8Array): Uint8Array;
79
+
80
+ /**
81
+ * Returns the `BuildInfo` object containing information about how the installed package was built.
82
+ * @returns {BuildInfo} - Information on how the installed package was built.
83
+ */
84
+ export function buildInfo(): BuildInfo;
85
+
3
86
  /**
4
87
  * Compresses a `WitnessMap` into the binary format outputted by Nargo.
5
88
  *
@@ -7,6 +90,15 @@
7
90
  * @returns {Uint8Array} A compressed witness map
8
91
  */
9
92
  export function compressWitness(witness_map: WitnessMap): Uint8Array;
93
+
94
+ /**
95
+ * Compresses a `WitnessStack` into the binary format outputted by Nargo.
96
+ *
97
+ * @param {WitnessStack} witness_stack - A witness stack.
98
+ * @returns {Uint8Array} A compressed witness stack
99
+ */
100
+ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
101
+
10
102
  /**
11
103
  * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
12
104
  * This should be used to only fetch the witness map for the main function.
@@ -15,13 +107,7 @@ export function compressWitness(witness_map: WitnessMap): Uint8Array;
15
107
  * @returns {WitnessMap} The decompressed witness map.
16
108
  */
17
109
  export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
18
- /**
19
- * Compresses a `WitnessStack` into the binary format outputted by Nargo.
20
- *
21
- * @param {WitnessStack} witness_stack - A witness stack.
22
- * @returns {Uint8Array} A compressed witness stack
23
- */
24
- export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
110
+
25
111
  /**
26
112
  * Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
27
113
  *
@@ -29,6 +115,17 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
29
115
  * @returns {WitnessStack} The decompressed witness stack.
30
116
  */
31
117
  export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessStack;
118
+
119
+ /**
120
+ * Verifies a ECDSA signature over the secp256k1 curve.
121
+ */
122
+ export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
123
+
124
+ /**
125
+ * Verifies a ECDSA signature over the secp256r1 curve.
126
+ */
127
+ export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
128
+
32
129
  /**
33
130
  * Executes an ACIR circuit to generate the solved witness from the initial witness.
34
131
  *
@@ -38,6 +135,7 @@ export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessS
38
135
  * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
39
136
  */
40
137
  export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
138
+
41
139
  /**
42
140
  * Executes an ACIR circuit to generate the solved witness from the initial witness.
43
141
  * This method also extracts the public return values from the solved witness into its own return witness.
@@ -48,6 +146,7 @@ export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap,
48
146
  * @returns {SolvedAndReturnWitness} The solved witness calculated by executing the circuit on the provided inputs, as well as the return witness indices as specified by the circuit.
49
147
  */
50
148
  export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
149
+
51
150
  /**
52
151
  * Executes an ACIR circuit to generate the solved witness from the initial witness.
53
152
  *
@@ -57,14 +156,7 @@ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_wit
57
156
  * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
58
157
  */
59
158
  export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
60
- /**
61
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
62
- *
63
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
64
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
65
- * @returns {WitnessMap} A witness map containing the circuit's return values.
66
- */
67
- export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
159
+
68
160
  /**
69
161
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
70
162
  *
@@ -73,6 +165,7 @@ export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap):
73
165
  * @returns {WitnessMap} A witness map containing the circuit's public parameters.
74
166
  */
75
167
  export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
168
+
76
169
  /**
77
170
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
78
171
  *
@@ -81,35 +174,16 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
81
174
  * @returns {WitnessMap} A witness map containing the circuit's public inputs.
82
175
  */
83
176
  export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
177
+
84
178
  /**
85
- * Performs a bitwise AND operation between `lhs` and `rhs`
86
- */
87
- export function and(lhs: string, rhs: string): string;
88
- /**
89
- * Performs a bitwise XOR operation between `lhs` and `rhs`
90
- */
91
- export function xor(lhs: string, rhs: string): string;
92
- /**
93
- * Sha256 compression function
94
- */
95
- export function sha256_compression(inputs: Uint32Array, state: Uint32Array): Uint32Array;
96
- /**
97
- * Calculates the Blake2s256 hash of the input bytes
98
- */
99
- export function blake2s256(inputs: Uint8Array): Uint8Array;
100
- /**
101
- * Verifies a ECDSA signature over the secp256k1 curve.
102
- */
103
- export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
104
- /**
105
- * Verifies a ECDSA signature over the secp256r1 curve.
106
- */
107
- export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
108
- /**
109
- * Returns the `BuildInfo` object containing information about how the installed package was built.
110
- * @returns {BuildInfo} - Information on how the installed package was built.
179
+ * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
180
+ *
181
+ * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
182
+ * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
183
+ * @returns {WitnessMap} A witness map containing the circuit's return values.
111
184
  */
112
- export function buildInfo(): BuildInfo;
185
+ export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
186
+
113
187
  /**
114
188
  * Sets the package's logging level.
115
189
  *
@@ -117,125 +191,71 @@ export function buildInfo(): BuildInfo;
117
191
  */
118
192
  export function initLogLevel(filter: string): void;
119
193
 
120
- export type RawAssertionPayload = {
121
- selector: string;
122
- data: string[];
123
- };
124
-
125
- export type ExecutionError = Error & {
126
- callStack?: string[];
127
- rawAssertionPayload?: RawAssertionPayload;
128
- acirFunctionId?: number;
129
- brilligFunctionId?: number;
130
- };
131
-
132
-
133
-
134
- export type StackItem = {
135
- index: number;
136
- witness: WitnessMap;
137
- }
138
-
139
- export type WitnessStack = Array<StackItem>;
140
-
141
-
142
-
143
194
  /**
144
- * @typedef {Object} BuildInfo - Information about how the installed package was built
145
- * @property {string} gitHash - The hash of the git commit from which the package was built.
146
- * @property {string} version - The version of the package at the built git commit.
147
- * @property {boolean} dirty - Whether the package contained uncommitted changes when built.
195
+ * Sha256 compression function
148
196
  */
149
- export type BuildInfo = {
150
- gitHash: string;
151
- version: string;
152
- dirty: string;
153
- }
154
-
155
-
156
-
157
- // Map from witness index to hex string value of witness.
158
- export type WitnessMap = Map<number, string>;
197
+ export function sha256_compression(inputs: Uint32Array, state: Uint32Array): Uint32Array;
159
198
 
160
199
  /**
161
- * An execution result containing two witnesses.
162
- * 1. The full solved witness of the execution.
163
- * 2. The return witness which contains the given public return values within the full witness.
200
+ * Performs a bitwise XOR operation between `lhs` and `rhs`
164
201
  */
165
- export type SolvedAndReturnWitness = {
166
- solvedWitness: WitnessMap;
167
- returnWitness: WitnessMap;
168
- }
169
-
170
-
171
-
172
- export type ForeignCallInput = string[]
173
- export type ForeignCallOutput = string | string[]
174
-
175
- /**
176
- * A callback which performs an foreign call and returns the response.
177
- * @callback ForeignCallHandler
178
- * @param {string} name - The identifier for the type of foreign call being performed.
179
- * @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
180
- * @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
181
- */
182
- export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
183
-
184
-
202
+ export function xor(lhs: string, rhs: string): string;
185
203
 
186
204
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
187
205
 
188
206
  export interface InitOutput {
189
- readonly memory: WebAssembly.Memory;
190
- readonly compressWitness: (a: any) => [number, number, number, number];
191
- readonly decompressWitness: (a: number, b: number) => [number, number, number];
192
- readonly compressWitnessStack: (a: any) => [number, number, number, number];
193
- readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
194
- readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
195
- readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
196
- readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
197
- readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
198
- readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
199
- readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
200
- readonly and: (a: any, b: any) => any;
201
- readonly xor: (a: any, b: any) => any;
202
- readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
203
- readonly blake2s256: (a: number, b: number) => [number, number];
204
- readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
205
- readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
206
- readonly buildInfo: () => any;
207
- readonly initLogLevel: (a: number, b: number) => [number, number];
208
- readonly __wbindgen_exn_store: (a: number) => void;
209
- readonly __externref_table_alloc: () => number;
210
- readonly __wbindgen_export_2: WebAssembly.Table;
211
- readonly __wbindgen_free: (a: number, b: number, c: number) => void;
212
- readonly __wbindgen_malloc: (a: number, b: number) => number;
213
- readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
214
- readonly __wbindgen_export_6: WebAssembly.Table;
215
- readonly __externref_table_dealloc: (a: number) => void;
216
- readonly closure445_externref_shim: (a: number, b: number, c: any) => void;
217
- readonly closure924_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
218
- readonly closure928_externref_shim: (a: number, b: number, c: any, d: any) => void;
219
- readonly __wbindgen_start: () => void;
207
+ readonly memory: WebAssembly.Memory;
208
+ readonly compressWitness: (a: any) => [number, number, number, number];
209
+ readonly decompressWitness: (a: number, b: number) => [number, number, number];
210
+ readonly compressWitnessStack: (a: any) => [number, number, number, number];
211
+ readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
212
+ readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
213
+ readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
214
+ readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
215
+ readonly and: (a: any, b: any) => any;
216
+ readonly xor: (a: any, b: any) => any;
217
+ readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
218
+ readonly blake2s256: (a: number, b: number) => [number, number];
219
+ readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
220
+ readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
221
+ readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
222
+ readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
223
+ readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
224
+ readonly initLogLevel: (a: number, b: number) => [number, number];
225
+ readonly buildInfo: () => any;
226
+ readonly wasm_bindgen__closure__destroy__h589cd82bcdcce84d: (a: number, b: number) => void;
227
+ readonly wasm_bindgen__convert__closures_____invoke__h149dcfc5e545a40e: (a: number, b: number, c: any, d: number, e: any) => void;
228
+ readonly wasm_bindgen__convert__closures_____invoke__hd0bc2cf4f980f051: (a: number, b: number, c: any) => [number, number];
229
+ readonly wasm_bindgen__convert__closures_____invoke__h5a259cce50f322a2: (a: number, b: number, c: any, d: any) => void;
230
+ readonly wasm_bindgen__convert__closures_____invoke__h5a259cce50f322a2_21: (a: number, b: number, c: any, d: any) => void;
231
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
232
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
233
+ readonly __wbindgen_exn_store: (a: number) => void;
234
+ readonly __externref_table_alloc: () => number;
235
+ readonly __wbindgen_externrefs: WebAssembly.Table;
236
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
237
+ readonly __externref_table_dealloc: (a: number) => void;
238
+ readonly __wbindgen_start: () => void;
220
239
  }
221
240
 
222
241
  export type SyncInitInput = BufferSource | WebAssembly.Module;
242
+
223
243
  /**
224
- * Instantiates the given `module`, which can either be bytes or
225
- * a precompiled `WebAssembly.Module`.
226
- *
227
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
228
- *
229
- * @returns {InitOutput}
230
- */
244
+ * Instantiates the given `module`, which can either be bytes or
245
+ * a precompiled `WebAssembly.Module`.
246
+ *
247
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
248
+ *
249
+ * @returns {InitOutput}
250
+ */
231
251
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
232
252
 
233
253
  /**
234
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
235
- * for everything else, calls `WebAssembly.instantiate` directly.
236
- *
237
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
238
- *
239
- * @returns {Promise<InitOutput>}
240
- */
254
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
255
+ * for everything else, calls `WebAssembly.instantiate` directly.
256
+ *
257
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
258
+ *
259
+ * @returns {Promise<InitOutput>}
260
+ */
241
261
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;