A Verified Donation Platform demonstrating the integration of zero-knowledge identity proofs with secure cross-chain transfers.
This monorepo combines:
- ZKPassport SDK for privacy-preserving identity verification
- Aztec Network for private smart contract execution
- Wormhole for secure cross-chain messaging
- Arbitrum for EVM compatibility
The application enables users to make donations with verified identity proofs (age, citizenship, etc.) without revealing personal information. The donation flow involves:
- Identity Verification: Users prove their identity using ZKPassport (passport/ID verification)
- Zero-Knowledge Proofs: Generate cryptographic proofs without revealing personal data
- Cross-Chain Transfer: Bridge tokens from Arbitrum to Aztec using Wormhole
- Private Execution: Process donations on Aztec with full privacy
This project uses Turborepo for efficient monorepo management:
aztec-wormhole-app-demo/
βββ packages/
β βββ frontend/ # Next.js web application
β β βββ app/
β β βββ artifacts/ # Compiled Aztec contract artifacts (auto-generated)
β β βββ scripts/ # Contract deployment & interaction scripts
β β βββ assets/ # Contract addresses & configuration
β βββ aztec-contracts/ # Noir smart contracts for Aztec
β β βββ emitter/ # ZKPassport credential emitter contract
β β βββ wormhole/ # Wormhole protocol implementation
β β βββ wormhole-source/ # Git submodule (NethermindEth/wormhole)
β βββ evm-contracts/ # Solidity contracts (Foundry)
β β βββ src/ # Contract sources (Vault, Donation, BridgeToken)
β β βββ script/ # Deployment scripts
β βββ relayer/ # Go-based bidirectional Aztec-Arbitrum relayer
βββ package.json # Root workspace configuration
βββ turbo.json # Turborepo configuration
Before you begin, ensure you have the following installed:
-
Node.js: Version
>=20.9.0(required by Next.js 16)# Check your Node version node --version # Using nvm (recommended) nvm install 20 nvm use 20
-
npm: Version
>=10.0.0(comes with Node.js 20+) -
Aztec Nargo: For compiling Aztec contracts (optional if using pre-built artifacts)
# Install Aztec bash -i <(curl -s https://install.aztec.network)
See Aztec Installation Guide for details.
-
Go: For running the relayer (optional if you only want to run the frontend)
-
Foundry: For EVM contract development (optional)
-
Clone the repository with submodules
git clone --recurse-submodules <repository-url> cd aztec-wormhole-app-demo
Already cloned without submodules? Initialize them:
git submodule update --init --recursive
Note: This project uses Git submodules for Wormhole protocol implementations:
packages/evm-contracts/lib/wormhole- For Solidity contract dependenciespackages/aztec-contracts/wormhole-source- For Aztec/Noir contract sources (aztec branch)
The
--recurse-submodulesflag ensures all dependencies are properly initialized. -
Install dependencies
npm install
This will install dependencies for all packages in the monorepo.
To start all development servers in parallel:
npm run devThis will start:
- Frontend at
http://localhost:3000 - Relayer service (if configured)
- Any other configured services
To run only the frontend:
cd packages/frontend
npm run devOr using Turborepo filters:
npx turbo run dev --filter=aztec-wormhole-demo-frontendBuild all packages:
npm run buildBuild specific package:
cd packages/frontend
npm run buildTechnology Stack:
- Next.js 16 (React 19) with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- Aztec.js 2.0.3 for Aztec network interaction
- ZKPassport SDK 0.10.0 for identity verification
Key Dependencies:
{
"@aztec/accounts": "2.0.3",
"@aztec/aztec.js": "2.0.3",
"@aztec/noir-contracts.js": "2.0.3",
"@zkpassport/sdk": "0.10.0",
"@zkpassport/utils": "0.25.3"
}Features:
- QR code generation for mobile identity verification
- Real-time proof generation status
- Cross-chain donation tracking
- Beautiful, responsive UI
Scripts:
npm run dev- Start development servernpm run build- Create production buildnpm run start- Start production servernpm run lint- Run ESLint
Technology Stack:
- Noir programming language
- Aztec Nargo compiler
- Aztec SDK for contract deployment
This package contains two Noir smart contracts for the Aztec network:
The ZKPassportCredentialEmitter contract for managing verified credentials on Aztec.
The Aztec implementation of the Wormhole protocol for cross-chain messaging. Sources are symlinked from the wormhole-source git submodule (NethermindEth/wormhole, aztec branch).
Both contracts follow the same build pipeline:
- Compilation: Contracts are compiled using
aztec-nargo compile - Artifact Output: Compiled JSON artifacts are generated in each contract's
target/directory - Auto-Copy: A post-build script automatically copies artifacts to
packages/frontend/app/artifacts/
Build Process:
# Build all Aztec contracts (via Turborepo)
npm run build
# Or build individually
cd packages/aztec-contracts/emitter
npm run build # Compiles and copies emitter-ZKPassportCredentialEmitter.json
cd packages/aztec-contracts/wormhole
npm run build # Compiles and copies wormhole_contracts-Wormhole.jsonGenerated Artifacts:
packages/frontend/app/artifacts/emitter-ZKPassportCredentialEmitter.jsonpackages/frontend/app/artifacts/wormhole_contracts-Wormhole.json
These artifacts are imported by the frontend scripts (deploy.mjs, send-message.mjs) for contract interaction.
Note: The artifacts are auto-generated and should not be manually edited. To update them, modify the Noir source code and rebuild.
Technology Stack:
- Solidity smart contracts
- Foundry for development and testing
- OpenZeppelin contracts for security
Contracts:
Vault.sol- Main vault contract for cross-chain operationsDonation.sol- Donation handling logicBridgeToken.sol- Token bridging functionality
Scripts:
- Deploy script using Foundry in
script/DeployVault.s.sol
Technology Stack:
- Go for high-performance message relaying
- Connects to Aztec PXE and Arbitrum RPC
- Monitors Wormhole spy service
Handles bidirectional message passing between Aztec and Arbitrum networks.
Copy the example environment file and configure:
cp env.example .envKey environment variables (see env.example for full list):
- Aztec network configuration
- Arbitrum RPC endpoints
- Contract addresses
- Wormhole settings
The frontend may require additional configuration in packages/frontend:
- Aztec PXE endpoint
- ZKPassport service configuration
- API endpoints
The application has been tested with:
- β TypeScript compilation
- β ESLint validation
- β Production build generation
- β Runtime functionality (form validation, UI rendering)
- Aztec Documentation
- ZKPassport Documentation
- Wormhole Documentation
- Next.js Documentation
- Turborepo Documentation
Error: Cannot find module 'wormhole/ethereum/contracts/...' or compilation failures in contracts
Cause: Wormhole submodules weren't initialized during clone.
Solution:
git submodule update --init --recursiveFor EVM contracts, rebuild after initializing submodules:
cd packages/evm-contracts
forge buildFor Aztec contracts, the Wormhole contract sources are symlinked from the wormhole-source submodule. If you see broken symlinks or compilation errors:
# Ensure submodules are initialized
git submodule update --init --recursive
# Rebuild Aztec contracts
cd packages/aztec-contracts/wormhole
npm run buildError: You are using Node.js X.X.X. For Next.js, Node.js version ">=20.9.0" is required.
Solution: Upgrade to Node.js 20 or higher:
nvm install 20
nvm use 20Warning: Next.js detects multiple package-lock.json files
Solution: This is expected in a monorepo. You can ignore this warning or configure turbopack.root in next.config.ts.
Error: Port 3000 is already in use
Solution: Kill the existing process or use a different port:
# Kill process on port 3000
pkill -f "next dev"
# Or start on a different port
PORT=3001 npm run devThis is a demo application showcasing the integration of multiple Web3 technologies. For contributions or questions, please refer to the individual package documentation.
See LICENSE file for details.