Rootstock Reown-Wagmi Starter Kit
The Rootstock Reown-Wagmi starter kit provides a foundation for building decentralized applications (dApps) on the Rootstock blockchain. It leverages the security of Bitcoin and the flexibility of Ethereum.
The kit uses Reown (previously WalletConnect) to handle wallet management, Wagmi, a React Hooks library, to simplify smart contracts and blockchain network interactions, and Shadcn libraries, a set of customizable and accessible UI components for React, designed to streamline frontend development.
This starter kit is designed to help developers jump-start their dApp development journey on Rootstock.
Prerequisites
- Node.js and Git: Ensure that Node.js and Git are installed on your system.
- See the Prerequisites section for how to download Node.js using NVM.
- Package Manager: You can use either Yarn or npm to manage your project dependencies:
- Yarn: Install Yarn, a package manager for Node.js projects. You can do this by running the following command in your terminal:
npm install -g yarn
- npm: npm comes bundled with the Node.js installation. To verify your npm installation, run:
If you need to update npm to the latest version, you can run:
npm -v
npm install -g npm@latest
- Yarn: Install Yarn, a package manager for Node.js projects. You can do this by running the following command in your terminal:
- Basic Knowledge:
Learn how to write, test, secure, deploy, and verify smart contracts on the Rootstock blockchain network. Enroll in the Rootstock Blockchain Developer Course.
Setup
1. Clone the Repository
First, you’ll need to clone the Rootstock Reown Starter Kit repository. Open your terminal and run the following commands:
git clone https://github.com/rsksmart/rsk-reown-starter-kit
cd rsk-reown-starter-kit
2. Get Project ID
Every dApp that relies on Reown (previously WalletConnect) now needs to obtain a project ID from Reown Cloud. This is free and only takes a few minutes.
To get the key:
- Go to Reown and sign up.
- Create a new project by clicking on Create Project.
- Add a name and link to your project, on the product selection screen, select WalletKit and continue.
- Your project ID is shown in the left menu under your project name. Click to copy it
3. Environment Setup
To set up your environment, follow these steps:
- Create a
.env
file and add environment variables.VITE_WC_PROJECT_ID=Your project ID from Reown Cloud
VITE_BUNDLER_API_KEY='etherspot_public_key'
VITE_CUSTOM_BUNDLER_URL=https://rootstocktestnet-bundler.etherspot.io/ - Enter your project ID. For testnet purposes, you can keep the Etherspot Bundler API key and Bundler URL. If you need a production environment, please go to Etherspot, create an account, and obtain your API key.
4. Install Dependencies
Before running the project, make sure to have the necessary dependencies installed. You can use NPM or Yarn. Run the following command to install dependencies:
yarn
5. Run the Project
Now that you’ve cloned the repository and installed dependencies, it’s time to run the project. Execute the following command:
yarn dev
This will start the Rootstock Reown Starter dApp locally, allowing you to develop and test your smart contracts. You can access the Vite server at http://localhost:5173.
Result

After successfully running your project using the command above, do the following:
- Click the “Connect” button to log in. Once connected, you can:
- Switch Networks: Easily switch between Mainnet and Testnet.
- View and Copy Your Address: Access your wallet address.
- Check Your tRBTC Balance: See your tRBTC balance.
- Disconnect: Log out from the project.