Overview
The Mini App SDK enables communication between your web-based mini app and the Lemon Cash mobile application through React Native WebView technology. This communication bridge allows your mini app to request wallet authentication, deposit and withdrawal transactions, as well as smart contract interactions.How it works
The communication flow follows a message-based architecture:1
Mini app sends message
Your mini app sends a message to the native app using
window.ReactNativeWebView.postMessage().2
Lemon Cash processes the request
The Lemon Cash mobile app receives the message and processes the request. It will prompt the user to confirm the action before executing it.
3
Lemon Cash responds
The Lemon Cash mobile app sends a response back to your mini app using
webViewRef.current.postMessage().4
Mini app receives
Your mini app receives the response through event listeners and updates its state accordingly.