Add wallet reference in Agents file with file hierarchy

This commit is contained in:
lemonknowsall committed 2025-10-20 23:23:38 -07:00
1 parent b66a31bc18
commit f909795887
2 files changed
+36 -1

No files matched your search

+35
View File
@@ -12,6 +12,41 @@ NutStack includes a comprehensive three-mode wallet system that supports multipl
The `CashuWallet` component provides a complete standalone wallet interface with seamless mode switching, while the `ZapButton` component offers intelligent Lightning zaps with Cashu integration for content feeds.
## File Hierarchy
Understanding the wallet system requires familiarity with these key directories and files:
### Core Components
- **`src/components/wallet/CashuWallet.tsx`** - Main three-mode wallet interface (Tokens/Lightning/Bitcoin)
- **`src/components/ZapButton.tsx`** - Intelligent zap button for content feeds
### Context & State Management
- **`src/contexts/CashuContext.tsx`** - Required context provider for Cashu wallet state
- **`src/hooks/useNpubCash.ts`** - Main hook for npub.cash integration and wallet operations
### Cashu-Specific Hooks
- **`src/hooks/cashu/useCashu.ts`** - Core Cashu wallet functionality and balance management
- **`src/hooks/cashu/useMintManager.ts`** - Mint URL management and switching
- **`src/hooks/cashu/useWalletTransactions.ts`** - Transaction history and tracking
### Lightning Integration
- **`src/hooks/useLightningAddress.ts`** - Lightning address resolution and invoice handling
- **`src/lib/bolt11Decoder.ts`** - Lightning invoice parsing and validation
### Bitcoin Integration
- **`src/lib/bitcoin.ts`** - Bitcoin address derivation, UTXO management, transaction building
- **`src/hooks/useBitcoinBalance.ts`** - Bitcoin balance fetching and UTXO management
- **`src/hooks/useNsecAccess.ts`** - Private key access for Bitcoin transaction signing
### Utility Functions
- **`src/lib/nostr.ts`** - Nostr key utilities and address derivation
- **`src/lib/lightning.ts`** - Lightning payment processing and WebLN integration
### Key Integration Points
- **`src/hooks/useZaps.ts`** - Zap data fetching and management
- **`src/components/TransactionHistory.tsx`** - Unified transaction history display
- **`src/components/MintSelector.tsx`** - Cashu mint management interface
### Three-Mode Architecture
**Tokens Mode**: