@aztec/noir-acvm_js 0.0.1-commit.f2ce05ee → 0.0.1-commit.f5d02921e

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
@@ -2,13 +2,6 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const buildInfo: () => any;
5
- export const initLogLevel: (a: number, b: number) => [number, number];
6
- export const and: (a: any, b: any) => any;
7
- export const xor: (a: any, b: any) => any;
8
- export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
9
- export const blake2s256: (a: number, b: number) => [number, number];
10
- export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
11
- export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
12
5
  export const compressWitness: (a: any) => [number, number, number, number];
13
6
  export const decompressWitness: (a: number, b: number) => [number, number, number];
14
7
  export const compressWitnessStack: (a: any) => [number, number, number, number];
@@ -19,15 +12,23 @@ export const executeProgram: (a: number, b: number, c: any, d: any) => any;
19
12
  export const getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
20
13
  export const getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
21
14
  export const getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
15
+ export const and: (a: any, b: any) => any;
16
+ export const xor: (a: any, b: any) => any;
17
+ export const sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
18
+ export const blake2s256: (a: number, b: number) => [number, number];
19
+ export const ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
20
+ export const ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
21
+ export const initLogLevel: (a: number, b: number) => [number, number];
22
+ export const wasm_bindgen__closure__destroy__h8b48c6150aee1942: (a: number, b: number) => void;
23
+ export const wasm_bindgen__convert__closures_____invoke__h84f218f81c040df9: (a: number, b: number, c: any, d: number, e: any) => void;
24
+ export const wasm_bindgen__convert__closures_____invoke__h9fb3c42a8d0e48c2: (a: number, b: number, c: any) => [number, number];
25
+ export const wasm_bindgen__convert__closures_____invoke__h329d47fe035cec3e: (a: number, b: number, c: any, d: any) => void;
26
+ export const wasm_bindgen__convert__closures_____invoke__h329d47fe035cec3e_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 closure921_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
32
- export const closure925_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.f2ce05ee",
3
+ "version": "0.0.1-commit.f5d02921e",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -29,7 +29,7 @@
29
29
  "packageManager": "yarn@4.5.2",
30
30
  "scripts": {
31
31
  "build": "bash ./build.sh",
32
- "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha",
32
+ "test": "mocha",
33
33
  "test:browser": "web-test-runner",
34
34
  "lint": "NODE_NO_WARNINGS=1 eslint . --max-warnings 0",
35
35
  "publish": "echo 📡 publishing `$npm_package_name` && yarn npm publish",
@@ -38,15 +38,15 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@esm-bundle/chai": "^4.3.4-fix.0",
41
- "@web/dev-server-esbuild": "^1.0.4",
41
+ "@web/dev-server-esbuild": "^1.0.5",
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": "^9.39.2",
45
+ "eslint": "^10.1.0",
46
46
  "eslint-plugin-prettier": "^5.5.5",
47
47
  "mocha": "^11.7.5",
48
48
  "prettier": "3.8.1",
49
- "ts-node": "^10.9.2",
50
- "typescript": "^5.8.3"
49
+ "tsx": "^4.21.0",
50
+ "typescript": "^6.0.2"
51
51
  }
52
52
  }
package/web/acvm_js.d.ts CHANGED
@@ -1,40 +1,88 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+
3
4
  /**
4
- * Returns the `BuildInfo` object containing information about how the installed package was built.
5
- * @returns {BuildInfo} - Information on how the installed package was built.
6
- */
7
- export function buildInfo(): BuildInfo;
8
- /**
9
- * Sets the package's logging level.
10
- *
11
- * @param {LogLevel} level - The maximum level of logging to be emitted.
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.
12
9
  */
13
- export function initLogLevel(filter: string): void;
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
+
14
21
  /**
15
- * Performs a bitwise AND operation between `lhs` and `rhs`
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.
16
25
  */
17
- export function and(lhs: string, rhs: string): string;
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
+
18
36
  /**
19
- * Performs a bitwise XOR operation between `lhs` and `rhs`
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.
20
42
  */
21
- export function xor(lhs: string, rhs: string): string;
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
+
22
70
  /**
23
- * Sha256 compression function
71
+ * Performs a bitwise AND operation between `lhs` and `rhs`
24
72
  */
25
- export function sha256_compression(inputs: Uint32Array, state: Uint32Array): Uint32Array;
73
+ export function and(lhs: string, rhs: string): string;
74
+
26
75
  /**
27
76
  * Calculates the Blake2s256 hash of the input bytes
28
77
  */
29
78
  export function blake2s256(inputs: Uint8Array): Uint8Array;
79
+
30
80
  /**
31
- * Verifies a ECDSA signature over the secp256k1 curve.
32
- */
33
- export function ecdsa_secp256k1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
34
- /**
35
- * Verifies a ECDSA signature over the secp256r1 curve.
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.
36
83
  */
37
- export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_bytes: Uint8Array, public_key_y_bytes: Uint8Array, signature: Uint8Array): boolean;
84
+ export function buildInfo(): BuildInfo;
85
+
38
86
  /**
39
87
  * Compresses a `WitnessMap` into the binary format outputted by Nargo.
40
88
  *
@@ -42,6 +90,15 @@ export function ecdsa_secp256r1_verify(hashed_msg: Uint8Array, public_key_x_byte
42
90
  * @returns {Uint8Array} A compressed witness map
43
91
  */
44
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
+
45
102
  /**
46
103
  * Decompresses a compressed witness as outputted by Nargo into a `WitnessMap`.
47
104
  * This should be used to only fetch the witness map for the main function.
@@ -50,13 +107,7 @@ export function compressWitness(witness_map: WitnessMap): Uint8Array;
50
107
  * @returns {WitnessMap} The decompressed witness map.
51
108
  */
52
109
  export function decompressWitness(compressed_witness: Uint8Array): WitnessMap;
53
- /**
54
- * Compresses a `WitnessStack` into the binary format outputted by Nargo.
55
- *
56
- * @param {WitnessStack} witness_stack - A witness stack.
57
- * @returns {Uint8Array} A compressed witness stack
58
- */
59
- export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
110
+
60
111
  /**
61
112
  * Decompresses a compressed witness stack as outputted by Nargo into a `WitnessStack`.
62
113
  *
@@ -64,6 +115,17 @@ export function compressWitnessStack(witness_stack: WitnessStack): Uint8Array;
64
115
  * @returns {WitnessStack} The decompressed witness stack.
65
116
  */
66
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
+
67
129
  /**
68
130
  * Executes an ACIR circuit to generate the solved witness from the initial witness.
69
131
  *
@@ -73,6 +135,7 @@ export function decompressWitnessStack(compressed_witness: Uint8Array): WitnessS
73
135
  * @returns {WitnessMap} The solved witness calculated by executing the circuit on the provided inputs.
74
136
  */
75
137
  export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessMap>;
138
+
76
139
  /**
77
140
  * Executes an ACIR circuit to generate the solved witness from the initial witness.
78
141
  * This method also extracts the public return values from the solved witness into its own return witness.
@@ -83,6 +146,7 @@ export function executeCircuit(program: Uint8Array, initial_witness: WitnessMap,
83
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.
84
147
  */
85
148
  export function executeCircuitWithReturnWitness(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<SolvedAndReturnWitness>;
149
+
86
150
  /**
87
151
  * Executes an ACIR circuit to generate the solved witness from the initial witness.
88
152
  *
@@ -92,14 +156,7 @@ export function executeCircuitWithReturnWitness(program: Uint8Array, initial_wit
92
156
  * @returns {WitnessStack} The solved witness calculated by executing the program on the provided inputs.
93
157
  */
94
158
  export function executeProgram(program: Uint8Array, initial_witness: WitnessMap, foreign_call_handler: ForeignCallHandler): Promise<WitnessStack>;
95
- /**
96
- * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's return values.
97
- *
98
- * @param {Uint8Array} circuit - A serialized representation of an ACIR circuit
99
- * @param {WitnessMap} witness_map - The completed witness map after executing the circuit.
100
- * @returns {WitnessMap} A witness map containing the circuit's return values.
101
- */
102
- export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
159
+
103
160
  /**
104
161
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public parameters.
105
162
  *
@@ -108,6 +165,7 @@ export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap):
108
165
  * @returns {WitnessMap} A witness map containing the circuit's public parameters.
109
166
  */
110
167
  export function getPublicParametersWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
168
+
111
169
  /**
112
170
  * Extracts a `WitnessMap` containing the witness indices corresponding to the circuit's public inputs.
113
171
  *
@@ -117,125 +175,87 @@ export function getPublicParametersWitness(program: Uint8Array, solved_witness:
117
175
  */
118
176
  export function getPublicWitness(program: Uint8Array, solved_witness: WitnessMap): WitnessMap;
119
177
 
120
- export type ForeignCallInput = string[]
121
- export type ForeignCallOutput = string | string[]
122
-
123
178
  /**
124
- * A callback which performs an foreign call and returns the response.
125
- * @callback ForeignCallHandler
126
- * @param {string} name - The identifier for the type of foreign call being performed.
127
- * @param {string[][]} inputs - An array of hex encoded inputs to the foreign call.
128
- * @returns {Promise<string[]>} outputs - An array of hex encoded outputs containing the results of the foreign call.
129
- */
130
- export type ForeignCallHandler = (name: string, inputs: ForeignCallInput[]) => Promise<ForeignCallOutput[]>;
131
-
132
-
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.
184
+ */
185
+ export function getReturnWitness(program: Uint8Array, witness_map: WitnessMap): WitnessMap;
133
186
 
134
187
  /**
135
- * @typedef {Object} BuildInfo - Information about how the installed package was built
136
- * @property {string} gitHash - The hash of the git commit from which the package was built.
137
- * @property {string} version - The version of the package at the built git commit.
138
- * @property {boolean} dirty - Whether the package contained uncommitted changes when built.
188
+ * Sets the package's logging level.
189
+ *
190
+ * @param {LogLevel} level - The maximum level of logging to be emitted.
139
191
  */
140
- export type BuildInfo = {
141
- gitHash: string;
142
- version: string;
143
- dirty: string;
144
- }
145
-
146
-
147
-
148
- // Map from witness index to hex string value of witness.
149
- export type WitnessMap = Map<number, string>;
192
+ export function initLogLevel(filter: string): void;
150
193
 
151
194
  /**
152
- * An execution result containing two witnesses.
153
- * 1. The full solved witness of the execution.
154
- * 2. The return witness which contains the given public return values within the full witness.
195
+ * Sha256 compression function
155
196
  */
156
- export type SolvedAndReturnWitness = {
157
- solvedWitness: WitnessMap;
158
- returnWitness: WitnessMap;
159
- }
160
-
161
-
162
-
163
- export type StackItem = {
164
- index: number;
165
- witness: WitnessMap;
166
- }
167
-
168
- export type WitnessStack = Array<StackItem>;
169
-
170
-
171
-
172
- export type RawAssertionPayload = {
173
- selector: string;
174
- data: string[];
175
- };
176
-
177
- export type ExecutionError = Error & {
178
- callStack?: string[];
179
- rawAssertionPayload?: RawAssertionPayload;
180
- acirFunctionId?: number;
181
- brilligFunctionId?: number;
182
- };
183
-
197
+ export function sha256_compression(inputs: Uint32Array, state: Uint32Array): Uint32Array;
184
198
 
199
+ /**
200
+ * Performs a bitwise XOR operation between `lhs` and `rhs`
201
+ */
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 buildInfo: () => any;
191
- readonly initLogLevel: (a: number, b: number) => [number, number];
192
- readonly and: (a: any, b: any) => any;
193
- readonly xor: (a: any, b: any) => any;
194
- readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
195
- readonly blake2s256: (a: number, b: number) => [number, number];
196
- readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
197
- readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
198
- readonly compressWitness: (a: any) => [number, number, number, number];
199
- readonly decompressWitness: (a: number, b: number) => [number, number, number];
200
- readonly compressWitnessStack: (a: any) => [number, number, number, number];
201
- readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
202
- readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
203
- readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
204
- readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
205
- readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
206
- readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
207
- readonly getPublicWitness: (a: number, b: number, c: any) => [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 closure921_externref_shim: (a: number, b: number, c: any, d: number, e: any) => void;
218
- readonly closure925_externref_shim: (a: number, b: number, c: any, d: any) => void;
219
- readonly __wbindgen_start: () => void;
207
+ readonly memory: WebAssembly.Memory;
208
+ readonly buildInfo: () => any;
209
+ readonly compressWitness: (a: any) => [number, number, number, number];
210
+ readonly decompressWitness: (a: number, b: number) => [number, number, number];
211
+ readonly compressWitnessStack: (a: any) => [number, number, number, number];
212
+ readonly decompressWitnessStack: (a: number, b: number) => [number, number, number];
213
+ readonly executeCircuit: (a: number, b: number, c: any, d: any) => any;
214
+ readonly executeCircuitWithReturnWitness: (a: number, b: number, c: any, d: any) => any;
215
+ readonly executeProgram: (a: number, b: number, c: any, d: any) => any;
216
+ readonly getReturnWitness: (a: number, b: number, c: any) => [number, number, number];
217
+ readonly getPublicParametersWitness: (a: number, b: number, c: any) => [number, number, number];
218
+ readonly getPublicWitness: (a: number, b: number, c: any) => [number, number, number];
219
+ readonly and: (a: any, b: any) => any;
220
+ readonly xor: (a: any, b: any) => any;
221
+ readonly sha256_compression: (a: number, b: number, c: number, d: number) => [number, number];
222
+ readonly blake2s256: (a: number, b: number) => [number, number];
223
+ readonly ecdsa_secp256k1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
224
+ readonly ecdsa_secp256r1_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
225
+ readonly initLogLevel: (a: number, b: number) => [number, number];
226
+ readonly wasm_bindgen__closure__destroy__h8b48c6150aee1942: (a: number, b: number) => void;
227
+ readonly wasm_bindgen__convert__closures_____invoke__h84f218f81c040df9: (a: number, b: number, c: any, d: number, e: any) => void;
228
+ readonly wasm_bindgen__convert__closures_____invoke__h9fb3c42a8d0e48c2: (a: number, b: number, c: any) => [number, number];
229
+ readonly wasm_bindgen__convert__closures_____invoke__h329d47fe035cec3e: (a: number, b: number, c: any, d: any) => void;
230
+ readonly wasm_bindgen__convert__closures_____invoke__h329d47fe035cec3e_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>;