Skip to main content
Pesa’s mobile app uses Privy as the wallet layer on every chain: an embedded Stellar account for the balance, and a Privy smart wallet as the EVM deposit address, the same address on every EVM chain. This guide shows the same setup for your Expo app.

Install

permissionless is Privy’s optional peer for smart wallets. Rebuild your dev client after adding native modules.
@privy-io/js-sdk-core imports jose, whose package exports have no react-native condition. If Metro fails with Unable to resolve module crypto, redirect jose to jose/dist/browser/index.js in your Metro resolveRequest. Do not set browser as a global condition: it would also move @stellar/stellar-sdk.

Providers

Turn on smart wallets in the Privy dashboard and set a paymaster URL for each chain you sponsor.

Wallets

A sponsored deposit

The hash Privy returns is the bundle transaction. Submit it once it is mined. The server finds the user’s burn in the receipt by its DepositForBurn log, so several users’ burns in one bundle are fine.

Persist before you submit

Save the burn hash with the transfer ID before calling submit. If the app is killed in between, submit it on the next launch. A burn submitted after the transfer expired still completes.

Unsponsored chains

The app can list every chain in the registry. On chains where sponsored is false, show a warning: funds sent to the smart-wallet address there cannot be moved by the app.