Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
553ccac
Fix initializerless account creation and redundant stub registration
Thunkar Jun 18, 2026
6e1faef
Support Chromium/Brave native-messaging manifest dirs (dev mode)
Thunkar Jun 18, 2026
7db5803
Match tx progress phase colors to aztec-kit embedded-wallet
Thunkar Jun 18, 2026
f1f96a1
Merge pull request #56 from AztecProtocol/gj/update-to-v5
Thunkar Jun 18, 2026
5508a9d
update
Thunkar Jul 6, 2026
096df5b
Merge pull request #57 from AztecProtocol/gj/v5rc2update
Thunkar Jul 6, 2026
47f91bd
fix(web): emit sqlite3mc runtime assets unhashed so production builds…
Thunkar Jul 6, 2026
107d082
Merge pull request #58 from AztecProtocol/gj/v5rc2update
Thunkar Jul 6, 2026
c111eb8
chore(deps): update Aztec packages to v5.0.0 stable
Thunkar Jul 13, 2026
831f97e
fix(decoding): resolve current class id for upgraded contracts
Thunkar Jul 13, 2026
36b354f
Merge pull request #59 from AztecProtocol/gj/update-to-v5-stable
Thunkar Jul 13, 2026
cec2281
fix(batch): emit void for registerContract results over the wire
Thunkar Jul 13, 2026
6ce4674
Merge pull request #60 from AztecProtocol/gj/update-to-v5-stable
Thunkar Jul 13, 2026
7e6b1f2
chore(deps): update Aztec packages to 5.0.0-nightly.20260715
Thunkar Jul 15, 2026
f7fb351
feat(ui): show the Aztec SDK version in the menu drawer
Thunkar Jul 15, 2026
37bc5b8
Merge pull request #62 from AztecProtocol/gj/update-to-v5-nightly
Thunkar Jul 15, 2026
6c09693
Merge pull request #63 from AztecProtocol/gj/update-to-v5-stable
Thunkar Jul 15, 2026
d566c2f
chore(deps): update Aztec packages to v5.0.1
Thunkar Jul 15, 2026
e52ca3f
Merge pull request #64 from AztecProtocol/gj/update-to-v5.0.1
Thunkar Jul 15, 2026
b6b412e
Merge remote-tracking branch 'origin/main' into gj/next-v6.0.0-rc.1
Thunkar Sep 25, 2026
f64aba0
chore(next): move to aztec 6.0.0-rc.1 (@aztec-labs scope) and target …
Thunkar Sep 25, 2026
4925a62
chore(next): point testnet at the v6 testnet and inject API keys per …
Thunkar Sep 29, 2026
b9a25d9
ci: give CI dev builds the network API keys
Thunkar Sep 29, 2026
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
26 changes: 26 additions & 0 deletions .github/actions/export-network-api-keys/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Export network API keys
description: >
Exposes every `<ID>_API_KEY` repo secret to later steps as `VITE_<ID>_API_KEY`, the build-time
env var shared/src/config/networks.ts reads each network's node API key from (`<ID>` is the
network id in upper snake case, e.g. `TESTNET_API_KEY` for `testnet`). Adding a network behind an
API gateway only needs a secret with the matching name, no workflow changes. The keys end up in
the client bundles by design.

inputs:
secrets:
description: The caller's secrets, as `toJSON(secrets)`.
required: true

runs:
using: composite
steps:
- shell: bash
env:
SECRETS_JSON: ${{ inputs.secrets }}
run: |
echo "$SECRETS_JSON" | jq -r '
to_entries[]
| select(.key | test("^[A-Z0-9_]+_API_KEY$"))
| "VITE_\(.key)<<__API_KEY_EOF__\n\(.value)\n__API_KEY_EOF__"
' >> "$GITHUB_ENV"
echo "$SECRETS_JSON" | jq -r 'keys[] | select(test("^[A-Z0-9_]+_API_KEY$")) | "Exported VITE_\(.)"'
5 changes: 5 additions & 0 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ jobs:
- name: Install dependencies
run: yarn install --immutable

- name: Export network API keys
uses: ./.github/actions/export-network-api-keys
with:
secrets: ${{ toJSON(secrets) }}

- name: Build Electron app (development)
if: ${{ !inputs.release-mode }}
working-directory: ./app
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ jobs:
with:
release-mode: false
retention-days: 7
# Network API keys (`*_API_KEY`) for the Electron dev build. Fork PRs get no secrets, so
# their builds come out keyless.
secrets: inherit

# Sentinel job. `deploy-web.yml` on `pull_request_target` waits for this
# single stable check name before deploying a preview — avoids coupling
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,20 @@ jobs:
- name: Install Vercel CLI
run: npm install --global vercel@latest

# Same as .github/actions/export-network-api-keys, inlined on purpose: under
# pull_request_target the checkout above is the PR head, so a local action would run the
# PR's copy with every secret. This step comes from the base ref's workflow file, and
# only the API keys (public in the bundle anyway) reach the PR code after it.
- name: Export network API keys
env:
SECRETS_JSON: ${{ toJSON(secrets) }}
run: |
echo "$SECRETS_JSON" | jq -r '
to_entries[]
| select(.key | test("^[A-Z0-9_]+_API_KEY$"))
| "VITE_\(.key)<<__API_KEY_EOF__\n\(.value)\n__API_KEY_EOF__"
' >> "$GITHUB_ENV"

- name: Pull Vercel environment
working-directory: ./web
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
with:
release-mode: true
retention-days: 30
secrets: inherit

create-release:
name: Create GitHub Release
Expand Down Expand Up @@ -86,6 +87,11 @@ jobs:
- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Export network API keys
uses: ./.github/actions/export-network-api-keys
with:
secrets: ${{ toJSON(secrets) }}

- name: Pull Vercel environment
working-directory: ./web
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
node_modules
.vercel
.yarn/install-state.gz
.turbo
.turbo
.env*.local
4 changes: 2 additions & 2 deletions CLAUDE.MD
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ The wallet implements a **capability-based authorization model** where dApps req

### Capability Types

Six capability types from `@aztec/aztec.js/wallet`:
Six capability types from `@aztec-labs/aztec.js/wallet`:

#### 1. Accounts Capability
```typescript
Expand Down Expand Up @@ -193,7 +193,7 @@ Authorization manager supports progressive wildcard matching:

### WalletDB (`wallet-db.ts`)

Uses LMDB (via `@aztec/kv-store/lmdb-v2`) for persistent storage:
Uses LMDB (via `@aztec-labs/kv-store/lmdb-v2`) for persistent storage:

| Store | Purpose |
|-------|---------|
Expand Down
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ node scripts/update.js --skip-install # skip yarn
node scripts/update.js --skip-aztec-up # skip Aztec CLI install
```

Updates `@aztec/*` deps across every workspace (`app/`, `shared/`, `web/`, `extension/`), runs `yarn install`, and refreshes the rollup version for every non-local network in `shared/src/config/networks.ts` by calling `node_getNodeInfo` against each network's configured `nodeUrl`.
Updates `@aztec-labs/*` deps across every workspace (`app/`, `shared/`, `web/`, `extension/`), runs `yarn install`, and refreshes the rollup version for every non-local network in `shared/src/config/networks.ts` by calling `node_getNodeInfo` against each network's configured `nodeUrl`.

## Development Setup

Expand All @@ -36,6 +36,18 @@ Updates `@aztec/*` deps across every workspace (`app/`, `shared/`, `web/`, `exte
- yarn
- A running Aztec local node (or access to a remote node)

### Network API keys

Networks behind an API gateway (e.g. `testnet`, `https://testnet-v6.rpc2.aztec-labs.com`, Sepolia L1) need a key, sent as the `x-api-key` header on every node request. Each network's key is baked in at build time from `VITE_<ID>_API_KEY`, where `<ID>` is the network id from `shared/src/config/networks.ts` in upper snake case (`testnet` → `VITE_TESTNET_API_KEY`). Networks without a key are called unauthenticated.

Locally, export it before starting/building, or put it in a gitignored `.env.local` next to the Vite config you're running (`app/` or `web/`):

```bash
echo 'VITE_TESTNET_API_KEY=<your key>' > app/.env.local
```

In CI, add a repo secret named `<ID>_API_KEY` (e.g. `TESTNET_API_KEY`). The web deploys and the Electron release build export every `*_API_KEY` secret as `VITE_*_API_KEY` before building (`.github/actions/export-network-api-keys`), so a new network only needs its secret, no workflow changes. The keys end up in the client bundles.

### Running in Development Mode

Follow these steps to run the wallet in development mode:
Expand Down Expand Up @@ -220,11 +232,11 @@ Replace:
The system-wide native messaging dir is **browser-specific**. Install the manifest in the
dir for the browser WXT actually launches:

| Browser | System-wide dir |
| ------------- | -------------------------------------------- |
| Google Chrome | `/etc/opt/chrome/native-messaging-hosts/` |
| Chromium | `/etc/chromium/native-messaging-hosts/` |
| Brave | `/etc/brave/native-messaging-hosts/` |
| Browser | System-wide dir |
| ------------- | ----------------------------------------- |
| Google Chrome | `/etc/opt/chrome/native-messaging-hosts/` |
| Chromium | `/etc/chromium/native-messaging-hosts/` |
| Brave | `/etc/brave/native-messaging-hosts/` |

> On Arch-based distros (e.g. CachyOS) the default browser is usually **Chromium**, which
> uses `/etc/chromium/native-messaging-hosts/` — not Chrome's `/etc/opt/chrome/...`.
Expand Down
2 changes: 1 addition & 1 deletion app/forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type CustomWalker = CopyClass<Walker> & {
walkDependenciesForModule: (moduleRoot: string, depType: DepType) => Promise<void>;
};

const externalDependencies = ["@aztec/kv-store", "@aztec/bb.js"];
const externalDependencies = ["@aztec-labs/kv-store", "@aztec-foundation/bb.js"];

// Map to swap dependency names: key = dependency name to copy, value = source package name
const dependencyMap: Record<string, string> = {
Expand Down
30 changes: 15 additions & 15 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@
"vite-plugin-static-copy": "^3.1.2"
},
"dependencies": {
"@aztec/accounts": "5.0.0-nightly.20260618",
"@aztec/aztec.js": "5.0.0-nightly.20260618",
"@aztec/bb.js": "5.0.0-nightly.20260618",
"@aztec/blob-lib": "5.0.0-nightly.20260618",
"@aztec/constants": "5.0.0-nightly.20260618",
"@aztec/entrypoints": "5.0.0-nightly.20260618",
"@aztec/ethereum": "5.0.0-nightly.20260618",
"@aztec/foundation": "5.0.0-nightly.20260618",
"@aztec/kv-store": "5.0.0-nightly.20260618",
"@aztec/noir-contracts.js": "5.0.0-nightly.20260618",
"@aztec/noir-noirc_abi": "5.0.0-nightly.20260618",
"@aztec/protocol-contracts": "5.0.0-nightly.20260618",
"@aztec/pxe": "5.0.0-nightly.20260618",
"@aztec/stdlib": "5.0.0-nightly.20260618",
"@aztec/wallet-sdk": "5.0.0-nightly.20260618",
"@aztec-foundation/bb.js": "6.0.0-rc.1",
"@aztec-foundation/noir-noirc_abi": "6.0.0-rc.1",
"@aztec-labs/accounts": "6.0.0-rc.1",
"@aztec-labs/aztec.js": "6.0.0-rc.1",
"@aztec-labs/blob-lib": "6.0.0-rc.1",
"@aztec-labs/constants": "6.0.0-rc.1",
"@aztec-labs/entrypoints": "6.0.0-rc.1",
"@aztec-labs/ethereum": "6.0.0-rc.1",
"@aztec-labs/foundation": "6.0.0-rc.1",
"@aztec-labs/kv-store": "6.0.0-rc.1",
"@aztec-labs/noir-contracts.js": "6.0.0-rc.1",
"@aztec-labs/protocol-contracts": "6.0.0-rc.1",
"@aztec-labs/pxe": "6.0.0-rc.1",
"@aztec-labs/stdlib": "6.0.0-rc.1",
"@aztec-labs/wallet-sdk": "6.0.0-rc.1",
"@demo-wallet/shared": "workspace:*",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
Expand Down
6 changes: 3 additions & 3 deletions app/scripts/copyBB.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const { execSync } = require("child_process");
// Read package.json to get bb.js version
const packageJsonPath = path.join(__dirname, "../package.json");
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
const bbJsVersion = packageJson.dependencies["@aztec/bb.js"];
const bbJsVersion = packageJson.dependencies["@aztec-foundation/bb.js"];

if (!bbJsVersion) {
console.error("✗ @aztec/bb.js version not found in package.json");
console.error("✗ @aztec-foundation/bb.js version not found in package.json");
process.exit(1);
}

Expand Down Expand Up @@ -53,7 +53,7 @@ function getPlatformArch() {
// Main function
async function main() {
// Source paths
const BB_FOLDER = path.resolve(__dirname, "../../node_modules/@aztec/bb.js");
const BB_FOLDER = path.resolve(__dirname, "../../node_modules/@aztec-foundation/bb.js");

const BB_WASM_SOURCE = path.join(
BB_FOLDER,
Expand Down
6 changes: 3 additions & 3 deletions app/src/ipc/preload.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Aliased } from "@aztec/aztec.js/wallet";
import type { AztecAddress } from "@aztec/aztec.js/addresses";
import type { Aliased } from "@aztec-labs/aztec.js/wallet";
import type { AztecAddress } from "@aztec-labs/aztec.js/addresses";
import { contextBridge, ipcRenderer } from "electron";
import type { TxHash, TxReceipt } from "@aztec/stdlib/tx";
import type { TxHash, TxReceipt } from "@aztec-labs/stdlib/tx";
import type { WalletInteraction, WalletInteractionType } from "@demo-wallet/shared/core";

contextBridge.exposeInMainWorld("walletAPI", {
Expand Down Expand Up @@ -32,14 +32,14 @@
clearInteractions(stringifiedArgs: string): Promise<void> {
return ipcRenderer.invoke("clearInteractions", stringifiedArgs);
},
getExecutionTrace(stringifiedArgs: string): Promise<any> {

Check warning on line 35 in app/src/ipc/preload.ts

View workflow job for this annotation

GitHub Actions / Lint & Typecheck

Unexpected any. Specify a different type
return ipcRenderer.invoke("getExecutionTrace", stringifiedArgs);
},
// App authorization management
listAuthorizedApps(stringifiedArgs: string): Promise<string[]> {
return ipcRenderer.invoke("listAuthorizedApps", stringifiedArgs);
},
getAppCapabilities(stringifiedArgs: string): Promise<any> {

Check warning on line 42 in app/src/ipc/preload.ts

View workflow job for this annotation

GitHub Actions / Lint & Typecheck

Unexpected any. Specify a different type
return ipcRenderer.invoke("getAppCapabilities", stringifiedArgs);
},
resolveContractNames(stringifiedArgs: string): Promise<Record<string, string>> {
Expand Down
4 changes: 2 additions & 2 deletions app/src/ipc/wallet-internal-proxy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { promiseWithResolvers, type PromiseWithResolvers } from "@aztec/foundation/promise";
import { schemaHasMethod } from "@aztec/foundation/schemas";
import { promiseWithResolvers, type PromiseWithResolvers } from "@aztec-labs/foundation/promise";
import { schemaHasMethod } from "@aztec-labs/foundation/schemas";
import type { MessagePortMain } from "electron/main";
import {
type InternalWalletInterface,
Expand All @@ -14,7 +14,7 @@
};

export class WalletInternalProxy {
private inFlight = new Map<string, PromiseWithResolvers<any>>();

Check warning on line 17 in app/src/ipc/wallet-internal-proxy.ts

View workflow job for this annotation

GitHub Actions / Lint & Typecheck

Unexpected any. Specify a different type
private internalEventCallback!: OnWalletUpdateListener;
private authRequestCallback!: OnAuthorizationRequestListener;
private proofDebugExportCallback!: OnProofDebugExportRequestListener;
Expand Down Expand Up @@ -73,7 +73,7 @@
return new Proxy(wallet, {
get: (target, prop) => {
if (schemaHasMethod(InternalWalletInterfaceSchema, prop.toString())) {
return async (...args: any[]) => {

Check warning on line 76 in app/src/ipc/wallet-internal-proxy.ts

View workflow job for this annotation

GitHub Actions / Lint & Typecheck

Unexpected any. Specify a different type
return target.postMessage({
type: prop.toString() as keyof FunctionsOf<InternalWalletInterface>,
args,
Expand All @@ -91,7 +91,7 @@
args,
}: {
type: keyof FunctionsOf<InternalWalletInterface>;
args: any[];

Check warning on line 94 in app/src/ipc/wallet-internal-proxy.ts

View workflow job for this annotation

GitHub Actions / Lint & Typecheck

Unexpected any. Specify a different type
}) {
const messageId = globalThis.crypto.randomUUID();
const appId = "this";
Expand All @@ -104,7 +104,7 @@
chainInfo: { chainId, version },
};
this.internalPort.postMessage(message);
const { promise, resolve, reject } = promiseWithResolvers<any>();

Check warning on line 107 in app/src/ipc/wallet-internal-proxy.ts

View workflow job for this annotation

GitHub Actions / Lint & Typecheck

Unexpected any. Specify a different type
this.inFlight.set(messageId, { promise, resolve, reject });
return promise;
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/ui/utils/wallet-api.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { getSchemaReturnType, schemaHasMethod, type Fr } from "@aztec/foundation/schemas";
import { getSchemaReturnType, schemaHasMethod, type Fr } from "@aztec-labs/foundation/schemas";
import {
type InternalWalletInterface,
InternalWalletInterfaceSchema,
} from "@demo-wallet/shared/core";
import { jsonStringify } from "@aztec/foundation/json-rpc";
import { jsonStringify } from "@aztec-labs/foundation/json-rpc";

export class WalletApi {
private constructor(chainId: Fr, version: Fr) {
Expand Down
4 changes: 2 additions & 2 deletions app/src/utils/logger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createLogger, type Logger } from "@aztec/aztec.js/log";
import { createLogger, type Logger } from "@aztec-labs/aztec.js/log";
import type { MessagePortMain } from "electron";
import { jsonStringify } from "@aztec/foundation/json-rpc";
import { jsonStringify } from "@aztec-labs/foundation/json-rpc";

const logLevel = ["silent", "fatal", "error", "warn", "info", "verbose", "debug", "trace"] as const;
type LogLevel = (typeof logLevel)[number];
Expand Down
26 changes: 13 additions & 13 deletions app/src/workers/wallet-worker.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
import { createAztecNodeClient } from "@aztec/aztec.js/node";
import { type ChainInfo } from "@aztec/aztec.js/account";
import { WalletSchema } from "@aztec/aztec.js/wallet";
import { Fr } from "@aztec/aztec.js/fields";
import { getSchemaParameters, parseWithOptionals, schemaHasMethod } from "@aztec/foundation/schemas";
import { jsonStringify } from "@aztec/foundation/json-rpc";
import { type ChainInfo } from "@aztec-labs/aztec.js/account";
import { WalletSchema } from "@aztec-labs/aztec.js/wallet";
import { Fr } from "@aztec-labs/aztec.js/fields";
import { getSchemaParameters, parseWithOptionals, schemaHasMethod } from "@aztec-labs/foundation/schemas";
import { jsonStringify } from "@aztec-labs/foundation/json-rpc";
import type { MessagePortMain } from "electron";
import {
ExternalWallet,
InternalWallet,
WalletDB,
InternalWalletInterfaceSchema,
getNetworkByChainId,
createNodeClient,
} from "@demo-wallet/shared/core";
import { createProxyLogger } from "../utils/logger.ts";
import type { Logger } from "@aztec/foundation/log";
import type { Logger } from "@aztec-labs/foundation/log";
import type { AuthorizationRequest, AuthorizationResponse } from "@demo-wallet/shared/core";
import {
createPXE,
getPXEConfig,
type PXEConfig,
type PXECreationOptions,
} from "@aztec/pxe/server";
import { schemas } from "@aztec/stdlib/schemas";
} from "@aztec-labs/pxe/server";
import { schemas } from "@aztec-labs/stdlib/schemas";

import { createStore } from "@aztec/kv-store/lmdb-v2";
import { createStore } from "@aztec-labs/kv-store/lmdb-v2";
import { resolve, join } from "node:path";
import { z } from "zod";
import { homedir } from "node:os";
import { inspect } from "node:util";
import type { PromiseWithResolvers } from "@aztec/foundation/promise";
import { BackendType } from "@aztec/bb.js";
import type { PromiseWithResolvers } from "@aztec-labs/foundation/promise";
import { BackendType } from "@aztec-foundation/bb.js";

const ChainInfoSchema = z.object({
chainId: schemas.Fr,
Expand Down Expand Up @@ -62,7 +62,7 @@ async function init(
`Unknown network: chainId=${chainInfo.chainId.toNumber()}, version=${chainInfo.version.toNumber()}`,
);
}
const node = createAztecNodeClient(network.nodeUrl!);
const node = createNodeClient(network);
if (chainInfo.version.equals(new Fr(0))) {
const { rollupVersion } = await node.getNodeInfo();
chainInfo.version = new Fr(rollupVersion);
Expand Down
2 changes: 1 addition & 1 deletion app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
"allowArbitraryExtensions": true,
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*", "wallet-api.d.ts", "forge.env.d.ts"]
"include": ["src/**/*", "wallet-api.d.ts", "forge.env.d.ts", "../shared/src/env.d.ts"]
}
2 changes: 1 addition & 1 deletion app/vite.main.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default defineConfig({
// Our pino logger gets confused by electron, and tries to use the
// default nodejs transports in a web worker. This breaks everything since
// this app runs with nodeIntegration: false,
// so for the time being I'm using the escape hatch of making @aztec/foundation pino
// so for the time being I'm using the escape hatch of making @aztec-labs/foundation pino
// logger think we're in a jest test. Hehe.
JEST_WORKER_ID: "1",
LOG_LEVEL: "verbose",
Expand Down
12 changes: 12 additions & 0 deletions app/vite.renderer.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import { defineConfig, type Plugin } from "vite";
import { resolve } from "node:path";
import { readFileSync } from "node:fs";
import react from "@vitejs/plugin-react-swc";
import { PolyfillOptions, nodePolyfills } from "vite-plugin-node-polyfills";

// The Aztec SDK version the wallet is built against, read from this workspace's pinned
// @aztec-labs/aztec.js dependency and exposed to the UI via the `__AZTEC_SDK_VERSION__` define.
const aztecSdkVersion = (
JSON.parse(readFileSync(resolve(import.meta.dirname, "package.json"), "utf-8")).dependencies?.[
"@aztec-labs/aztec.js"
] ?? "unknown"
).replace(/^[\^~]/, "");

const nodePolyfillsFix = (options?: PolyfillOptions | undefined): Plugin => {
return {
...nodePolyfills(options),
Expand Down Expand Up @@ -35,4 +44,7 @@ export default defineConfig({
react({ jsxImportSource: "@emotion/react" }),
nodePolyfillsFix({ include: ["buffer", "path"] }),
],
define: {
__AZTEC_SDK_VERSION__: JSON.stringify(aztecSdkVersion),
},
});
2 changes: 1 addition & 1 deletion app/vite.worker.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default defineConfig({
build: {
rollupOptions: {
// This is required due to unfortunate electron-forge weirdness
external: ["@aztec/kv-store/lmdb-v2", "@aztec/bb.js"],
external: ["@aztec-labs/kv-store/lmdb-v2", "@aztec-foundation/bb.js"],
},
},
});
4 changes: 2 additions & 2 deletions extension/entrypoints/background.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BackgroundConnectionHandler } from "@aztec/wallet-sdk/extension/handlers";
import { WalletMessageType, type WalletResponse } from "@aztec/wallet-sdk/types";
import { BackgroundConnectionHandler } from "@aztec-labs/wallet-sdk/extension/handlers";
import { WalletMessageType, type WalletResponse } from "@aztec-labs/wallet-sdk/types";
import { ChunkReassembler } from "../utils/chunk_reassembler";

// Wallet configuration
Expand Down
2 changes: 1 addition & 1 deletion extension/entrypoints/content.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ContentScriptConnectionHandler } from "@aztec/wallet-sdk/extension/handlers";
import { ContentScriptConnectionHandler } from "@aztec-labs/wallet-sdk/extension/handlers";

/**
* Content script that acts as a pure message relay between the web page and the background script.
Expand Down
2 changes: 1 addition & 1 deletion extension/entrypoints/popup/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
import { hashToEmoji } from "@aztec/wallet-sdk/crypto";
import { hashToEmoji } from "@aztec-labs/wallet-sdk/crypto";
import "./App.css";

type Tab = "activity" | "settings";
Expand Down
Loading
Loading