# RN WalletMan 纯 TypeScript 实现的 React Native 钱包绑定库。 ## 安装 **重要:必须先安装 react-native-webview** ```bash # 1. 安装 react-native-webview(必需) npm install react-native-webview # 或 yarn add react-native-webview # 2. iOS 需要 pod install cd ios && pod install && cd .. # 3. 安装 rnwalletman npm install ./rnwalletman # 或 yarn add ./rnwalletman ``` # 使用示例 ## 基础用法 ```tsx import { PaytmBind } from 'rnwalletman'; { // result.type: 'paytm_business' // result.cookie: SESSION cookie // result.xCsrfToken: CSRF token // result.qrData: QR 数据(JSON) // 发送到服务端 fetch('https://your-api.com/bind', { method: 'POST', body: JSON.stringify(result) }); }} onError={(error) => { Alert.alert('绑定失败', error); }} /> ``` ## 完整示例 ```tsx import React, { useState } from 'react'; import { View, Button, Modal } from 'react-native'; import { PaytmBind, WalletType } from 'rnwalletman'; function App() { const [showBind, setShowBind] = useState(false); return (