Setting up your project
Let's start by setting up a regular Javascript NodeJS project. Feel free to skip this part if you're already familiar with project setup and head directly to connecting to the Sandbox.
Create a new project
We'll use yarn
for managing our project and dependencies, though you can also use npm
or your Javascript package manager of choice.
- Ensure your node version matches the definition in the prerequisites
node -v
and ensure that you are running sandbox version alpha-testnet
.
aztec-up alpha-testnet
- Create a new folder and initialize a new project.
mkdir sample-dapp
cd sample-dapp
yarn init -yp
- Add the
aztec.js
andaccounts
libraries as dependencies. Also addnoir-contracts.js
for quick use of example contracts:
yarn add @aztec/aztec.js@alpha-testnet @aztec/accounts@alpha-testnet @aztec/noir-contracts.js@alpha-testnet