Skip to content

Commit 041f753

Browse files
committed
update to beta.15
1 parent 92b1be0 commit 041f753

File tree

13 files changed

+1342
-106
lines changed

13 files changed

+1342
-106
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"noir_version":"1.0.0-beta.11+fd3925aaaeb76c76319f44590d135498ef41ea6c","hash":"11550909604998811057","abi":{"parameters":[{"name":"x","type":{"kind":"field"},"visibility":"private"},{"name":"y","type":{"kind":"field"},"visibility":"public"}],"return_type":null,"error_types":{}},"bytecode":"H4sIAAAAAAAA/62QQQqAMAwErfigpEna5OZXLKb/f4KoFUrxpgPL7mkOG6ab0DIyt15bwzfijy4MnYsgMXuOjoQbRCsqwFKSoqKo7FGJXFmzFctgyORYxcjrhZ6upftiGvbbNw8HOny0w0QBAAA=","debug_symbols":"nZBNCoMwEIXvMussLK1YvUopEuMogSEJY1Io4t07ira66MbV/Lz53sAbocUm9bV1nR+geozQsCWyfU3e6Gi9k+04KdjGOjKirGCnCxU0o4tQuUSk4KUpLUdD0G6pUbOomQJ0rVQx7Czh3E3qR2f/0Vu5svntC+cn6PsJurisdFEe6KdM2lg+ZAUZVNdpNmOrG8I1vy45s4szvsOmbIEH9gbbxDjbLZo8+AA=","file_map":{"50":{"source":"\nfn main(x: Field, y: pub Field) {\n let res = x * 2 + y;\n assert(res == 9);\n}\n","path":"/home/josh/Documents/Github/noir-examples/web-starter/circuits/src/main.nr"}},"names":["main"],"brillig_names":[]}
1+
{"noir_version":"1.0.0-beta.15+83245db91dcf63420ef4bcbbd85b98f397fee663","hash":"13597520350741267546","abi":{"parameters":[{"name":"x","type":{"kind":"field"},"visibility":"private"},{"name":"y","type":{"kind":"field"},"visibility":"public"}],"return_type":null,"error_types":{}},"bytecode":"H4sIAAAAAAAA/5XOoQ5AUBjF8e/ceRCRxjyC2SQTFcGmCMw08T6CeQFPYTzObZpk0y6bG+4Q+JdfOeGArgxlmRUVTkHPmNKkT7EfW0DbOnnUCHewpzgYOU9Sy1vCdq47X2z9KuWuf8PNtw6uNGV55AAAAA==","debug_symbols":"nZBNCoMwEIXvMussLK1YvUopEuMogSEJY1Io4t07ira66MbV/Lz53sAbocUm9bV1nR+geozQsCWyfU3e6Gi9k+04KdjGOjKirGCnCxU0o4tQuUSk4KUpLUdD0G6pUbOomQJ0rVQx7Czh3E3qR2f/0Vu5svntC+cn6PsJurisdFEe6KdM2lg+ZAUZVNdpNmOrG8I1vy45s4szvsOmbIEH9gbbxDjbLZo8+AA=","file_map":{"50":{"source":"\nfn main(x: Field, y: pub Field) {\n let res = x * 2 + y;\n assert(res == 9);\n}\n","path":"/home/josh/Documents/Github/noir-examples/web-starter/circuits/src/main.nr"}},"expression_width":{"Bounded":{"width":4}}}

web-starter/circuits/target/vk

1.87 KB
Binary file not shown.

web-starter/web/nextjs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A simple Noir circuit with browser proving with bb.js
44
This is a Next.js version, similar to the vite and webpack examples.
55

6-
Tested with Noir 1.0.0-beta.11, bb 0.87.0, and Next.js 15.
6+
Tested with Noir 1.0.0-beta.15, bb 3.0.0-nightly.20251104, and Next.js 15.
77

88
## Setup
99

web-starter/web/nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "nextjs-noir",
33
"type": "module",
44
"dependencies": {
5-
"@aztec/bb.js": "0.87.0",
6-
"@noir-lang/noir_js": "1.0.0-beta.11",
5+
"@aztec/bb.js": "3.0.0-nightly.20251104",
6+
"@noir-lang/noir_js": "1.0.0-beta.15",
77
"next": "^15.3.4",
88
"react": "18.2.0",
99
"react-dom": "18.2.0"

web-starter/web/nextjs/pages/api/verify.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { NextApiRequest, NextApiResponse } from 'next';
2-
import { UltraHonkBackend, BarretenbergVerifier } from '@aztec/bb.js';
2+
import { UltraHonkBackend } from '@aztec/bb.js';
33
import { promises as fs } from 'fs';
44
import path from 'path';
55

@@ -12,7 +12,7 @@ async function initializeCircuit() {
1212
const circuitPath = path.resolve(process.cwd(), '../../circuits/target/noir_uh_starter.json');
1313
const circuitData = await fs.readFile(circuitPath, 'utf-8');
1414
circuit = JSON.parse(circuitData);
15-
honk = new UltraHonkBackend(circuit.bytecode, {
15+
honk = new UltraHonkBackend(circuit.bytecode, {
1616
threads: 8,
1717

1818
// By default, bb.js downloads CRS files to ~/.bb-crs. For serverless environments where
@@ -36,11 +36,11 @@ export default async function handler(
3636
await initializeCircuit();
3737

3838
const { proof, publicInputs } = req.body;
39-
39+
4040
if (!proof || !publicInputs) {
41-
return res.status(400).json({
41+
return res.status(400).json({
4242
error: 'Missing proof or publicInputs',
43-
verified: false
43+
verified: false
4444
});
4545
}
4646

@@ -61,23 +61,23 @@ export default async function handler(
6161
} else {
6262
throw new Error('Invalid proof format');
6363
}
64-
64+
6565
const publicInputsArray = Array.isArray(publicInputs) ? publicInputs : [publicInputs];
66-
67-
const verified = await honk.verifyProof({
68-
proof: proofArray,
69-
publicInputs: publicInputsArray
66+
67+
const verified = await honk.verifyProof({
68+
proof: proofArray,
69+
publicInputs: publicInputsArray
7070
});
71-
72-
return res.status(200).json({
71+
72+
return res.status(200).json({
7373
verified,
7474
message: verified ? 'Proof verified successfully' : 'Proof verification failed'
7575
});
7676
} catch (error) {
7777
console.error('Server-side verification error:', error);
78-
return res.status(500).json({
79-
error: String(error),
80-
verified: false
78+
return res.status(500).json({
79+
error: String(error),
80+
verified: false
8181
});
8282
}
8383
}

web-starter/web/vite/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A simple Noir circuit with browser proving with bb.js
44
Has both webpack and vite bundling.
55

6-
Tested with Noir 1.0.0-beta.6 and bb 0.84.0
6+
Tested with Noir 1.0.0-beta.15 and bb 3.0.0-nightly.20251104
77

88
## Setup
99

web-starter/web/vite/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "js",
33
"type": "module",
44
"dependencies": {
5-
"@aztec/bb.js": "0.87.0",
6-
"@noir-lang/noir_js": "1.0.0-beta.11"
5+
"@aztec/bb.js": "3.0.0-nightly.20251104",
6+
"@noir-lang/noir_js": "1.0.0-beta.15"
77
},
88
"scripts": {
99
"dev": "vite",
@@ -17,7 +17,8 @@
1717
"playwright": "^1.53.0",
1818
"ts-node": "^10.9.2",
1919
"typescript": "^5.8.3",
20-
"vite": "^6.1.0"
20+
"vite": "^6.1.0",
21+
"vite-plugin-node-polyfills": "0.17.0"
2122
},
2223
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
2324
}
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import { defineConfig } from 'vite';
2+
import { nodePolyfills } from 'vite-plugin-node-polyfills';
23

34
export default defineConfig({
5+
plugins: [
6+
nodePolyfills(),
7+
],
48
optimizeDeps: {
59
exclude: ['@noir-lang/noirc_abi', '@noir-lang/acvm_js', '@noir-lang/noir_js', '@aztec/bb.js']
610
},
7-
rollupOptions: {
8-
input: 'index.html',
9-
output: {
10-
dir: 'dist',
11-
format: 'esm'
12-
}
13-
}
14-
});
11+
resolve: {
12+
alias: {
13+
pino: "pino/browser.js",
14+
},
15+
},
16+
});

0 commit comments

Comments
 (0)