Skip to main content
This guide walks you through using the wallet template which uses Expo, React Native, and Privy embedded wallet to build a mobile app on Monad. Start developing by editing the files inside the app directory. This project uses file-based routing.
This template also has a demo branch that you can switch to in order to view the demo project.You can switch using the following command:

Prerequisites

  • Node.js
  • NPM
  • Expo CLI (Install using the following command: npm i -g expo-cli)
  • a Privy account
  • Android Studio (API version 35 and above)
    • Guide to setup Android Studio for Expo is available here
  • XCode
    • Guide to setup iOS Simulator for Expo is available here
  1. Create app:
create appnameing app
  1. Set up login methods:
set up login methods
  1. Enable email:
enable email
  1. Enable “Automatically create embedded wallets on login” and select “EVM Wallets”:
create wallets automatically
  1. Disable everything in Socials.
  2. Go to “Advanced” and Make sure only “Web2: Email, SMS, and socials” under “Prioritize options displayed” is enabled:
prioritize web2 methods
  1. Tip: You can enable “Test Accounts” for testing purposes:
test wallets
  1. A few more steps are required but we will continue once the dependencies for the project are installed.

Get started

This template also has a demo branch that you can switch to in order to view the demo project.You can switch using the following command:

Install dependencies

Set up the environment variables

  • Create a copy of .env.example
  • Add the following environment variables to it
  1. Go to your Privy Dashboard and click on Home for your Privy app and click on Retrieve API keys.
retrieve api keys
  1. You will find App ID under API keys.
api key
  1. Go to your Privy Dashboard and click on “Home” for your Privy app and click on Retrieve API keys.
retrieve api keys
  1. Click on the Clients tab at the top and click on Edit.
clients
  1. Under Allowed app identifiers paste the name of the app bundle and click Add
You can find the app bundle name in app.json for Android it is package property and iOS it is the bundleIdentifier propertyallowed identifiers
  1. You can copy the Client ID and use as the value for EXPO_PUBLIC_PRIVY_CLIENT_ID.
client_id

Start the app

The below commands will start the app in Expo Go app on respective devices. For iOS:
For Android:
For native app builds use the following commands For iOS:
For Android:

Folder structure of the template

Modifying the app name

iOSAndroid
Edit the name property in the app.json file.

Modifying the App Icon & Splash Screen

App Icon

iOSAndroid
You can edit the app icon by replacing the assets/images/icon.png file. Recommended App Icon size is 1024x1024. If you name the icon file something else then edit the icon property in app.json accordingly.

Splash Screen

iOSAndroid
Edit the splash object in app.json to modify the splash screen.

Modifying fonts for the app

You can create a fonts folder inside assets folder and keep your custom font files in the fonts folder. To use the custom font, load the font in the app/_layout.tsx file. Example:

Modifying the deeplinking scheme

Edit the scheme property in app.json file, for your custom deeplinking scheme.
For example, if you set this to rnwalletapp, then rnwalletapp:// URLs would open your app when tapped. This is a build-time configuration, it has no effect in Expo Go.

Editing the landing screen

iOSAndroid
You can edit the landing page by editing the code in the file app/index.tsx.

Wallet Actions

The template has example code for the following Wallet Actions:

Modifying the package/bundle identifier

When publishing app to the app store you need to have a unique package/bundle identifier you can change it in in app.json.
Don’t forget to the change the identifier in Privy dashboard

Check out the demo app

If you want try the demo app before you start developing you can switch to the demo branch available with the repo:

Folder structure of the demo project (Change to demo branch to view this)

Learn more

To learn more about developing your project with Expo, Privy, and Monad, check out the following resources: Please report any issues here.