Skip to content

Commit 74a9059

Browse files
committed
use sdk
1 parent 064360b commit 74a9059

File tree

8 files changed

+347
-4843
lines changed

8 files changed

+347
-4843
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ curl -s https://install.aztec.network | bash
3333

3434
### 3. Set Aztec Version
3535

36-
The project uses Aztec version `v3.0.0-devnet.20251212`. Set it using:
36+
The project uses Aztec version `v3.0.0-nightly.20260106`. Set it using:
3737

3838
```bash
39-
aztec-up 3.0.0-devnet.20251212
39+
aztec-up 3.0.0-nightly.20260106
4040
```
4141

4242
## Development Setup

contracts/proof_of_password/Nargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type = "contract"
44
authors = [""]
55

66
[dependencies]
7-
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-devnet.20251212", directory = "noir-projects/aztec-nr/aztec" }
8-
token = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-devnet.20251212", directory = "noir-projects/noir-contracts/contracts/app/token_contract" }
7+
aztec = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260106", directory = "noir-projects/aztec-nr/aztec" }
8+
token = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260106", directory = "noir-projects/noir-contracts/contracts/app/token_contract" }
99
poseidon = { tag = "v0.1.1", git = "https://github.com/noir-lang/poseidon" }
10-
compressed_string = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-devnet.20251212", directory = "noir-projects/aztec-nr/compressed-string" }
10+
compressed_string = { git = "https://github.com/AztecProtocol/aztec-packages/", tag = "v3.0.0-nightly.20260106", directory = "noir-projects/aztec-nr/compressed-string" }

package.json

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"serve": "vite",
1010
"build": "tsc -b && vite build",
1111
"lint": "eslint .",
12-
"copy:dependencies": "cd contracts && aztec check && WORKDIR=$(pwd) && cd $HOME/nargo/github.com/AztecProtocol/aztec-packages/v3.0.0-devnet.20251212/noir-projects/noir-contracts && aztec compile --package token_contract && mkdir -p $WORKDIR/target && cp $HOME/nargo/github.com/AztecProtocol/aztec-packages/v3.0.0-devnet.20251212/noir-projects/noir-contracts/target/token_contract-Token.json $WORKDIR/target/token_contract-Token.json",
12+
"copy:dependencies": "cd contracts && aztec check && WORKDIR=$(pwd) && cd $HOME/nargo/github.com/AztecProtocol/aztec-packages/v3.0.0-nightly.20260106/noir-projects/noir-contracts && aztec compile --package token_contract && mkdir -p $WORKDIR/target && cp $HOME/nargo/github.com/AztecProtocol/aztec-packages/v3.0.0-nightly.20260106/noir-projects/noir-contracts/target/token_contract-Token.json $WORKDIR/target/token_contract-Token.json",
1313
"compile:contracts": "cd contracts && aztec compile --package proof_of_password && aztec codegen ./target/proof_of_password-ProofOfPassword.json",
1414
"test": "cd contracts && aztec test",
1515
"preview": "vite preview",
@@ -19,15 +19,15 @@
1919
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src"
2020
},
2121
"dependencies": {
22-
"@aztec/accounts": "v3.0.0-devnet.20251212",
23-
"@aztec/aztec.js": "v3.0.0-devnet.20251212",
24-
"@aztec/constants": "v3.0.0-devnet.20251212",
25-
"@aztec/entrypoints": "v3.0.0-devnet.20251212",
26-
"@aztec/foundation": "v3.0.0-devnet.20251212",
27-
"@aztec/noir-contracts.js": "v3.0.0-devnet.20251212",
28-
"@aztec/pxe": "v3.0.0-devnet.20251212",
29-
"@aztec/stdlib": "v3.0.0-devnet.20251212",
30-
"@aztec/wallet-sdk": "v3.0.0-devnet.20251212",
22+
"@aztec/accounts": "v3.0.0-nightly.20260106",
23+
"@aztec/aztec.js": "v3.0.0-nightly.20260106",
24+
"@aztec/constants": "v3.0.0-nightly.20260106",
25+
"@aztec/entrypoints": "v3.0.0-nightly.20260106",
26+
"@aztec/foundation": "v3.0.0-nightly.20260106",
27+
"@aztec/noir-contracts.js": "v3.0.0-nightly.20260106",
28+
"@aztec/pxe": "v3.0.0-nightly.20260106",
29+
"@aztec/stdlib": "v3.0.0-nightly.20260106",
30+
"@aztec/wallet-sdk": "v3.0.0-nightly.20260106",
3131
"@emotion/react": "^11.14.0",
3232
"@emotion/styled": "^11.14.0",
3333
"@mui/icons-material": "^6.3.1",
@@ -40,7 +40,7 @@
4040
"zod": "^3.23.8"
4141
},
4242
"devDependencies": {
43-
"@aztec/test-wallet": "v3.0.0-devnet.20251212",
43+
"@aztec/test-wallet": "v3.0.0-nightly.20260106",
4444
"@eslint/js": "^9.18.0",
4545
"@playwright/test": "1.49.0",
4646
"@types/buffer-json": "^2",
@@ -58,5 +58,46 @@
5858
"typescript-eslint": "^8.11.0",
5959
"vite": "^7.1.4",
6060
"vite-plugin-node-polyfills": "^0.24.0"
61+
},
62+
"resolutions": {
63+
"@aztec/accounts": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/accounts",
64+
"@aztec/archiver": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/archiver",
65+
"@aztec/aztec.js": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/aztec.js",
66+
"@aztec/bb.js": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/barretenberg/ts",
67+
"@aztec/bb-prover": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/bb-prover",
68+
"@aztec/blob-client": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/blob-client",
69+
"@aztec/blob-lib": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/blob-lib",
70+
"@aztec/builder": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/builder",
71+
"@aztec/constants": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/constants",
72+
"@aztec/entrypoints": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/entrypoints",
73+
"@aztec/epoch-cache": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/epoch-cache",
74+
"@aztec/ethereum": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/ethereum",
75+
"@aztec/foundation": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/foundation",
76+
"@aztec/key-store": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/key-store",
77+
"@aztec/kv-store": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/kv-store",
78+
"@aztec/l1-artifacts": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/l1-artifacts",
79+
"@aztec/merkle-tree": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/merkle-tree",
80+
"@aztec/native": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/native",
81+
"@aztec/noir-acvm_js": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/noir/packages/acvm_js",
82+
"@aztec/noir-contracts.js": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/noir-contracts.js",
83+
"@aztec/noir-noir_codegen": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/noir/packages/noir_codegen",
84+
"@aztec/noir-noirc_abi": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/noir/packages/noirc_abi",
85+
"@aztec/noir-protocol-circuits-types": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/noir-protocol-circuits-types",
86+
"@aztec/noir-types": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/noir/packages/types",
87+
"@aztec/node-keystore": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/node-keystore",
88+
"@aztec/node-lib": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/node-lib",
89+
"@aztec/p2p": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/p2p",
90+
"@aztec/protocol-contracts": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/protocol-contracts",
91+
"@aztec/prover-client": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/prover-client",
92+
"@aztec/pxe": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/pxe",
93+
"@aztec/sequencer-client": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/sequencer-client",
94+
"@aztec/simulator": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/simulator",
95+
"@aztec/slasher": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/slasher",
96+
"@aztec/stdlib": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/stdlib",
97+
"@aztec/telemetry-client": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/telemetry-client",
98+
"@aztec/validator-client": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/validator-client",
99+
"@aztec/wallet-sdk": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/wallet-sdk",
100+
"@aztec/world-state": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/world-state",
101+
"@aztec/test-wallet": "link:/Users/gregoriojulianaquiros/Repos/aztec-packages/yarn-project/test-wallet"
61102
}
62103
}

scripts/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const NETWORK = getNetworkFromArgs();
3838
// Network-specific node URLs (hardcoded, not configurable)
3939
const NETWORK_URLS: Record<string, string> = {
4040
local: 'http://localhost:8080',
41-
devnet: 'https://devnet.aztec-labs.com',
41+
devnet: 'https://next.devnet.aztec-labs.com',
4242
};
4343

4444
const AZTEC_NODE_URL = NETWORK_URLS[NETWORK];

src/contexts/WalletContext.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { createContext, useContext, useState, useEffect, useRef, type ReactNode, useCallback } from 'react';
22
import { EmbeddedWallet } from '../embedded_wallet';
3-
import { ExtensionWallet } from '../extension_wallet';
43
import { createAztecNodeClient, type AztecNode } from '@aztec/aztec.js/node';
54
import type { Wallet } from '@aztec/aztec.js/wallet';
65
import type { AztecAddress } from '@aztec/aztec.js/addresses';
76
import type { ChainInfo } from '@aztec/aztec.js/account';
87
import { useNetwork } from './NetworkContext';
98
import { Fr } from '@aztec/aztec.js/fields';
9+
import { WalletManager } from '@aztec/wallet-sdk/manager';
1010

1111
interface WalletContextType {
1212
wallet: Wallet | null;
@@ -111,7 +111,18 @@ export function WalletProvider({ children }: WalletProviderProps) {
111111
};
112112

113113
const appId = 'gregoswap';
114-
const extensionWallet = ExtensionWallet.create(chainInfo, appId);
114+
115+
// Use WalletManager to discover and connect to extension wallets
116+
const manager = WalletManager.configure({ extensions: { enabled: true } });
117+
const providers = await manager.getAvailableWallets({ chainInfo, timeout: 2000 });
118+
119+
if (providers.length === 0) {
120+
throw new Error('No wallet extensions found. Please install a compatible Aztec wallet extension.');
121+
}
122+
123+
// Connect to the first available wallet provider
124+
const provider = providers[0];
125+
const extensionWallet = await provider.connect(appId);
115126

116127
// Mark that user explicitly connected an external wallet
117128
hasConnectedExternalWalletRef.current = true;

src/extension_wallet.ts

Lines changed: 0 additions & 63 deletions
This file was deleted.

vite.config.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig, loadEnv, Plugin, ResolvedConfig } from 'vite';
1+
import { defineConfig, loadEnv, Plugin, ResolvedConfig, searchForWorkspaceRoot } from 'vite';
22
import react from '@vitejs/plugin-react-swc';
33
import { PolyfillOptions, nodePolyfills } from 'vite-plugin-node-polyfills';
44
import fs from 'fs';
@@ -104,6 +104,17 @@ export default defineConfig(({ mode }) => {
104104
'Cross-Origin-Opener-Policy': 'same-origin',
105105
'Cross-Origin-Embedder-Policy': 'require-corp',
106106
},
107+
// Allow vite to serve files from these directories, since they are symlinked
108+
// These are the protocol circuit artifacts, noir WASMs and bb WASMs.
109+
fs: {
110+
allow: [
111+
searchForWorkspaceRoot(process.cwd()),
112+
'../aztec-packages/yarn-project/noir-protocol-circuits-types/artifacts',
113+
'../aztec-packages/noir/packages/noirc_abi/web',
114+
'../aztec-packages/noir/packages/acvm_js/web',
115+
'../aztec-packages/barretenberg/ts/dest/browser',
116+
],
117+
},
107118
},
108119
optimizeDeps: {
109120
exclude: ['@aztec/noir-acvm_js', '@aztec/noir-noirc_abi'],

0 commit comments

Comments
 (0)