Overview
Through this tutorial, we will show you how to use Bel2's ZKP SDK as a client app developer.
The library abstracts various versions of popular EVM providers for convenience.
- ethers v6
- ethers v5
But we will focus on ethers v6 for the rest of the tutorial. For more information, refer to the SDK documenatation or to the SDK repository
Prerequesites
- Node.js (version 12 or higher)
yarn
SDK Package installation
yarn add @bel2labs/sdk
Configuration
Setting Up EVM Provider:
- Install ether.js
yarn add ethers@6
- Import and configure ethers in your project:
The following sample is for React projects
import { ethers } from "ethers";
const provider = new ethers.BrowserProvider(window.ethereum);