Wallet Integration
Shield Yield Vaults supports multiple wallet connection methods for maximum flexibility across both XRPL and EVM ecosystems.
Supported Wallets
Section titled “Supported Wallets”XRPL Wallets
Section titled “XRPL Wallets”Xaman (XUMM) - Recommended
Section titled “Xaman (XUMM) - Recommended”Why Xaman?
- Native XRP Ledger wallet
- QR code transaction signing (browser)
- xApp integration with auto-connect (in-app)
- Mobile and desktop support
- Best security for XRPL transactions
Features:
- Real-time balance fetching
- Transaction signing with QR codes or native xApp signing
- Network detection (mainnet/testnet)
- Deep linking support
- Auto-connect when opened as xApp
- Auto-sign via
xumm.xapp.openSignRequest()
Other XRPL Wallets (via WalletConnect)
Section titled “Other XRPL Wallets (via WalletConnect)”Supported:
- Bifrost Wallet
- GemWallet
- CrossMark
- Other WalletConnect-compatible XRPL wallets
EVM Wallets (via Reown AppKit)
Section titled “EVM Wallets (via Reown AppKit)”Supported Wallets:
- MetaMask
- Trust Wallet
- Rabby Wallet
- Rainbow Wallet
- And 100+ more
Features:
- Flare Network support (mainnet + Coston2 testnet)
- Dark-themed modal
- Session persistence
- Multi-chain switching
Connection Flow
Section titled “Connection Flow”Xaman Connection (Browser Mode)
Section titled “Xaman Connection (Browser Mode)”- User clicks “Connect Wallet”
- Backend creates Xaman SignIn payload
- QR code displayed in modal
- User scans with Xaman app
- User approves connection
- Frontend polls for signature
- Wallet address retrieved and stored
Xaman Connection (xApp Mode) ✨
Section titled “Xaman Connection (xApp Mode) ✨”When Shield Finance is opened inside Xaman wallet as an xApp:
- User opens Shield Finance xApp in Xaman
- SDK automatically detects xApp context (JWT/OTT token)
- Auto-connect: User account retrieved via
xumm.user.account - No QR scan needed - wallet is instantly connected
xumm.xapp.ready()notifies Xaman to hide loader- Deposit transactions use native signing via
xumm.xapp.openSignRequest()
Note: Deposit flows use native xApp signing. Claim and withdrawal flows currently fall back to QR modal signing pending backend updates.
EVM Connection (Reown AppKit)
Section titled “EVM Connection (Reown AppKit)”- User clicks “Connect Wallet”
- Reown AppKit modal appears (dark theme)
- User selects wallet provider
- Approves connection in wallet
- Address stored in frontend context
- Network switched to Flare if needed
Wallet Context
Section titled “Wallet Context”The application uses React Context API for wallet state management:
interface WalletContextType { address: string | null; isConnected: boolean; provider: 'xaman' | 'walletconnect' | null; connect: (provider: 'xaman' | 'walletconnect') => Promise<void>; disconnect: () => void; balances: { XRP: string; RLUSD: string; USDC: string; }; refreshBalances: () => Promise<void>;}Balance Fetching
Section titled “Balance Fetching”Real-Time XRPL Balance
Section titled “Real-Time XRPL Balance”The application fetches real wallet balances from XRPL:
- XRP Balance: Native account balance
- RLUSD Balance: Trust line balance for RLUSD issuer
- USDC Balance: Trust line balance for USDC issuer
Auto-Refresh
Section titled “Auto-Refresh”Balances automatically refresh every 30 seconds when wallet is connected.
Network-Specific Issuers
Section titled “Network-Specific Issuers”Mainnet:
- RLUSD:
rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De - USDC:
rGm7WCVp9gb4jZHWTEtGUr4dd74z2XuWhE(currency: USD)
Testnet:
- RLUSD:
rQhWct2fv4Vc4KRjRgMrxa8xPN9Zx9iLKV
Demo Mode
Section titled “Demo Mode”When Xaman API keys are not configured, the application falls back to demo mode:
- Mock wallet addresses
- Simulated transaction signing
- No real blockchain transactions
- Useful for UI testing and development
Security Considerations
Section titled “Security Considerations”- Never store private keys: All signing happens in user’s wallet
- Transaction verification: Every transaction shows details before signing
- Network validation: Ensures correct network for transactions
- Session management: Secure session storage with logout functionality
