Skip to main content

Overview

Reown AppKit (formerly WalletConnect) is a library for adding wallet connections to your onchain applications. It provides a polished modal interface with support for multiple wallets, email authentication, and social logins. By integrating Reown with Base Account, you can provide users with seamless onboarding through Base’s native smart wallet while maintaining access to other sign in methods.

What you’ll achieve

By the end of this guide, you will:
  • Set up Reown AppKit with Base Account as a featured wallet option
  • Configure the modal to prioritize Base Account in the wallet list
  • Optionally add a custom Coinbase Wallet connector for legacy SDK access
You can jump ahead and use the Base Account Reown Template to get started:

Installation

After creating a new Next.js project, install the required dependencies:

Get Your Reown Project ID

Before you can use Reown AppKit, you need to obtain a project ID from Reown Cloud.
  1. Visit Reown Cloud Dashboard
  2. Sign up for a free account or log in if you already have one
  3. Create a new project and copy the project ID

Configuration

1. Set up Environment Variables

Create a .env.local file in your project root:
.env.local

2. Configure the Wagmi Adapter

Create a config file to set up the Wagmi adapter with your networks:
src/config/index.ts

3. Create the AppKit Provider

Create a context provider that initializes AppKit and wraps your application:
src/context/index.tsx

4. Add Provider to Layout

Update your root layout to use the context provider:
src/app/layout.tsx
To learn more about configuration options for Reown AppKit, please refer to the Reown AppKit documentation.

Usage

Using the AppKit Button

Reown provides a web component for the connect button. Create a component to use it:
src/components/ConnectButton.tsx
Then use it in your page:
src/app/page.tsx

Run the project locally

You should see a page with a connect button. Clicking it will open the Reown modal with Base Account as the featured wallet option.
Reown AppKit with Base Account

Adding Coinbase Wallet SDK Connector

If you need access to the legacy Coinbase Wallet SDK (for EOA wallet support), you can add a custom connector alongside Base Account.
Base Account uses the newer Base Account SDK. If your application specifically requires the legacy Coinbase Wallet SDK features, you can add a custom connector as shown below.

Update the Wagmi Adapter

Modify your config to include the Coinbase Wallet connector:
src/config/index.ts

Coinbase Wallet Preference Options

The preference option controls which wallet type is displayed: