Git Product home page Git Product logo

pietergreyling / aztec_web3_starter Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 4.17 MB

The purpose of this tutorial repository is to provide a Web 3.0 Aztec Network getting started learning path for Web 2.0 developers who are new to working with Aztec technology and Web 3.0 in general

License: MIT License

aztec aztec-protocol blockchain blockchain-technology ethereum web3 aztec-network zk-money

aztec_web3_starter's Introduction

Getting Started with a Web 3 Aztec Protocol SDK Project

Introduction

The Purpose of this Learning Path is to document, or log, a Developer Journey

The purpose of this tutorial repository is to provide a Web 3.0 Aztec Network getting started learning path for Web 2.0 developers who are new to working with Aztec technology and Web 3.0 in general.

There are several screenshots in this tutorial. They are not necessarily applicable to your own personal developer path and experience - they are a general guide.

What is Aztec Network?

Aztec is an open source layer 2 protocol (or network) which aims to bring scalability and privacy to Ethereum. It strives to enable affordable, private crypto payments via zero-knowledge proofs.

From the Aztec Vision website

Privacy isn't just a human right, it's a tool for creativity. With privacy by default, the world of games, NFTs, and DeFi applications just got bigger. Aztec is an open source layer 2 network that aims to bring scalability and privacy to Ethereum. It strives to enable affordable, private crypto payments via zero-knowledge proofs. Aztec is built from the ground up to be privacy-first.


Prerequisite steps: Begin Here

Read the Aztec Protocol/Network Related Documentation

Watch the Aztec Videos


Install Discord

Discord will help you to communicate with the Aztec Network Developer Relations Engineering team.


Set up a MetaMask Wallet


How to set up the Aztec Mainnet Fork for Development

Please refer to the following

Use these details to configure the Aztec Mainnet Fork on your wallet

  • Network Name (recommended)
Aztec Mainnet Fork
  • RPC URL
https://mainnet-fork.aztec.network
  • Chain ID
677868
  • Currency Symbol
ETH
  • Rollup Provider URL
https://api.aztec.network/aztec-connect-testnet/falafel
  • Block Explorer URL (optional)
https://aztec-connect-testnet-explorer.aztec.network

Adding the Aztec Mainnet Fork to your MetaMask Wallet with the Chrome Web Extension

Adding the Aztec Mainnet Fork to your MetaMask Wallet with the Android Mobile App


Building the Aztec SDK Starter Code on macOS and Linux

These notes record steps that were performed on a macOS development laptop and a Linux (Ubuntu) development laptop.

Other operating systems should have similar options to enable the equivalent operations.

I use the Homebrew package manager on my macOS development laptop.

Package managers like Homebrew for macOS have equivalents such as Chocolatey for Windows and many others for Linux.

Here is a list of software package management systems:


Read/refer to these resources


Install the SDK starter runtime dependencies

For your reference; How to install Homebrew, NodeJS and NPM on macOS

I already have Homebrew on my macOS system, so I will proceed with installing NodeJS, NPM and Yarn.

$ cd ~

# -- Node
$ brew install node
$ brew info node
$ brew info npm

# -- Yarn
$ brew install yarn
$ brew info yarn

On Linux (Debian/Ubuntu distributions), do the following.

$ cd ~
$ sudo apt-get install -y build-essential
$ curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash - && sudo apt-get install -y nodejs
$ sudo npm install -g npm
$ which node
$ which npm
$ node -v
$ npm -v

As recommended by the official Yarn documentation, install and activate yarn using corepack.

$ sudo npm i -g corepack
$ which corepack
$ corepack enable
$ corepack prepare yarn@stable --activate
$ yarn set version stable
$ which yarn             
$ yarn --version

Do the following if it becomes necessary to remove/uninstall yarn with corepack:

$ sudo corepack disable yarn

Ensure that TypeScript and its dependencies are installed.

$ npm install ts-node --save-dev
$ npm install typescript -g
$ npm install typescript --save-dev

On Linux.

$ sudo npm install ts-node --save-dev
$ sudo npm install typescript -g
$ sudo npm install typescript --save-dev

Clone the SDK starter repository from GitHub

$ mkdir AztecProtocol
$ cd AztecProtocol
$ git clone https://github.com/AztecProtocol/aztec-sdk-starter.git
$ cd aztec-sdk-starter
$ ls -al


Install the SDK starter package dependencies

On macOS.

$ yarn

Be sure to pick the highest, most recent, version number of @aztec/bridge-clients.

On Linux.

$ yarn

Also make sure to periodically check for updates to the repository and dependencies.

$ git pull
$ yarn up

Yarn upgrade on Linux.


Create and configure the SDK Environment File and run the SDK Setup Script

Refer to the following section of the SDK starter repository documentation.

Remain inside the root directory of your local (cloned) aztec-sdk-starter repository and copy the provided example environment script, .env.example, in order to create a .env file.

$ cp .env.example .env
$ ls -al .env*
$ cat .env

Edit your new .env file and add your Ethereum private key or mnemonic.

  • DO NOT DISCLOSE THIS TO ANYONE!
  • NEVER PUSH THE .env FILE TO ANY PUBLIC REPOSITORY!
  • The local Git repository .gitignore file should have an exclusion entry for .env.

Now run the ./src/latest/index.ts SDK setup script.

$ yarn go

General Web 3.0 References


Aztec Connect/Protocol Resources


LICENSE for this content

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

aztec_web3_starter's People

Contributors

pietergreyling avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

aztec_web3_starter's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.