AgentSkillsCN

mobile-wallet-adapter

在 React Native Expo 应用中,借助 Beeman 的 Wallet UI SDK(@wallet-ui/react-native-web3js),集成 Mobile Wallet Adapter(MWA),以实现钱包连接与交易签名功能。当用户请求添加钱包连接、集成 Solana 钱包支持、添加“连接钱包”按钮、实现交易签名、发送 SOL 转账,或在 React Native 应用中配置 MWA 时,此技能便能派上用场。

SKILL.md
--- frontmatter
name: mobile-wallet-adapter
description: Integrate Mobile Wallet Adapter (MWA) for wallet connection and transaction signing in React Native Expo apps using Beeman's Wallet UI SDK (@wallet-ui/react-native-web3js). Use when the user requests to add wallet connection, integrate Solana wallet support, add "connect wallet" button, implement transaction signing, send SOL transfers, or set up MWA in their React Native app.

Mobile Wallet Adapter - Router

This is the entry point for MWA integration. Assess what the user needs, then use the appropriate sub-skill.

Quick Assessment

  1. Does the project have MWA set up? (polyfills, providers, dependencies)

    • If NO → Use mwa-setup skill first
    • If YES → Continue to step 2
  2. What does the user want?

    • Wallet connection (connect/disconnect button) → Use mwa-connection skill
    • Send transactions (SOL transfers, signing) → Use mwa-transactions skill
    • Both → Do connection first, then transactions

Sub-Skills

SkillWhen to Use
mwa-setupFresh project needs MWA dependencies, polyfills, providers
mwa-connectionAdd connect/disconnect wallet functionality
mwa-transactionsAdd SOL transfers or transaction signing

Prerequisites

  • React Native Expo project
  • Development build (NOT Expo Go - MWA uses native modules)
  • Android development environment

SDK Used

All sub-skills use @wallet-ui/react-native-web3js (Beeman's Wallet UI SDK).