@aztec/noir-noir_codegen 0.84.0 → 0.85.0-alpha-testnet.0
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.
|
@@ -238,13 +238,18 @@ ${interfacesCode}`;
|
|
|
238
238
|
}
|
|
239
239
|
const codegenFunction = (name, function_signature, compiled_program) => {
|
|
240
240
|
const args = function_signature.inputs.map(([name]) => `${name}`).join(', ');
|
|
241
|
-
const args_with_types = function_signature.inputs.map(([name, type]) => `${name}: ${type}`)
|
|
241
|
+
const args_with_types = function_signature.inputs.map(([name, type]) => `${name}: ${type}`);
|
|
242
|
+
if (!compiled_program) {
|
|
243
|
+
args_with_types.push(`${name}_circuit: CompiledCircuit`);
|
|
244
|
+
}
|
|
245
|
+
args_with_types.push('foreignCallHandler?: ForeignCallHandler');
|
|
246
|
+
const args_with_types_joined_by_comma = args_with_types.join(', ');
|
|
242
247
|
const artifact = compiled_program
|
|
243
248
|
? `export const ${name}_circuit: CompiledCircuit = ${JSON.stringify(compiled_program)};`
|
|
244
249
|
: '';
|
|
245
250
|
return `${artifact}
|
|
246
251
|
|
|
247
|
-
export async function ${name}(${
|
|
252
|
+
export async function ${name}(${args_with_types_joined_by_comma}): Promise<${function_signature.returnValue}> {
|
|
248
253
|
const program = new Noir(${name}_circuit);
|
|
249
254
|
const args: InputMap = { ${args} };
|
|
250
255
|
const { returnValue } = await program.execute(args, foreignCallHandler);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"contributors": [
|
|
4
4
|
"The Noir Team <team@noir-lang.org>"
|
|
5
5
|
],
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.85.0-alpha-testnet.0",
|
|
7
7
|
"packageManager": "yarn@4.5.2",
|
|
8
8
|
"license": "(MIT OR Apache-2.0)",
|
|
9
9
|
"type": "module",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"url": "https://github.com/noir-lang/noir/issues"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@aztec/noir-types": "0.
|
|
21
|
-
"glob": "^10.
|
|
20
|
+
"@aztec/noir-types": "0.85.0-alpha-testnet.0",
|
|
21
|
+
"glob": "^10.4.5",
|
|
22
22
|
"ts-command-line-args": "^2.5.1"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
@@ -46,18 +46,18 @@
|
|
|
46
46
|
"clean": "rm -rf ./lib"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@aztec/noir-noir_js": "0.
|
|
49
|
+
"@aztec/noir-noir_js": "0.85.0-alpha-testnet.0",
|
|
50
50
|
"@types/chai": "^4",
|
|
51
51
|
"@types/mocha": "^10.0.10",
|
|
52
52
|
"@types/node": "^22.13.10",
|
|
53
53
|
"@types/prettier": "^3.0.0",
|
|
54
54
|
"chai": "^4.4.1",
|
|
55
|
-
"eslint": "^9.
|
|
56
|
-
"eslint-plugin-prettier": "^5.2.
|
|
55
|
+
"eslint": "^9.24.0",
|
|
56
|
+
"eslint-plugin-prettier": "^5.2.6",
|
|
57
57
|
"mocha": "^11.1.0",
|
|
58
58
|
"prettier": "3.5.3",
|
|
59
|
-
"ts-node": "^10.9.
|
|
60
|
-
"tsx": "^4.
|
|
61
|
-
"typescript": "^5.8.
|
|
59
|
+
"ts-node": "^10.9.2",
|
|
60
|
+
"tsx": "^4.19.3",
|
|
61
|
+
"typescript": "^5.8.3"
|
|
62
62
|
}
|
|
63
63
|
}
|