Skip to content

Repository files navigation

Daimo React Native SDK Demo

Showcase app for @daimo/sdk/native — the first React Native deposit UI from Daimo.

What it demos

  • DaimoFrameRN — drop-in hosted deposit flow over react-native-webview
  • paymentMethods auto — localized picker via { mode: "auto" }
  • Fixed rails{ mode: "fixed", type: "ApplePay" | … }
  • Layoutsmodal (bottom sheet) and embed (inline, host chrome)
  • CallbacksonOpen, onClose, onPaymentStarted, onPaymentCompleted
  • External handoff — Apple Pay / wallet / fiat URLs via onOpenExternalUrl

Setup

npm install --legacy-peer-deps

Create a .env with your Daimo API key:

EXPO_PUBLIC_DAIMO_API_KEY=daimo_...

Start the app:

npx expo run:ios

Usage

  1. Pick Modal or Embed
  2. Choose how external URLs open (system browser vs in-app Safari)
  3. Tap Auto (recommended) or a fixed rail — creates a session to Base USDC and mounts DaimoFrameRN
  4. Watch SDK events in the log
import { DaimoFrameRN } from '@daimo/sdk/native';

// Session created with:
// display.paymentMethods = { mode: "auto" }

<DaimoFrameRN
  layout="modal"
  sessionId={sessionId}
  clientSecret={clientSecret}
  onClose={() => setOpen(false)}
  onPaymentCompleted={() => console.log('done')}
/>

See Payment Methods and React Native.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages