This document explains how we integrated Aztec wallet creation into Nebula, allowing for automated account creation during user registration.
The integration allows your application to:
- Create Aztec accounts programmatically during user registration
- Store wallet information securely
- Handle the complexities of the Aztec CLI
- Prevent duplicate wallet creation for existing users
- Node.js 14.x or later
- Next.js application
- Docker installed and running
- Aztec Sandbox installed
-
Install the Aztec toolchain:
bash -i <(curl -s https://install.aztec.network)
-
Install required dependencies:
npm install child_process fs path util
-
For MacOS users, install socat:
brew install socat
-
Start the Aztec sandbox:
aztec start --sandbox
-
fork and clone the repository
-
run the npm installation command
npm install
-
copy the env.template into an env.local and provide the credentials needed inside it
cp env.template env.local
-
make sure to start your docker engine and the aztec sandbox. Install the sandbox if you haven't
aztec start --sandbox
- run the app on development
npm run dev
- visit the local development url and register or login with Google to get access to all the features.
To update the Aztec toolchain:
aztec-up
To verify wallet information for a user directly from the CLI:
aztec-wallet get-alias accounts:<alias>
If you encounter issues:
- Ensure the Aztec sandbox is running:
aztec status
- Restart the sandbox:
aztec stop && aztec start --sandbox
- Check for errors in the logs:
aztec logs
- Try creating a wallet manually to verify the CLI works:
aztec-wallet create-account -a test-account -payment method=fee_juice,feePayer=test0