Quick Demo using OnchainKit (5 mins)
This option uses the OnchainKit Wallet component. It is perfect for quickly experiencing Smart Wallet functionality with minimal setup.
What is OnchainKit?
OnchainKit is a suite of components allowing you to build your onchain app fast and quick. It is a very popular solution to build on Base. You can learn more about it here.
Step 1: Clone the Template Repository
Let’s start by cloning the repository. Open a terminal and execute the following:
Step 2: Set Up Environment Variables
Before running your project, you need to set up your environment variables. Follow these steps:
Get a ReOwn Project ID
- Sign up to ReOwn Cloud
- Click on Create, and go through the steps (screenshot below):
- Name your app (eg. OnchainKit-Template)
- Select a product - Choose WalletKit
- Select a platform - Choose JavaScript
Get a Coinbase Developer Platform (CDP) Client API Key
- Sign up to Coinbase Developer Platform (CDP)
- Create a new project and copy the Client API Key (screenshot below)
Create your .env file
Now that you have obtained your ReOwn Project ID and CDP API Key, it is time to create the .env file:
- Copy
.env.local.default
from to the repository root and name it.env
- Leave
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID
andNEXT_PUBLIC_ENVIRONMENT
as they are - Replace
NEXT_PUBLIC_CDP_API_KEY
andNEXT_PUBLIC_WC_PROJECT_ID
with their respective values obtained from the previous steps
Congratulations! We are ready to run the application.
Step 3: Install Dependencies and Run
Open your terminal, make sure you are at the directory /onchain-app-template
and execute the following:
Make sure Bun is installed
This example uses Bun as a preferred package manager. If you run into an error because you don’t have Bun installed you can run the following command to install it:
Your app will be available at http://localhost:3000
Step 4: Explore Smart Wallet Features
The template includes:
- Pre-integrated Wallet component
- OnchainKit components for blockchain interactions
- Basic authentication flow
- Transaction handling (NFT Mint)
This setup is ideal for:
- Beginners exploring onchain apps and Smart Wallet functionality
- Developers evaluating Smart Wallet capabilities
- Quick prototyping
If you are looking for a more in depth understanding of Smart Wallet, jump ahead to the Explore More Features section.