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

+1 -1
View File
@@ -110,7 +110,7 @@ The project includes a **`docs/`** directory containing specialized documentatio
- **`docs/NOSTR_INFINITE_SCROLL.md`**: Read when building feed interfaces, implementing pagination for Nostr events, or creating social media-style infinite scroll experiences.
- **`docs/CASHU_ZAP_INTEGRATION.md`**: Read when implementing zap functionality, integrating Cashu wallet payments, or building Lightning payment features. Essential for understanding the unified ZapButton architecture and Cashu-powered Lightning zaps. **CRITICAL**: Follow the two-component architecture - `CashuWallet` for standalone wallet management, `ZapButton` for content integration.
- **`docs/WALLET_INTEGRATION.md`**: Read when implementing comprehensive wallet functionality, Lightning zaps, Cashu token operations, or Bitcoin transactions. Essential for understanding the three-mode wallet system (Tokens/Lightning/Bitcoin), unified ZapButton architecture, and Cashu-powered Lightning zaps. **CRITICAL**: Follow the two-component architecture - `CashuWallet` for standalone wallet management, `ZapButton` for content integration. Includes Bitcoin Taproot address derivation, UTXO management, and complete payment method fallbacks.
## Cashu Integration Architecture
+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**: