This post assumes that you already have a basic Expo project. For instructions on creating one, see the guides for Windows or Mac.
Let's explore how to connect and use Reown WalletKit in a React Native (Expo) app. Reown WalletKit is a library that helps developers easily implement digital wallet features such as wallet connections, transaction history, and authentication. Before connecting with WalletConnect, see this post on creating a blockchain wallet in React Native.
Reown is a company focused on user experience, offering AppKit and WalletKit toolkits to help people building onchain unlock better experiences. (Source: Reown websiteโ)
Reown's SDKs fall into two main categories.
AppKit
is a comprehensive SDK for creating a seamless onchain experience, with email and social login, gas sponsorship, multichain support, onramps, swaps, user insights, and access to more than 600 wallets.
WalletKit
is an open-source SDK for seamless wallet connections across blockchains. It offers one-click authentication, secure transaction signing, phishing protection, and advanced onchain features such as batch transactions and paymasters.
Simply put, AppKit is an SDK for building Dapps, while WalletKit is an SDK for connecting wallets. In this post, we will use
WalletKit
to add digital wallet functionality to a React Native app.
You need a project_id to use Reown, so create a Reown project first.
Sign in to Reownโ
Follow the instructions to create a project, then find its project ID on the dashboard.
Reown project ID
The connection setup is now complete. Next, we will write code to integrate WalletKit into the app.
First, create a blank screen and initialize WalletKit with WalletKit.init. Pass the Core object provided by Reown as the core property, and set the wallet's name, description, icons, redirect URLs, and other details in metadata. The WalletKit.init method returns a Promise, so you can use the returned WalletKit object when initialization completes. Here, we will use useState to keep the WalletKit object in state.
For Core's projectId, use the project ID from Create a Reown Project.
In this post, we explored how to connect and use Reown WalletKit in a React Native (Expo) app. Reown WalletKit makes it easy to implement digital wallet functionality, improve the user experience, and make blockchain-based services more accessible.