Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions web-starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A simple Noir circuit with browser proving with bb.js
Has both webpack and vite bundling.

Tested with Noir 1.0.0-beta.6 and bb 0.84.0
Tested with Noir 1.0.0-beta.11 and bb 0.87.0

## Setup

Expand All @@ -15,6 +15,9 @@ Tested with Noir 1.0.0-beta.6 and bb 0.84.0

# webpack
(cd web/webpack && yarn install)

# nextjs
(cd web/nextjs && yarn install)
```

## Run
Expand All @@ -24,5 +27,8 @@ Tested with Noir 1.0.0-beta.6 and bb 0.84.0
(cd web/vite && yarn dev)

# webpack
(cd web/webpack && yarn dev)
(cd web/webpack && yarn build && yarn preview)

# nextjs
(cd web/nextjs && yarn build && yarn start)
```
2 changes: 1 addition & 1 deletion web-starter/circuits/target/noir_uh_starter.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"noir_version":"1.0.0-beta.6+e796dfd67726cbc28eb9991782533b211025928d","hash":"2259292795167771491","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":[]}
{"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":[]}
Binary file modified web-starter/circuits/target/vk
Binary file not shown.
7 changes: 4 additions & 3 deletions web-starter/web/nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A simple Noir circuit with browser proving with bb.js
This is a Next.js version, similar to the vite and webpack examples.

Tested with Noir 1.0.0-beta.6, bb 0.84.0, and Next.js 14.
Tested with Noir 1.0.0-beta.11, bb 0.87.0, and Next.js 15.

## Setup

Expand All @@ -15,5 +15,6 @@ yarn
## Run

```bash
yarn dev
```
yarn build
yarn start
```
5 changes: 2 additions & 3 deletions web-starter/web/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "nextjs-noir",
"type": "module",
"dependencies": {
"@aztec/bb.js": "0.84.0",
"@noir-lang/noir_js": "1.0.0-beta.6",
"@aztec/bb.js": "0.87.0",
"@noir-lang/noir_js": "1.0.0-beta.11",
"next": "^15.3.4",
"react": "18.2.0",
"react-dom": "18.2.0"
Expand All @@ -16,7 +16,6 @@
"typescript": "^5.8.3"
},
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"test:e2e": "playwright test"
Expand Down
2 changes: 1 addition & 1 deletion web-starter/web/nextjs/playwright.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
webServer: {
command: 'yarn dev',
command: 'yarn build && yarn start',
port: 3000,
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
Expand Down
4 changes: 2 additions & 2 deletions web-starter/web/vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "js",
"type": "module",
"dependencies": {
"@aztec/bb.js": "0.84.0",
"@noir-lang/noir_js": "1.0.0-beta.6"
"@aztec/bb.js": "0.87.0",
"@noir-lang/noir_js": "1.0.0-beta.11"
},
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion web-starter/web/vite/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from 'vite';

export default defineConfig({
optimizeDeps: {
exclude: ['@noir-lang/noirc_abi', '@noir-lang/acvm_js']
exclude: ['@noir-lang/noirc_abi', '@noir-lang/acvm_js', '@noir-lang/noir_js', '@aztec/bb.js']
},
rollupOptions: {
input: 'index.html',
Expand Down
114 changes: 89 additions & 25 deletions web-starter/web/vite/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
# yarn lockfile v1


"@aztec/bb.js@0.84.0":
version "0.84.0"
resolved "https://registry.yarnpkg.com/@aztec/bb.js/-/bb.js-0.84.0.tgz#58ef86587160ff559d39bbc3068b1cd25ef91917"
integrity sha512-jNx35PCtevQnIBAyld90JjI+fGTrhcbXH6FkcZoRRpBPvnlZVTmIAU3j16q136m+mFgIBlCuzjOE6ND4cOgnQQ==
"@aztec/bb.js@0.87.0":
version "0.87.0"
resolved "https://registry.yarnpkg.com/@aztec/bb.js/-/bb.js-0.87.0.tgz#f88d6bf0845bd21f5b63a0b3cf04e13d1a68e587"
integrity sha512-1tGxrJc/or9p4zwP7yvSLHU0z0N/DQGLfIeTYRdlQQPBMcnKX51rMI0PJ07/zZj0XxwHVFlqtV+PqvFBszIPwA==
dependencies:
comlink "^4.4.1"
commander "^12.1.0"
debug "^4.3.4"
fflate "^0.8.0"
msgpackr "^1.11.2"
pako "^2.1.0"
tslib "^2.4.0"

Expand Down Expand Up @@ -164,32 +165,62 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"

"@noir-lang/acvm_js@1.0.0-beta.6":
version "1.0.0-beta.6"
resolved "https://registry.yarnpkg.com/@noir-lang/acvm_js/-/acvm_js-1.0.0-beta.6.tgz#44c71f9c9000e5761c0ae105fa58e4ef1c747f43"
integrity sha512-/gaUKaUIon3xCekEIvrz9sUj+h1tue6CchNUZwmuXoqbwccRQchr850vbQMQxxnQvFIAfbaKD+Vkkh3RNWpG2Q==

"@noir-lang/noir_js@1.0.0-beta.6":
version "1.0.0-beta.6"
resolved "https://registry.yarnpkg.com/@noir-lang/noir_js/-/noir_js-1.0.0-beta.6.tgz#08234b5d85a9491b9b33f0219965e6f5bbfd486f"
integrity sha512-FRHrCgRcyD4LAh4FtVYZh/wwdoV2px3kokudLl5GfFaBmXHCpXyA0jKzda3ObI/Teasl2VAE+ZQoV7ZKqq5txA==
"@msgpackr-extract/msgpackr-extract-darwin-arm64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz#9edec61b22c3082018a79f6d1c30289ddf3d9d11"
integrity sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==

"@msgpackr-extract/msgpackr-extract-darwin-x64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz#33677a275204898ad8acbf62734fc4dc0b6a4855"
integrity sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==

"@msgpackr-extract/msgpackr-extract-linux-arm64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz#19edf7cdc2e7063ee328403c1d895a86dd28f4bb"
integrity sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==

"@msgpackr-extract/msgpackr-extract-linux-arm@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz#94fb0543ba2e28766c3fc439cabbe0440ae70159"
integrity sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==

"@msgpackr-extract/msgpackr-extract-linux-x64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz#4a0609ab5fe44d07c9c60a11e4484d3c38bbd6e3"
integrity sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==

"@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz#0aa5502d547b57abfc4ac492de68e2006e417242"
integrity sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==

"@noir-lang/acvm_js@1.0.0-beta.11":
version "1.0.0-beta.11"
resolved "https://registry.yarnpkg.com/@noir-lang/acvm_js/-/acvm_js-1.0.0-beta.11.tgz#6bb73c51e5d55b215ea3876040d1dc761f15ec98"
integrity sha512-g1CeqJlWNyJx1j+1t9sm3MxnDChbWSHa9UOOIQYBskxczhUHuUVfYve3xbe0DwSEiIBQ3gmTIKDmRPs+QboPvA==

"@noir-lang/noir_js@1.0.0-beta.11":
version "1.0.0-beta.11"
resolved "https://registry.yarnpkg.com/@noir-lang/noir_js/-/noir_js-1.0.0-beta.11.tgz#8e6326d7e12ea05b4397782c9f4e0aa35f563555"
integrity sha512-pZlz5/mGooHBUnucUULmbdU3gicxbaCg7t+wNoBN45JuFMU4vV32As4C1aTNNJDpDFaGupV7yXKVRcsJNTZ49w==
dependencies:
"@noir-lang/acvm_js" "1.0.0-beta.6"
"@noir-lang/noirc_abi" "1.0.0-beta.6"
"@noir-lang/types" "1.0.0-beta.6"
"@noir-lang/acvm_js" "1.0.0-beta.11"
"@noir-lang/noirc_abi" "1.0.0-beta.11"
"@noir-lang/types" "1.0.0-beta.11"
pako "^2.1.0"

"@noir-lang/noirc_abi@1.0.0-beta.6":
version "1.0.0-beta.6"
resolved "https://registry.yarnpkg.com/@noir-lang/noirc_abi/-/noirc_abi-1.0.0-beta.6.tgz#69797bdfc1a3ccf21df835eae706389d959af796"
integrity sha512-AFRl7zAK1ooA7AeKTt5dSxjfcXdmpYU4imRx8MS/UGhuLvUULM6d+AQ/OGEb1kdGwnw+qN4REnxJg7R4qsRpVQ==
"@noir-lang/noirc_abi@1.0.0-beta.11":
version "1.0.0-beta.11"
resolved "https://registry.yarnpkg.com/@noir-lang/noirc_abi/-/noirc_abi-1.0.0-beta.11.tgz#920c8f96a13af95b427071ebf4b6722de0de5156"
integrity sha512-D8nBgDGYe8uu4meu9ctGo52KIa0NeE/u2GBQi4DHJzE7/q5dVEqSyVVPImOyZWpvjPvb6thySxcDWbqY6JxOiw==
dependencies:
"@noir-lang/types" "1.0.0-beta.6"
"@noir-lang/types" "1.0.0-beta.11"

"@noir-lang/types@1.0.0-beta.6":
version "1.0.0-beta.6"
resolved "https://registry.yarnpkg.com/@noir-lang/types/-/types-1.0.0-beta.6.tgz#75e5927a73e32b94974ec45dffaf2e12ed47b83d"
integrity sha512-YmNOpr51XIOrJ+yppPbDFlpAG6ZU7qh0Uu0ZCXmon2MGD4TlnC8d/ex7YzSUH/+3zgESuCmicKnMVxEFszgmtA==
"@noir-lang/types@1.0.0-beta.11":
version "1.0.0-beta.11"
resolved "https://registry.yarnpkg.com/@noir-lang/types/-/types-1.0.0-beta.11.tgz#c27f29debfd4be82565879172c36e36832969c96"
integrity sha512-b9zeK/uxecsOKxsgqRszNYtj7Z3A9k//GF4uQIzvYbDWyrPGgnfi297ysXZ8lqKV4xBSQ93qNp+VzW4XaTBGjQ==

"@playwright/test@^1.53.0":
version "1.53.0"
Expand Down Expand Up @@ -369,6 +400,11 @@ debug@^4.3.4:
dependencies:
ms "^2.1.3"

detect-libc@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.1.tgz#9f1e511ace6bb525efea4651345beac424dac7b9"
integrity sha512-ecqj/sy1jcK1uWrwpR67UhYrIFQ+5WlGxth34WquCbamhFA6hkkwiu37o6J5xCHdo1oixJRfVRw+ywV+Hq/0Aw==

diff@^4.0.1:
version "4.0.2"
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
Expand Down Expand Up @@ -435,11 +471,39 @@ ms@^2.1.3:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

msgpackr-extract@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz#e9d87023de39ce714872f9e9504e3c1996d61012"
integrity sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==
dependencies:
node-gyp-build-optional-packages "5.2.2"
optionalDependencies:
"@msgpackr-extract/msgpackr-extract-darwin-arm64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-darwin-x64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-linux-arm" "3.0.3"
"@msgpackr-extract/msgpackr-extract-linux-arm64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-linux-x64" "3.0.3"
"@msgpackr-extract/msgpackr-extract-win32-x64" "3.0.3"

msgpackr@^1.11.2:
version "1.11.5"
resolved "https://registry.yarnpkg.com/msgpackr/-/msgpackr-1.11.5.tgz#edf0b9d9cb7d8ed6897dd0e42cfb865a2f4b602e"
integrity sha512-UjkUHN0yqp9RWKy0Lplhh+wlpdt9oQBYgULZOiFhV3VclSF1JnSQWZ5r9gORQlNYaUKQoR8itv7g7z1xDDuACA==
optionalDependencies:
msgpackr-extract "^3.0.2"

nanoid@^3.3.11:
version "3.3.11"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b"
integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==

node-gyp-build-optional-packages@5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz#522f50c2d53134d7f3a76cd7255de4ab6c96a3a4"
integrity sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==
dependencies:
detect-libc "^2.0.1"

pako@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86"
Expand Down
7 changes: 4 additions & 3 deletions web-starter/web/webpack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A simple Noir circuit with browser proving with bb.js
Has both webpack and vite bundling.

Tested with Noir 1.0.0-beta.6 and bb 0.84.0
Tested with Noir 1.0.0-beta.11 and bb 0.87.0

## Setup

Expand All @@ -15,6 +15,7 @@ yarn
## Run

```bash
# vite
yarn dev
# webpack
yarn build
yarn preview
```
5 changes: 2 additions & 3 deletions web-starter/web/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
"name": "js",
"type": "module",
"dependencies": {
"@aztec/bb.js": "0.84.0",
"@noir-lang/noir_js": "1.0.0-beta.6"
"@aztec/bb.js": "0.87.0",
"@noir-lang/noir_js": "1.0.0-beta.11"
},
"scripts": {
"dev": "webpack serve",
"build": "NODE_ENV=production webpack",
"preview": "webpack serve --mode production",
"test:e2e": "playwright test"
Expand Down
2 changes: 1 addition & 1 deletion web-starter/web/webpack/playwright.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
webServer: {
command: 'yarn dev',
command: 'yarn build && yarn preview',
port: 3000,
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
Expand Down
Loading