Build your first Mini App integrated with Lemon Cash
Create a simple Mini App that authenticates users, triggers deposits and calls smart contract functions in just a few steps.
Step 1: Install
npm install @lemoncash/mini-app-sdk
yarn add @lemoncash/mini-app-sdk
Step 2: Add authentication
Add authentication to your mini app using the authenticate function. This must be the first SDK method you call — see the important guidelines for details.
Step 4: Check environment with isWebView (recommended)
Use isWebView to provide clear feedback when the Mini App is not running inside the Lemon Cash app.
import { isWebView } from '@lemoncash/mini-app-sdk';export const MiniApp = () => { if (!isWebView()) { return <div>Please open this app in Lemon Cash</div>; }};
Full Example Implementation
Here’s a complete example showing WebView communication: