diff --git a/AGENTS.md b/AGENTS.md
index 2f70f6a..5e86c22 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -34,10 +34,10 @@ This project is a Nostr client application built with React 18.x, TailwindCSS 3.
- `useLoggedInAccounts`: Manage multiple accounts
- `useLoginActions`: Authentication actions
- `useIsMobile`: Responsive design helper
- - `useZaps`: Lightning zap functionality with payment processing
- - `useWallet`: Unified wallet detection (WebLN + NWC)
- - `useNWC`: Nostr Wallet Connect connection management
- - `useNWCContext`: Access NWC context provider
+ - `useZaps`: Lightning zap functionality with Cashu integration and payment processing
+ - **Cashu hooks**: `useCashu` (core wallet management), `useMintManager` (mint operations), `useWalletTransactions` (send/receive), `useHistoryManager` (transaction history)
+ - **Bitcoin hooks**: `useBitcoinBalance` (UTXO tracking), `useNsecAccess` (private key access for signing)
+ - **Integration hooks**: `useNpubCash` (npub.cash API), `useLightningAddress` (Lightning address validation), `useWallet` (unified wallet detection), `useNWC` (Nostr Wallet Connect), `useNWCContext` (NWC context provider)
- `useShakespeare`: AI chat completions with Shakespeare AI API
- `/src/pages/`: Page components used by React Router (Index, NotFound)
- `/src/lib/`: Utility functions and shared logic
@@ -121,9 +121,9 @@ The AI assistant's behavior and knowledge is defined by the AGENTS.md file, whic
1. Edit AGENTS.md directly
2. The changes take effect in the next session
-## "Vibed with MKStack"
+## "Vibed with NutStack"
-When building the site for the first time, include "Vibed with MKStack" somewhere in the UI, linked to this URL: https://soapbox.pub/mkstack
+When building the site for the first time, include "Vibed with NutStack" somewhere in the UI, linked to this URL: https://soapbox.pub/mkstack
## Nostr Protocol Integration
@@ -1027,6 +1027,39 @@ When users specify color schemes:
- Implement responsive design with Tailwind breakpoints
- Add hover and focus states for interactive elements
+### Dialog Component Patterns
+
+When using Dialog components, always ensure accessibility compliance by including required elements:
+
+```tsx
+import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog";
+
+// ✅ Correct - Always include DialogHeader with DialogTitle
+
+
+
+ Dialog Title
+
+ Optional description for screen readers
+
+
+ {/* Dialog content */}
+
+
+```
+
+**Important**: Even if you want to hide the title visually, use the `VisuallyHidden` component to maintain accessibility:
+
+```tsx
+import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
+
+
+
+ Hidden Title for Screen Readers
+
+
+```
+
## Writing Tests vs Running Tests
There is an important distinction between **writing new tests** and **running existing tests**:
diff --git a/README.md b/README.md
index e7e5690..be45929 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,22 @@
-# MKStack
+# NutStack
+
+[](https://shakespeare.diy/clone?url=https://gitlab.com/lemonknowsall/nutstack.git)
+
+## ⚠️ Security Warning
+
+**This is experimental software. No security audits have been performed. Loss of funds is possible with any AI-coded application using this template.**
+
+- This software has not been audited for security vulnerabilities
+- Use at your own risk
+- Do not store significant amounts of funds in wallets created with this template
+- Always test with small amounts first
+- Consider this template for educational and development purposes only
+
+---
**The Complete Framework for Building Nostr Clients with AI**
-MKStack is an AI-powered framework for building Nostr applications with React 18.x, TailwindCSS 3.x, Vite, shadcn/ui, and Nostrify. Build powerful Nostr applications with AI-first development - from social feeds to private messaging, MKStack provides everything you need to create decentralized apps on the Nostr protocol.
+NutStack is an AI-powered framework for building Nostr applications with React 18.x, TailwindCSS 3.x, Vite, shadcn/ui, and Nostrify. Build powerful Nostr applications with AI-first development - from social feeds to private messaging, NutStack provides everything you need to create decentralized apps on the Nostr protocol.
## 🚀 Quick Start
@@ -11,7 +25,7 @@ Build your Nostr app in 3 simple steps:
### 1. Install & Create
```bash
npm install -g @getstacks/stacks
-stacks mkstack
+stacks nutstack
```
### 2. Build with AI
@@ -26,14 +40,14 @@ npm run deploy
# ✅ App deployed to NostrDeploy.com!
```
-## ✨ What Makes MKStack Special
+## ✨ What Makes NutStack Special
- **🤖 AI-First Development**: Build complete Nostr apps with just one prompt using Dork AI agent
- **⚡ 8 Minutes Average**: From idea to deployed application in minutes, not months
- **🔗 50+ NIPs Supported**: Comprehensive Nostr protocol implementation
- **🎨 Beautiful UI**: 48+ shadcn/ui components with light/dark theme support
- **🔐 Built-in Security**: NIP-07 browser signing, NIP-44 encryption, event validation
-- **💰 Payments Ready**: Lightning zaps (NIP-57), Cashu wallets (NIP-60), Wallet Connect (NIP-47)
+- **💰 Payments Ready**: Lightning zaps (NIP-57), Cashu wallets (NIP-60), on-chain Bitcoin transactions, Wallet Connect (NIP-47), Npub.cash integration
- **📱 Production Ready**: TypeScript, testing, deployment, and responsive design included
## 🛠 Technology Stack
@@ -84,7 +98,7 @@ Real Nostr applications built using MKStack:
### Nostr Protocol Support
- **Social Features**: User profiles (NIP-01), follow lists (NIP-02), reactions (NIP-25), reposts (NIP-18)
- **Messaging**: Private DMs (NIP-17), public chat (NIP-28), group chat (NIP-29), encryption (NIP-44)
-- **Payments**: Lightning zaps (NIP-57), Cashu wallets (NIP-60), Nutzaps (NIP-61), Wallet Connect (NIP-47)
+- **Payments**: Lightning zaps (NIP-57), Cashu wallets (NIP-60), Nutzaps (NIP-61), Wallet Connect (NIP-47), on-chain Bitcoin transactions using Taproot addresses derived from Nostr keys
- **Content**: Long-form articles (NIP-23), file metadata (NIP-94), live events (NIP-53), calendars (NIP-52)
### Data Management
@@ -94,6 +108,15 @@ Real Nostr applications built using MKStack:
- Infinite scroll with TanStack Query
- Multi-relay support
+### Wallet System
+- `useCashu` hook for Cashu wallet management
+- `useMintManager` hook for mint operations
+- `useWalletTransactions` hook for send/receive operations
+- `useHistoryManager` hook for transaction history
+- `useBitcoinBalance` hook for Bitcoin UTXO tracking
+- `useNsecAccess` hook for private key access (Bitcoin signing)
+- `useNpubCash` hook for Npub.cash API integration
+
### UI Components
- 48+ shadcn/ui components (buttons, forms, dialogs, etc.)
- `NoteContent` component for rich text rendering
@@ -182,6 +205,34 @@ MKStack includes 48+ shadcn/ui components:
- **Proper error handling**: Graceful handling of invalid NIP-19 identifiers
- **Secure authentication**: Use signer interface, never request private keys directly
+## 💰 Unified Wallet System
+
+NutStack includes a comprehensive three-mode wallet system that supports multiple payment methods:
+
+### Three Payment Modes
+
+- **Tokens Mode**: Cashu token operations with mint management
+- **Lightning Mode**: Lightning invoice payments, Lightning address support, and zaps
+- **Bitcoin Mode**: On-chain Bitcoin transactions using Taproot addresses
+
+### Key Features
+
+- **Mode Switching**: Seamless switching between payment methods via UI toggle
+- **Unified Interface**: Single `CashuWallet` component handles all payment types
+- **Nostr Integration**: Bitcoin addresses derived from Nostr public keys using Taproot (P2TR)
+- **Private Key Access**: Bitcoin transactions require nsec login for transaction signing
+- **Transaction History**: Unified history tracking across all payment methods
+- **Mobile Optimized**: Responsive design with drawer/modal patterns for mobile
+
+### Architecture
+
+The wallet system uses a component-based architecture:
+- `CashuWallet` - Main wallet interface with mode switching
+- `WalletHeader` - Balance display and mode toggle
+- `TransactionCard` - Send/receive forms for each mode
+- `MintSelector` - Cashu mint management
+- `TransactionHistory` - Unified transaction history
+
## 📱 Responsive Design
- Mobile-first approach with Tailwind breakpoints
@@ -233,6 +284,6 @@ Open source - build amazing Nostr applications and help grow the decentralized w
---
-**"Vibed with MKStack"** - [Learn more about MKStack](https://soapbox.pub/mkstack)
+**"Vibed with NutStack"** - [Learn more about NutStack](https://soapbox.pub/nutstack)
*Build your Nostr app in minutes, not months. Start with AI, deploy instantly.*
\ No newline at end of file
diff --git a/docs/AI_CHAT.md b/docs/AI_CHAT.md
index b7019e1..a93e865 100644
--- a/docs/AI_CHAT.md
+++ b/docs/AI_CHAT.md
@@ -217,39 +217,6 @@ Models are dynamically fetched from the Shakespeare API and include:
## Implementation Patterns and Best Practices
-### Dialog Component Patterns
-
-When using Dialog components, always ensure accessibility compliance by including required elements:
-
-```tsx
-import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "@/components/ui/dialog";
-
-// ✅ Correct - Always include DialogHeader with DialogTitle
-
-
-
- Dialog Title
-
- Optional description for screen readers
-
-
- {/* Dialog content */}
-
-
-```
-
-**Important**: Even if you want to hide the title visually, use the `VisuallyHidden` component to maintain accessibility:
-
-```tsx
-import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
-
-
-
- Hidden Title for Screen Readers
-
-
-```
-
### Streaming Response Handling
When implementing streaming chat interfaces, always accumulate streamed content in a local variable before clearing the streaming state to prevent content loss:
diff --git a/docs/WALLET_INTEGRATION.md b/docs/WALLET_INTEGRATION.md
new file mode 100644
index 0000000..61492b8
--- /dev/null
+++ b/docs/WALLET_INTEGRATION.md
@@ -0,0 +1,648 @@
+# Unified Wallet System for AI Agents (NutStack)
+
+This document explains how AI agents can easily integrate intelligent Lightning zaps and comprehensive wallet functionality into Nostr clients using the unified NutStack wallet system.
+
+## Overview
+
+NutStack includes a comprehensive three-mode wallet system that supports multiple payment methods:
+
+- **Tokens Mode**: Cashu token operations with mint management
+- **Lightning Mode**: Lightning invoice payments, Lightning address support, and zaps
+- **Bitcoin Mode**: On-chain Bitcoin transactions using Taproot addresses
+
+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**:
+- Cashu token send/receive operations
+- Multiple mint management
+- Token encoding/decoding
+- Transaction history tracking
+
+**Lightning Mode**:
+- Lightning invoice payment processing
+- Lightning address support
+- NIP-57 compliant zaps
+- WebLN/NWC integration
+
+**Bitcoin Mode**:
+- On-chain Bitcoin transactions using Taproot addresses
+- UTXO management via Blockstream API
+- Fee estimation and transaction building
+- Requires nsec login for transaction signing
+
+## Key Features
+
+- **Three-Mode Wallet**: Complete wallet system supporting Cashu tokens, Lightning, and Bitcoin
+- **Mode Switching**: Seamless switching between payment methods via UI toggle
+- **Unified Interface**: Single `CashuWallet` component handles all payment types
+- **Intelligent Zap Integration**: `ZapButton` automatically prioritizes Cashu balances for zaps
+- **Nostr Integration**: Bitcoin addresses derived from Nostr public keys using Taproot (P2TR)
+- **Mobile Optimized**: Responsive design with drawer/modal patterns
+- **Transaction History**: Unified history tracking across all payment methods
+- **NIP-57 Compliant**: Full compliance with Lightning zap standards
+- **Zero Configuration**: Works out of the box with existing Nostr infrastructure
+
+## Basic Usage
+
+### Simple Integration
+
+```tsx
+import { ZapButton } from '@/components/ZapButton';
+import type { Event } from 'nostr-tools';
+
+function PostCard({ event }: { event: Event }) {
+ return (
+
+ );
+}
+```
+
+### With Custom Styling
+
+```tsx
+
+```
+
+## Component Props
+
+```tsx
+interface ZapButtonProps {
+ target: Event; // Required: The Nostr event to zap
+ className?: string; // Optional: CSS classes for styling
+ showCount?: boolean; // Optional: Show zap count (default: true)
+ zapData?: { // Optional: External zap data to avoid refetching
+ count: number;
+ totalSats: number;
+ isLoading?: boolean;
+ };
+}
+```
+
+## How It Works
+
+### Automatic Wallet Detection
+
+The `ZapButton` automatically detects if the user has:
+1. A Cashu wallet with available balance
+2. Traditional Lightning wallet (WebLN/NWC)
+
+### Payment Flow
+
+The unified `ZapButton` uses an intelligent payment selection system:
+
+1. **Cashu Available & Sufficient**: Uses Cashu tokens → Lightning invoice conversion
+2. **Cashu Insufficient/Unavailable**: Falls back to WebLN payment
+3. **WebLN Unavailable**: Falls back to NWC payment
+4. **NWC Unavailable**: Shows manual Lightning invoice with QR code
+
+### Cashu Integration Details
+
+When Cashu wallet is available and has sufficient balance:
+- Creates a NIP-57 compliant zap request
+- Gets Lightning invoice from recipient's zap endpoint
+- Uses `createMeltQuote()` to convert Cashu tokens to Lightning payment
+- Uses `payMeltQuote()` to execute the payment
+- Burns Cashu tokens and sends Lightning payment
+
+## Required Dependencies
+
+**CRITICAL**: The `useCashu` hook MUST be wrapped in a Context Provider to avoid infinite loops!
+
+### Bitcoin Dependencies
+
+Add these packages for Bitcoin functionality:
+
+```bash
+npm install bitcoinjs-lib @bitcoinerlab/secp256k1 ecpair
+```
+
+### Cashu Dependencies
+
+Add these packages for Cashu token functionality:
+
+```bash
+npm install coco-cashu-core coco-cashu-indexeddb @scure/bip39
+```
+
+### Npub.cash Dependencies
+
+Add these packages for npub.cash integration:
+
+```bash
+npm install npubcash-sdk npubcash-types
+```
+
+### Setup CashuContext (Required!)
+
+Create `src/contexts/CashuContext.tsx`:
+
+```tsx
+import { createContext, useContext, ReactNode } from 'react';
+import { useCashu as useCashuHook, type UseCashuReturn } from '@/hooks/useCashu';
+
+const CashuContext = createContext(null);
+
+export function CashuProvider({ children }: { children: ReactNode }) {
+ const cashu = useCashuHook();
+
+ return (
+
+ {children}
+
+ );
+}
+
+export function useCashu(): UseCashuReturn {
+ const context = useContext(CashuContext);
+
+ if (!context) {
+ throw new Error('useCashu must be used within a CashuProvider');
+ }
+
+ return context;
+}
+```
+
+### Wrap Your App
+
+Add `CashuProvider` to your App.tsx:
+
+```tsx
+import { CashuProvider } from '@/contexts/CashuContext';
+
+export function App() {
+ return (
+
+
+ {/* Your app */}
+
+
+ );
+}
+```
+
+### Import from Context
+
+**Always** import from the context, not the hook:
+
+```tsx
+// ✅ CORRECT
+import { useCashu } from '@/contexts/CashuContext';
+
+// ❌ WRONG - Will cause infinite loops!
+import { useCashu } from '@/hooks/useCashu';
+```
+
+This ensures all components share the same Cashu wallet instance, preventing:
+- Multiple wallet initializations
+- Infinite refresh loops
+- Performance issues
+
+## Architecture Overview
+
+**IMPORTANT**: The Cashu integration uses a **two-component architecture**:
+
+1. **`CashuWallet`** - Standalone wallet management interface (separate page/route)
+2. **`ZapButton`** - Integrated zap functionality within content feeds
+
+### Component Separation
+
+The `CashuWallet` component is designed as a **standalone wallet management interface** and should remain separate from content feeds. This separation provides:
+
+- **Clean UX**: Users manage their wallet separately from consuming content
+- **Performance**: Wallet operations don't interfere with feed rendering
+- **Security**: Sensitive wallet operations are isolated
+- **Mobile Optimization**: Wallet can use full-screen layouts on mobile
+
+### Integration Pattern
+
+```tsx
+// ✅ CORRECT: Separate wallet management
+function App() {
+ return (
+
+
+ } />
+ } />
+
+
+ );
+}
+
+// ✅ CORRECT: ZapButton integrated in content
+function FeedPage() {
+ return (
+
+ {events.map(event => (
+
+ ))}
+
+ );
+}
+
+// ❌ INCORRECT: Don't embed CashuWallet in content feeds
+function FeedPage() {
+ return (
+
+
{/* Don't do this */}
+ {events.map(event => (
+
+ ))}
+
+ );
+}
+```
+
+## Complete Example
+
+```tsx
+import { ZapButton } from '@/components/ZapButton';
+import { CashuWallet } from '@/components/CashuWallet';
+import type { Event } from 'nostr-tools';
+
+function NostrApp() {
+ return (
+
+ {/* Cashu wallet for balance management */}
+
+
+ {/* Posts with zap buttons */}
+
+ {events.map(event => (
+
+ ))}
+
+
+ );
+}
+```
+
+## Advanced Usage
+
+### Custom Zap Data
+
+If you're already fetching zap data elsewhere, pass it to avoid duplicate requests:
+
+```tsx
+const zapData = useZaps(event);
+
+
+```
+
+### Conditional Rendering
+
+The component automatically handles visibility based on:
+- User login status
+- Author Lightning address availability
+- Cashu wallet availability
+
+```tsx
+// Only shows if user can zap
+
+```
+
+## CashuWallet Component
+
+The `CashuWallet` component provides a complete standalone wallet interface supporting all three payment modes:
+
+### Basic Implementation
+
+```tsx
+import { CashuWallet } from '@/components/wallet/CashuWallet';
+
+function App() {
+ return (
+
+
+ } />
+ } />
+
+
+ );
+}
+```
+
+### Three-Mode System
+
+The wallet automatically handles mode switching between:
+
+```tsx
+// Mode state management
+const [mode, setMode] = useState<'tokens' | 'lightning' | 'bitcoin'>('lightning');
+
+// Mode-specific operations
+if (mode === 'bitcoin') {
+ // Bitcoin transaction handling
+} else if (mode === 'tokens') {
+ // Cashu token operations
+} else {
+ // Lightning operations
+}
+```
+
+### Component Architecture
+
+- **WalletHeader**: Balance display, mode toggle, mint selector
+- **TransactionCard**: Send/receive forms for each mode
+- **TransactionHistory**: Unified transaction history
+- **MintSelector**: Cashu mint management
+
+### Props and State
+
+The component manages comprehensive state for all three modes:
+
+```tsx
+// Bitcoin state
+const [bitcoinAmount, setBitcoinAmount] = useState('');
+const [bitcoinRecipient, setBitcoinRecipient] = useState('');
+const bitcoinAddress = user?.pubkey ? nostrPubkeyToBitcoinAddress(user.pubkey) : null;
+
+// Cashu state
+const { balances, mints, coco } = useCashu();
+const { activeMintUrl, setActiveMintUrl } = useMintManager();
+
+// Lightning state
+const { getInvoice: getLightningInvoice } = useLightningAddress();
+```
+
+## Error Handling
+
+The component handles common error scenarios:
+- Insufficient Cashu balance
+- Lightning address not found
+- Zap endpoint unavailable
+- Payment failures
+
+## Bitcoin Mode
+
+NutStack supports on-chain Bitcoin transactions using Taproot addresses derived from Nostr keys:
+
+### Nsec Requirement
+
+Bitcoin transactions require nsec login to access the private key for transaction signing:
+
+```tsx
+import { useNsecAccess } from '@/hooks/useNsecAccess';
+
+function BitcoinTransaction() {
+ const { hasNsecAccess, getPrivateKey } = useNsecAccess();
+
+ if (!hasNsecAccess) {
+ return Please login with nsec to use Bitcoin features
;
+ }
+
+ const privateKey = getPrivateKey();
+ // Use private key for transaction signing
+}
+```
+
+### Address Derivation
+
+Bitcoin addresses are automatically derived from Nostr public keys:
+
+```tsx
+import { nostrPubkeyToBitcoinAddress, npubToBitcoinAddress } from '@/lib/bitcoin';
+
+// From hex pubkey
+const bitcoinAddress = nostrPubkeyToBitcoinAddress(user.pubkey);
+
+// From npub format
+const bitcoinAddress = npubToBitcoinAddress('npub1...');
+```
+
+### Send/Receive Flow
+
+```tsx
+import { useBitcoinBalance } from '@/hooks/useBitcoinBalance';
+import { fetchUTXOs, createBitcoinTransaction, broadcastTransaction } from '@/lib/bitcoin';
+
+function BitcoinSend() {
+ const { data: bitcoinBalance, refetch } = useBitcoinBalance(bitcoinAddress);
+
+ const handleSend = async (amount: number, recipient: string) => {
+ // Fetch UTXOs and fee rates
+ const [utxos, feeRates] = await Promise.all([
+ fetchUTXOs(bitcoinAddress),
+ getFeeRates()
+ ]);
+
+ // Create and sign transaction
+ const { txHex, fee } = await createBitcoinTransaction(
+ privateKey,
+ recipient,
+ amount,
+ utxos,
+ feeRates.fastestFee
+ );
+
+ // Broadcast transaction
+ const txId = await broadcastTransaction(txHex);
+
+ // Refresh balance
+ refetch();
+ };
+}
+```
+
+### UTXO Management
+
+The system automatically handles UTXO selection and fee calculation:
+
+- **UTXO Fetching**: Uses Blockstream API to get unspent outputs
+- **Fee Estimation**: Dynamic fee calculation based on network conditions
+- **Change Handling**: Automatic change output creation when needed
+- **Dust Limit**: Respects Bitcoin dust limit (546 sats)
+
+### Blockstream API Integration
+
+```tsx
+// Fetch UTXOs
+const utxos = await fetchUTXOs(address);
+
+// Get fee rates
+const feeRates = await getFeeRates();
+// Returns: { fastestFee, halfHourFee, hourFee, economyFee, minimumFee }
+
+// Broadcast transaction
+const txId = await broadcastTransaction(txHex);
+```
+
+## Mobile Optimization
+
+The component automatically uses:
+- **Desktop**: Modal dialog
+- **Mobile**: Bottom drawer
+
+No additional configuration needed.
+
+## Testing
+
+The component includes test IDs for easy testing:
+
+```tsx
+// Unified zap modal
+data-testid="zap-modal"
+```
+
+## Best Practices for AI Agents
+
+1. **Maintain Component Separation**: Keep `CashuWallet` as a standalone page/route, not embedded in content feeds
+2. **Always include CashuWallet**: Provide a dedicated route/page for wallet management
+3. **Use consistent styling**: Apply your app's design system
+4. **Handle loading states**: The component manages its own loading states
+5. **Trust the intelligence**: The component handles payment method selection automatically
+6. **Test all scenarios**: Ensure Cashu, WebLN, NWC, and manual zaps all work
+7. **Follow the architecture**: Use `ZapButton` for content integration, `CashuWallet` for wallet management
+8. **Avoid Infinite Loops**: The `useCashu` hook includes throttling and deep comparison to prevent infinite refresh loops. Do NOT:
+ - Call `refreshBalances()` in `useEffect` that depends on `balances`
+ - Create circular dependencies between state updates and effects
+ - Override the built-in throttling mechanisms
+
+## Troubleshooting
+
+### ZapButton Not Showing
+- Check if user is logged in
+- Verify author has Lightning address (lud06/lud16)
+- Ensure Cashu wallet is initialized
+
+### Cashu Zaps Not Working
+- Verify Cashu wallet has sufficient balance
+- Check mint connectivity
+- Ensure Lightning invoice is valid
+
+### Payment Method Fallbacks Not Working
+- Verify WebLN/NWC connection
+- Check Lightning wallet availability
+- Ensure zap endpoint is accessible
+- Test manual QR code fallback
+
+### Infinite Loop: `refreshBalances` Repeatedly Called
+If you see continuous console logs like `🔄 refreshBalances: Getting balances from wallet...`, the issue is likely:
+
+**Root Cause #1 (MOST COMMON)**: Multiple components are calling `useCashu()` directly from the hook instead of from the Context Provider. This creates multiple wallet instances that all try to initialize and refresh balances.
+
+**Solution**: Ensure you:
+1. Created `CashuContext.tsx` as shown in the Required Dependencies section
+2. Wrapped your app with ``
+3. Import `useCashu` from `@/contexts/CashuContext` in ALL components (not from `@/hooks/useCashu`)
+
+**Root Cause #2**: A `useEffect` that depends on `balances` is triggering `refreshBalances()`, creating a circular dependency.
+
+**Built-in Protections**: The `useCashu` hook includes:
+- **Throttling**: Prevents calls more than once every 500ms
+- **Deep Comparison**: Only updates state if balance values actually changed
+- **Stable References**: Returns the same object reference when values are unchanged
+
+**Common Mistakes to Avoid**:
+```tsx
+// ❌ INCORRECT: Creates infinite loop
+useEffect(() => {
+ refreshBalances();
+}, [balances, refreshBalances]);
+
+// ❌ INCORRECT: Calls refreshBalances on every balance change
+useEffect(() => {
+ if (balances) {
+ refreshBalances();
+ }
+}, [balances]);
+
+// ✅ CORRECT: Only call on mount or user action
+useEffect(() => {
+ refreshBalances(); // Called once on mount
+}, []); // Empty dependency array
+
+// ✅ CORRECT: Call on user action
+ refreshBalances()}>
+ Refresh
+
+```
+
+**If Issue Persists**: Check your implementation for:
+1. Effects that call `refreshBalances` and depend on `balances`
+2. Custom hooks that wrap `useCashu` and create circular dependencies
+3. Component re-renders that trigger unintended effect runs
+
+## Integration Checklist
+
+- [ ] **CRITICAL**: Create `CashuContext.tsx` with `CashuProvider` (see Required Dependencies)
+- [ ] **CRITICAL**: Wrap app with `` in App.tsx
+- [ ] **CRITICAL**: Import `useCashu` from `@/contexts/CashuContext` in ALL components
+- [ ] **Bitcoin Setup**:
+ - [ ] Install Bitcoin dependencies: `bitcoinjs-lib`, `@bitcoinerlab/secp256k1`, `ecpair`
+ - [ ] Import Bitcoin utility functions from `@/lib/bitcoin`
+ - [ ] Ensure user login with nsec for Bitcoin features
+ - [ ] Test Bitcoin send/receive with Taproot addresses
+ - [ ] Verify UTXO fetching and balance display
+- [ ] **Cashu Setup**:
+ - [ ] Install Cashu dependencies: `coco-cashu-core`, `coco-cashu-indexeddb`, `@scure/bip39`
+ - [ ] Initialize coco-cashu-core with mnemonic
+ - [ ] Add mint management UI
+ - [ ] Test token send/receive flows
+ - [ ] Verify npub.cash integration (optional)
+- [ ] Import unified `ZapButton` component
+- [ ] Create dedicated route/page for `CashuWallet` (don't embed in content feeds)
+- [ ] Test all payment methods: Cashu → WebLN → NWC → Manual QR
+- [ ] Verify mobile responsiveness
+- [ ] Test error handling scenarios
+- [ ] Verify component separation (wallet management vs content integration)
+- [ ] Check console for infinite `refreshBalances` loops (should see throttling logs if working correctly)
+
+This unified integration provides a seamless, intelligent wallet experience that automatically selects the best available payment method while leveraging the benefits of Cashu tokens, Lightning payments, and on-chain Bitcoin transactions.
diff --git a/index.html b/index.html
index cd5ada1..bb2bd04 100644
--- a/index.html
+++ b/index.html
@@ -2,8 +2,13 @@
-
+
+ NutStack
+
+
+
+
diff --git a/package-lock.json b/package-lock.json
index 974ebb5..8a7aed2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,7 @@
"name": "mkstack",
"version": "0.0.0",
"dependencies": {
+ "@bitcoinerlab/secp256k1": "^1.2.0",
"@fontsource-variable/inter": "^5.2.6",
"@getalby/sdk": "^5.1.1",
"@hookform/resolvers": "^3.9.0",
@@ -40,19 +41,28 @@
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.4",
+ "@scure/bip39": "^2.0.0",
"@tanstack/react-query": "^5.56.2",
"@unhead/addons": "^2.0.10",
"@unhead/react": "^2.0.10",
+ "@vulpemventures/secp256k1-zkp": "^3.2.1",
+ "bitcoinjs-lib": "^7.0.0",
+ "boltz-core": "^3.0.0",
"buffer": "^6.0.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
+ "coco-cashu-core": "1.0.0-rc.17",
+ "coco-cashu-indexeddb": "1.0.0-rc.17",
"date-fns": "^3.6.0",
+ "ecpair": "^3.0.0",
"embla-carousel-react": "^8.3.0",
"idb": "^8.0.3",
+ "html5-qrcode": "^2.3.8",
"input-otp": "^1.2.4",
"lucide-react": "^0.462.0",
"nostr-tools": "^2.13.0",
+ "npubcash-sdk": "^0.2.0",
"qrcode": "^1.5.4",
"react": "^18.3.1",
"react-day-picker": "^8.10.1",
@@ -72,6 +82,7 @@
"@html-eslint/eslint-plugin": "^0.41.0",
"@html-eslint/parser": "^0.41.0",
"@tailwindcss/typography": "^0.5.15",
+ "@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@types/node": "^22.5.5",
@@ -95,9 +106,9 @@
}
},
"node_modules/@adobe/css-tools": {
- "version": "4.4.3",
- "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.3.tgz",
- "integrity": "sha512-VQKMkwriZbaOgVCby1UDY/LDk5fIjhQicCvVPFqfe+69fWaPWydbWJ3wRt59/YzIwda1I81loas3oCoHxnqvdA==",
+ "version": "4.4.4",
+ "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.4.tgz",
+ "integrity": "sha512-Elp+iwUx5rN5+Y8xLt5/GRoG20WGoDCQ/1Fb+1LiGtvwbDavuSk0jhD/eZdckHAuzcDzccnkv+rEjyWfRx18gg==",
"dev": true,
"license": "MIT"
},
@@ -133,7 +144,6 @@
"integrity": "sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@babel/helper-validator-identifier": "^7.27.1",
"js-tokens": "^4.0.0",
@@ -144,15 +154,15 @@
}
},
"node_modules/@babel/generator": {
- "version": "7.27.5",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz",
- "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==",
+ "version": "7.28.3",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz",
+ "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==",
"license": "MIT",
"dependencies": {
- "@babel/parser": "^7.27.5",
- "@babel/types": "^7.27.3",
- "@jridgewell/gen-mapping": "^0.3.5",
- "@jridgewell/trace-mapping": "^0.3.25",
+ "@babel/parser": "^7.28.3",
+ "@babel/types": "^7.28.2",
+ "@jridgewell/gen-mapping": "^0.3.12",
+ "@jridgewell/trace-mapping": "^0.3.28",
"jsesc": "^3.0.2"
},
"engines": {
@@ -178,12 +188,12 @@
}
},
"node_modules/@babel/parser": {
- "version": "7.27.5",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.5.tgz",
- "integrity": "sha512-OsQd175SxWkGlzbny8J3K8TnnDD0N3lrIUtB92xwyRpzaenGZhxDvxN/JgU00U3CDZNj9tPuDJ5H0WS4Nt3vKg==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz",
+ "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==",
"license": "MIT",
"dependencies": {
- "@babel/types": "^7.27.3"
+ "@babel/types": "^7.28.4"
},
"bin": {
"parser": "bin/babel-parser.js"
@@ -193,18 +203,18 @@
}
},
"node_modules/@babel/runtime": {
- "version": "7.27.1",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.1.tgz",
- "integrity": "sha512-1x3D2xEk2fRo3PAhwQwu5UubzgiVWSXTBfWpVd2Mx2AzRqJuDJCsgaDVZ7HB5iGzDW1Hl1sWN2mFyKjmR9uAog==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.4.tgz",
+ "integrity": "sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/types": {
- "version": "7.27.6",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.6.tgz",
- "integrity": "sha512-ETyHEk2VHHvl9b9jZP5IHPavHYk57EhanlRRuae9XCpb/j5bDCbPPMOBfCWhnl/7EDJz0jEMCi/RhccCE8r1+Q==",
+ "version": "7.28.4",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz",
+ "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==",
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.27.1",
@@ -214,10 +224,39 @@
"node": ">=6.9.0"
}
},
+ "node_modules/@bitcoinerlab/secp256k1": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@bitcoinerlab/secp256k1/-/secp256k1-1.2.0.tgz",
+ "integrity": "sha512-jeujZSzb3JOZfmJYI0ph1PVpCRV5oaexCgy+RvCXV8XlY+XFB/2n3WOcvBsKLsOw78KYgnQrQWb2HrKE4be88Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/curves": "^1.7.0"
+ }
+ },
+ "node_modules/@boltz/bitcoin-ops": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@boltz/bitcoin-ops/-/bitcoin-ops-2.0.0.tgz",
+ "integrity": "sha512-AM7vFNwSD7B4XI6yeRKccWbbD/lvwoFr8U3pqhzryBQo4uMkYe5V3/kMVnml4SNuxzyqdIFu4ur3TId02sC33A==",
+ "license": "MIT"
+ },
+ "node_modules/@cashu/cashu-ts": {
+ "version": "2.7.2",
+ "resolved": "https://registry.npmjs.org/@cashu/cashu-ts/-/cashu-ts-2.7.2.tgz",
+ "integrity": "sha512-AOwL6+10AA0syRf2mtRYgoTvAz31gE4MnElj9TLS9xG3k8Msxy27awBlCX5MsBpBgcZZoqWOReYEuUgnbN3IQQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/curves": "^1.9.5",
+ "@noble/hashes": "^1.5.0",
+ "@scure/bip32": "^1.5.0"
+ },
+ "engines": {
+ "node": ">=22.4.0"
+ }
+ },
"node_modules/@csstools/color-helpers": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.2.tgz",
- "integrity": "sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz",
+ "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==",
"dev": true,
"funding": [
{
@@ -259,9 +298,9 @@
}
},
"node_modules/@csstools/css-color-parser": {
- "version": "3.0.10",
- "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.10.tgz",
- "integrity": "sha512-TiJ5Ajr6WRd1r8HSiwJvZBiJOqtH86aHpUjq5aEKWHiII2Qfjqd/HCWKPOW8EP4vcspXbHnXrwIDlu5savQipg==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz",
+ "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==",
"dev": true,
"funding": [
{
@@ -275,7 +314,7 @@
],
"license": "MIT",
"dependencies": {
- "@csstools/color-helpers": "^5.0.2",
+ "@csstools/color-helpers": "^5.1.0",
"@csstools/css-calc": "^2.1.4"
},
"engines": {
@@ -330,9 +369,9 @@
}
},
"node_modules/@esbuild/aix-ppc64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz",
- "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.11.tgz",
+ "integrity": "sha512-Xt1dOL13m8u0WE8iplx9Ibbm+hFAO0GsU2P34UNoDGvZYkY8ifSiy6Zuc1lYxfG7svWE2fzqCUmFp5HCn51gJg==",
"cpu": [
"ppc64"
],
@@ -347,9 +386,9 @@
}
},
"node_modules/@esbuild/android-arm": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz",
- "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.11.tgz",
+ "integrity": "sha512-uoa7dU+Dt3HYsethkJ1k6Z9YdcHjTrSb5NUy66ZfZaSV8hEYGD5ZHbEMXnqLFlbBflLsl89Zke7CAdDJ4JI+Gg==",
"cpu": [
"arm"
],
@@ -364,9 +403,9 @@
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz",
- "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.11.tgz",
+ "integrity": "sha512-9slpyFBc4FPPz48+f6jyiXOx/Y4v34TUeDDXJpZqAWQn/08lKGeD8aDp9TMn9jDz2CiEuHwfhRmGBvpnd/PWIQ==",
"cpu": [
"arm64"
],
@@ -381,9 +420,9 @@
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz",
- "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.11.tgz",
+ "integrity": "sha512-Sgiab4xBjPU1QoPEIqS3Xx+R2lezu0LKIEcYe6pftr56PqPygbB7+szVnzoShbx64MUupqoE0KyRlN7gezbl8g==",
"cpu": [
"x64"
],
@@ -398,9 +437,9 @@
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz",
- "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.11.tgz",
+ "integrity": "sha512-VekY0PBCukppoQrycFxUqkCojnTQhdec0vevUL/EDOCnXd9LKWqD/bHwMPzigIJXPhC59Vd1WFIL57SKs2mg4w==",
"cpu": [
"arm64"
],
@@ -415,9 +454,9 @@
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz",
- "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.11.tgz",
+ "integrity": "sha512-+hfp3yfBalNEpTGp9loYgbknjR695HkqtY3d3/JjSRUyPg/xd6q+mQqIb5qdywnDxRZykIHs3axEqU6l1+oWEQ==",
"cpu": [
"x64"
],
@@ -432,9 +471,9 @@
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz",
- "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.11.tgz",
+ "integrity": "sha512-CmKjrnayyTJF2eVuO//uSjl/K3KsMIeYeyN7FyDBjsR3lnSJHaXlVoAK8DZa7lXWChbuOk7NjAc7ygAwrnPBhA==",
"cpu": [
"arm64"
],
@@ -449,9 +488,9 @@
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz",
- "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.11.tgz",
+ "integrity": "sha512-Dyq+5oscTJvMaYPvW3x3FLpi2+gSZTCE/1ffdwuM6G1ARang/mb3jvjxs0mw6n3Lsw84ocfo9CrNMqc5lTfGOw==",
"cpu": [
"x64"
],
@@ -466,9 +505,9 @@
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz",
- "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.11.tgz",
+ "integrity": "sha512-TBMv6B4kCfrGJ8cUPo7vd6NECZH/8hPpBHHlYI3qzoYFvWu2AdTvZNuU/7hsbKWqu/COU7NIK12dHAAqBLLXgw==",
"cpu": [
"arm"
],
@@ -483,9 +522,9 @@
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz",
- "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.11.tgz",
+ "integrity": "sha512-Qr8AzcplUhGvdyUF08A1kHU3Vr2O88xxP0Tm8GcdVOUm25XYcMPp2YqSVHbLuXzYQMf9Bh/iKx7YPqECs6ffLA==",
"cpu": [
"arm64"
],
@@ -500,9 +539,9 @@
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz",
- "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.11.tgz",
+ "integrity": "sha512-TmnJg8BMGPehs5JKrCLqyWTVAvielc615jbkOirATQvWWB1NMXY77oLMzsUjRLa0+ngecEmDGqt5jiDC6bfvOw==",
"cpu": [
"ia32"
],
@@ -517,9 +556,9 @@
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz",
- "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.11.tgz",
+ "integrity": "sha512-DIGXL2+gvDaXlaq8xruNXUJdT5tF+SBbJQKbWy/0J7OhU8gOHOzKmGIlfTTl6nHaCOoipxQbuJi7O++ldrxgMw==",
"cpu": [
"loong64"
],
@@ -534,9 +573,9 @@
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz",
- "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.11.tgz",
+ "integrity": "sha512-Osx1nALUJu4pU43o9OyjSCXokFkFbyzjXb6VhGIJZQ5JZi8ylCQ9/LFagolPsHtgw6himDSyb5ETSfmp4rpiKQ==",
"cpu": [
"mips64el"
],
@@ -551,9 +590,9 @@
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz",
- "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.11.tgz",
+ "integrity": "sha512-nbLFgsQQEsBa8XSgSTSlrnBSrpoWh7ioFDUmwo158gIm5NNP+17IYmNWzaIzWmgCxq56vfr34xGkOcZ7jX6CPw==",
"cpu": [
"ppc64"
],
@@ -568,9 +607,9 @@
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz",
- "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.11.tgz",
+ "integrity": "sha512-HfyAmqZi9uBAbgKYP1yGuI7tSREXwIb438q0nqvlpxAOs3XnZ8RsisRfmVsgV486NdjD7Mw2UrFSw51lzUk1ww==",
"cpu": [
"riscv64"
],
@@ -585,9 +624,9 @@
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz",
- "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.11.tgz",
+ "integrity": "sha512-HjLqVgSSYnVXRisyfmzsH6mXqyvj0SA7pG5g+9W7ESgwA70AXYNpfKBqh1KbTxmQVaYxpzA/SvlB9oclGPbApw==",
"cpu": [
"s390x"
],
@@ -602,9 +641,9 @@
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz",
- "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.11.tgz",
+ "integrity": "sha512-HSFAT4+WYjIhrHxKBwGmOOSpphjYkcswF449j6EjsjbinTZbp8PJtjsVK1XFJStdzXdy/jaddAep2FGY+wyFAQ==",
"cpu": [
"x64"
],
@@ -619,9 +658,9 @@
}
},
"node_modules/@esbuild/netbsd-arm64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz",
- "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.11.tgz",
+ "integrity": "sha512-hr9Oxj1Fa4r04dNpWr3P8QKVVsjQhqrMSUzZzf+LZcYjZNqhA3IAfPQdEh1FLVUJSiu6sgAwp3OmwBfbFgG2Xg==",
"cpu": [
"arm64"
],
@@ -636,9 +675,9 @@
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz",
- "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.11.tgz",
+ "integrity": "sha512-u7tKA+qbzBydyj0vgpu+5h5AeudxOAGncb8N6C9Kh1N4n7wU1Xw1JDApsRjpShRpXRQlJLb9wY28ELpwdPcZ7A==",
"cpu": [
"x64"
],
@@ -653,9 +692,9 @@
}
},
"node_modules/@esbuild/openbsd-arm64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz",
- "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.11.tgz",
+ "integrity": "sha512-Qq6YHhayieor3DxFOoYM1q0q1uMFYb7cSpLD2qzDSvK1NAvqFi8Xgivv0cFC6J+hWVw2teCYltyy9/m/14ryHg==",
"cpu": [
"arm64"
],
@@ -670,9 +709,9 @@
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz",
- "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.11.tgz",
+ "integrity": "sha512-CN+7c++kkbrckTOz5hrehxWN7uIhFFlmS/hqziSFVWpAzpWrQoAG4chH+nN3Be+Kzv/uuo7zhX716x3Sn2Jduw==",
"cpu": [
"x64"
],
@@ -686,10 +725,27 @@
"node": ">=18"
}
},
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.11.tgz",
+ "integrity": "sha512-rOREuNIQgaiR+9QuNkbkxubbp8MSO9rONmwP5nKncnWJ9v5jQ4JxFnLu4zDSRPf3x4u+2VN4pM4RdyIzDty/wQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
"node_modules/@esbuild/sunos-x64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz",
- "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.11.tgz",
+ "integrity": "sha512-nq2xdYaWxyg9DcIyXkZhcYulC6pQ2FuCgem3LI92IwMgIZ69KHeY8T4Y88pcwoLIjbed8n36CyKoYRDygNSGhA==",
"cpu": [
"x64"
],
@@ -704,9 +760,9 @@
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz",
- "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.11.tgz",
+ "integrity": "sha512-3XxECOWJq1qMZ3MN8srCJ/QfoLpL+VaxD/WfNRm1O3B4+AZ/BnLVgFbUV3eiRYDMXetciH16dwPbbHqwe1uU0Q==",
"cpu": [
"arm64"
],
@@ -721,9 +777,9 @@
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz",
- "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.11.tgz",
+ "integrity": "sha512-3ukss6gb9XZ8TlRyJlgLn17ecsK4NSQTmdIXRASVsiS2sQ6zPPZklNJT5GR5tE/MUarymmy8kCEf5xPCNCqVOA==",
"cpu": [
"ia32"
],
@@ -738,9 +794,9 @@
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz",
- "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.11.tgz",
+ "integrity": "sha512-D7Hpz6A2L4hzsRpPaCYkQnGOotdUpDzSGRIv9I+1ITdHROSFUWW95ZPZWQmGka1Fg7W3zFJowyn9WGwMJ0+KPA==",
"cpu": [
"x64"
],
@@ -755,9 +811,9 @@
}
},
"node_modules/@eslint-community/eslint-utils": {
- "version": "4.7.0",
- "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
- "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==",
+ "version": "4.9.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz",
+ "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -797,13 +853,13 @@
}
},
"node_modules/@eslint/config-array": {
- "version": "0.21.0",
- "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz",
- "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==",
+ "version": "0.21.1",
+ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz",
+ "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@eslint/object-schema": "^2.1.6",
+ "@eslint/object-schema": "^2.1.7",
"debug": "^4.3.1",
"minimatch": "^3.1.2"
},
@@ -812,19 +868,35 @@
}
},
"node_modules/@eslint/config-helpers": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz",
- "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==",
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.1.tgz",
+ "integrity": "sha512-csZAzkNhsgwb0I/UAV6/RGFTbiakPCf0ZrGmrIxQpYvGZ00PhTkSnyKNolphgIvmnJeGw6rcGVEXfTzUnFuEvw==",
"dev": true,
"license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^0.16.0"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/@eslint/config-helpers/node_modules/@eslint/core": {
+ "version": "0.16.0",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz",
+ "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/json-schema": "^7.0.15"
+ },
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/core": {
- "version": "0.15.1",
- "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz",
- "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==",
+ "version": "0.15.2",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz",
+ "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -872,9 +944,9 @@
}
},
"node_modules/@eslint/js": {
- "version": "9.31.0",
- "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.31.0.tgz",
- "integrity": "sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==",
+ "version": "9.38.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz",
+ "integrity": "sha512-UZ1VpFvXf9J06YG9xQBdnzU+kthors6KjhMAl6f4gH4usHyh31rUf2DLGInT8RFYIReYXNSydgPY0V2LuWgl7A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -885,9 +957,9 @@
}
},
"node_modules/@eslint/object-schema": {
- "version": "2.1.6",
- "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz",
- "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==",
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz",
+ "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -895,13 +967,13 @@
}
},
"node_modules/@eslint/plugin-kit": {
- "version": "0.3.4",
- "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.4.tgz",
- "integrity": "sha512-Ul5l+lHEcw3L5+k8POx6r74mxEYKG5kOb6Xpy2gCRW6zweT6TEhAf8vhxGgjhqrd/VO/Dirhsb+1hNpD1ue9hw==",
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz",
+ "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "@eslint/core": "^0.15.1",
+ "@eslint/core": "^0.15.2",
"levn": "^0.4.1"
},
"engines": {
@@ -909,31 +981,31 @@
}
},
"node_modules/@floating-ui/core": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.0.tgz",
- "integrity": "sha512-FRdBLykrPPA6P76GGGqlex/e7fbe0F1ykgxHYNXQsH/iTEtjMj/f9bpY5oQqbjt5VgZvgz/uKXbGuROijh3VLA==",
+ "version": "1.7.3",
+ "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz",
+ "integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==",
"license": "MIT",
"dependencies": {
- "@floating-ui/utils": "^0.2.9"
+ "@floating-ui/utils": "^0.2.10"
}
},
"node_modules/@floating-ui/dom": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.0.tgz",
- "integrity": "sha512-lGTor4VlXcesUMh1cupTUTDoCxMb0V6bm3CnxHzQcw8Eaf1jQbgQX4i02fYgT0vJ82tb5MZ4CZk1LRGkktJCzg==",
+ "version": "1.7.4",
+ "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.4.tgz",
+ "integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==",
"license": "MIT",
"dependencies": {
- "@floating-ui/core": "^1.7.0",
- "@floating-ui/utils": "^0.2.9"
+ "@floating-ui/core": "^1.7.3",
+ "@floating-ui/utils": "^0.2.10"
}
},
"node_modules/@floating-ui/react-dom": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz",
- "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==",
+ "version": "2.1.6",
+ "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.6.tgz",
+ "integrity": "sha512-4JX6rEatQEvlmgU80wZyq9RT96HZJa88q8hp0pBd+LrczeDI4o6uA2M+uvxngVHo4Ihr8uibXxH6+70zhAFrVw==",
"license": "MIT",
"dependencies": {
- "@floating-ui/dom": "^1.0.0"
+ "@floating-ui/dom": "^1.7.4"
},
"peerDependencies": {
"react": ">=16.8.0",
@@ -941,24 +1013,24 @@
}
},
"node_modules/@floating-ui/utils": {
- "version": "0.2.9",
- "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz",
- "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==",
+ "version": "0.2.10",
+ "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz",
+ "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==",
"license": "MIT"
},
"node_modules/@fontsource-variable/inter": {
- "version": "5.2.6",
- "resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.2.6.tgz",
- "integrity": "sha512-jks/bficUPQ9nn7GvXvHtlQIPudW7Wx8CrlZoY8bhxgeobNxlQan8DclUJuYF2loYRrGpfrhCIZZspXYysiVGg==",
+ "version": "5.2.8",
+ "resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.2.8.tgz",
+ "integrity": "sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ==",
"license": "OFL-1.1",
"funding": {
"url": "https://github.com/sponsors/ayuhito"
}
},
"node_modules/@getalby/lightning-tools": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/@getalby/lightning-tools/-/lightning-tools-5.2.0.tgz",
- "integrity": "sha512-8kBvENBTMh541VjGKhw3I29+549/C02gLSh3AQaMfoMNSZaMxfQW+7dcMcc7vbFaCKEcEe18ST5bUveTRBuXCQ==",
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/@getalby/lightning-tools/-/lightning-tools-5.2.1.tgz",
+ "integrity": "sha512-dxOmJLJAh6qJ8rsbA5/Bwj7MSI9X3RkxxqmCedl5rfP+yKwNSdfu8i4EiCZN/tk2hNBJb8GHSCcPRNZfwfmEHg==",
"license": "MIT",
"engines": {
"node": ">=14"
@@ -969,12 +1041,12 @@
}
},
"node_modules/@getalby/sdk": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/@getalby/sdk/-/sdk-5.1.1.tgz",
- "integrity": "sha512-t/kg2ljPx86qRYKqEVc5VYhDICFKtVPRlQKIz5cI/AqOLYVguLJz1AkQlDBaiOz2PW5FxoyGlLkTGmX7ONHH/Q==",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/@getalby/sdk/-/sdk-5.1.2.tgz",
+ "integrity": "sha512-yUF9LhuvdIFOwjV1aG0ryzfwDiGBFk/CRLkRvrrM9dsE38SUjKsf1FDga5jxsKMu80nWcPZR9TiGGASWedoYPA==",
"license": "MIT",
"dependencies": {
- "@getalby/lightning-tools": "^5.1.2",
+ "@getalby/lightning-tools": "^5.2.0",
"nostr-tools": "2.15.0"
},
"engines": {
@@ -985,6 +1057,116 @@
"url": "lightning:hello@getalby.com"
}
},
+ "node_modules/@getalby/sdk/node_modules/@noble/curves": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz",
+ "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "1.3.2"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@getalby/sdk/node_modules/@noble/curves/node_modules/@noble/hashes": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz",
+ "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@getalby/sdk/node_modules/@noble/hashes": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz",
+ "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@getalby/sdk/node_modules/@scure/base": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz",
+ "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/@getalby/sdk/node_modules/@scure/bip32": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz",
+ "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/curves": "~1.1.0",
+ "@noble/hashes": "~1.3.1",
+ "@scure/base": "~1.1.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@getalby/sdk/node_modules/@scure/bip32/node_modules/@noble/curves": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz",
+ "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "1.3.1"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@getalby/sdk/node_modules/@scure/bip39": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz",
+ "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "~1.3.0",
+ "@scure/base": "~1.1.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@getalby/sdk/node_modules/nostr-tools": {
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.15.0.tgz",
+ "integrity": "sha512-Jj/+UFbu3JbTAWP4ipPFNuyD4W5eVRBNAP+kmnoRCYp3bLmTrlQ0Qhs5O1xSQJTFpjdZqoS0zZOUKdxUdjc+pw==",
+ "license": "Unlicense",
+ "dependencies": {
+ "@noble/ciphers": "^0.5.1",
+ "@noble/curves": "1.2.0",
+ "@noble/hashes": "1.3.1",
+ "@scure/base": "1.1.1",
+ "@scure/bip32": "1.3.1",
+ "@scure/bip39": "1.2.1",
+ "nostr-wasm": "0.1.0"
+ },
+ "peerDependencies": {
+ "typescript": ">=5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@hookform/resolvers": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/@hookform/resolvers/-/resolvers-3.10.0.tgz",
@@ -1052,33 +1234,19 @@
}
},
"node_modules/@humanfs/node": {
- "version": "0.16.6",
- "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz",
- "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==",
+ "version": "0.16.7",
+ "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz",
+ "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@humanfs/core": "^0.19.1",
- "@humanwhocodes/retry": "^0.3.0"
+ "@humanwhocodes/retry": "^0.4.0"
},
"engines": {
"node": ">=18.18.0"
}
},
- "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz",
- "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==",
- "dev": true,
- "license": "Apache-2.0",
- "engines": {
- "node": ">=18.18"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/nzakas"
- }
- },
"node_modules/@humanwhocodes/module-importer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
@@ -1094,9 +1262,9 @@
}
},
"node_modules/@humanwhocodes/retry": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz",
- "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==",
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz",
+ "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -1125,17 +1293,23 @@
}
},
"node_modules/@jridgewell/gen-mapping": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
- "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
+ "version": "0.3.13",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
"license": "MIT",
"dependencies": {
- "@jridgewell/set-array": "^1.2.1",
- "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/sourcemap-codec": "^1.5.0",
+ "@jridgewell/trace-mapping": "^0.3.24"
+ }
+ },
+ "node_modules/@jridgewell/remapping": {
+ "version": "2.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",
+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.5",
"@jridgewell/trace-mapping": "^0.3.24"
- },
- "engines": {
- "node": ">=6.0.0"
}
},
"node_modules/@jridgewell/resolve-uri": {
@@ -1147,31 +1321,51 @@
"node": ">=6.0.0"
}
},
- "node_modules/@jridgewell/set-array": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz",
- "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
- "license": "MIT",
- "engines": {
- "node": ">=6.0.0"
- }
- },
"node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
- "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
"license": "MIT"
},
"node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.25",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
- "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
+ "version": "0.3.31",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
"license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@jsr/nostrify__nostrify": {
+ "version": "0.46.5",
+ "resolved": "https://npm.jsr.io/~/11/@jsr/nostrify__nostrify/0.46.5.tgz",
+ "integrity": "sha512-l81N0o1A4WKAnOhq600ASDLxZbwzFZzUjhAkARPNFbWkXmEssVvXEQXyyoy1s7lboK45iZCijW0Bia7NHXmSug==",
+ "dependencies": {
+ "@jsr/nostrify__types": "^0.36.0",
+ "@jsr/scure__base": "^1.2.4",
+ "@jsr/std__encoding": "^0.224.1",
+ "lru-cache": "^10.2.0",
+ "nostr-tools": "^2.13.0",
+ "websocket-ts": "^2.2.1",
+ "zod": "^3.23.8"
+ }
+ },
+ "node_modules/@jsr/nostrify__types": {
+ "version": "0.36.0",
+ "resolved": "https://npm.jsr.io/~/11/@jsr/nostrify__types/0.36.0.tgz",
+ "integrity": "sha512-kDjFf1nJMhZafULtH2GW+TWjs85J0aDxYYLpwBDQugDVsFqG2kLbxnoE2NtMJCIMNk1vUaipUHeil//4fY/d2w=="
+ },
+ "node_modules/@jsr/scure__base": {
+ "version": "1.2.6",
+ "resolved": "https://npm.jsr.io/~/11/@jsr/scure__base/1.2.6.tgz",
+ "integrity": "sha512-oZvJweJ4VMgVHJdsp8wwcG7t1U8aZLe0h8f4oNSFfavGqOKhpmi0b9mZ8vXLtGzBGiqVjK8Mon1NVMzTJincLQ=="
+ },
+ "node_modules/@jsr/std__encoding": {
+ "version": "0.224.3",
+ "resolved": "https://npm.jsr.io/~/11/@jsr/std__encoding/0.224.3.tgz",
+ "integrity": "sha512-zAuX2QV1zwJ5RSmrnDGVerAtN3pBXpYYNlGzhERW9AiQ1UJd2/xruyB3i5NdTWy2OK2pjETswOj+0+prYTPlxQ=="
+ },
"node_modules/@noble/ciphers": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.5.3.tgz",
@@ -1182,36 +1376,27 @@
}
},
"node_modules/@noble/curves": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz",
- "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==",
+ "version": "1.9.7",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz",
+ "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==",
"license": "MIT",
"dependencies": {
- "@noble/hashes": "1.3.2"
+ "@noble/hashes": "1.8.0"
},
- "funding": {
- "url": "https://paulmillr.com/funding/"
- }
- },
- "node_modules/@noble/curves/node_modules/@noble/hashes": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz",
- "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==",
- "license": "MIT",
"engines": {
- "node": ">= 16"
+ "node": "^14.21.3 || >=16"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@noble/hashes": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz",
- "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==",
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz",
+ "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==",
"license": "MIT",
"engines": {
- "node": ">= 16"
+ "node": "^14.21.3 || >=16"
},
"funding": {
"url": "https://paulmillr.com/funding/"
@@ -1311,6 +1496,12 @@
"resolved": "https://registry.npmjs.org/@nostrify/types/-/types-0.36.7.tgz",
"integrity": "sha512-Jdf2eWdIzonMzic/st4ltre7XIcXVNTjmcbKpw4xGEfNmoq2Y4wj8KcSB6s0TUqxcLEyiXnyGP8EDx/gEVri9A=="
},
+ "node_modules/@openzeppelin/contracts": {
+ "version": "5.4.0",
+ "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.4.0.tgz",
+ "integrity": "sha512-eCYgWnLg6WO+X52I16TZt8uEjbtdkgLC0SUX/xnAksjjrQI4Xfn4iBRoI5j55dmlOhDv1Y7BoR3cU7e3WWhC6A==",
+ "license": "MIT"
+ },
"node_modules/@pkgjs/parseargs": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
@@ -1328,25 +1519,25 @@
"license": "MIT"
},
"node_modules/@radix-ui/primitive": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz",
- "integrity": "sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz",
+ "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==",
"license": "MIT"
},
"node_modules/@radix-ui/react-accordion": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.8.tgz",
- "integrity": "sha512-c7OKBvO36PfQIUGIjj1Wko0hH937pYFU2tR5zbIJDUsmTzHoZVHHt4bmb7OOJbzTaWJtVELKWojBHa7OcnUHmQ==",
+ "version": "1.2.12",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.12.tgz",
+ "integrity": "sha512-T4nygeh9YE9dLRPhAHSeOZi7HBXo+0kYIPJXayZfvWOWA0+n3dESrZbjfDPUABkUNym6Hd+f2IR113To8D2GPA==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-collapsible": "1.1.8",
- "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collapsible": "1.1.12",
+ "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
"peerDependencies": {
@@ -1365,17 +1556,17 @@
}
},
"node_modules/@radix-ui/react-alert-dialog": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.11.tgz",
- "integrity": "sha512-4KfkwrFnAw3Y5Jeoq6G+JYSKW0JfIS3uDdFC/79Jw9AsMayZMizSSMxk1gkrolYXsa/WzbbDfOA7/D8N5D+l1g==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.15.tgz",
+ "integrity": "sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-dialog": "1.1.11",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-slot": "1.2.0"
+ "@radix-ui/react-dialog": "1.1.15",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -1393,12 +1584,12 @@
}
},
"node_modules/@radix-ui/react-arrow": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.4.tgz",
- "integrity": "sha512-qz+fxrqgNxG0dYew5l7qR3c7wdgRu1XVUHGnGYX7rg5HM4p9SWaRmJwfgR3J0SgyUKayLmzQIun+N6rWRgiRKw==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.7.tgz",
+ "integrity": "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.0"
+ "@radix-ui/react-primitive": "2.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -1416,12 +1607,12 @@
}
},
"node_modules/@radix-ui/react-aspect-ratio": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.4.tgz",
- "integrity": "sha512-ie2mUDtM38LBqVU+Xn+GIY44tWM5yVbT5uXO+th85WZxUUsgEdWNNZWecqqGzkQ4Af+Fq1mYT6TyQ/uUf5gfcw==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.7.tgz",
+ "integrity": "sha512-Yq6lvO9HQyPwev1onK1daHCHqXVLzPhSVjmsNjCa2Zcxy2f7uJD2itDtxknv6FzAKCwD1qQkeVDmX/cev13n/g==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.0"
+ "@radix-ui/react-primitive": "2.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -1439,13 +1630,13 @@
}
},
"node_modules/@radix-ui/react-avatar": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-avatar/-/react-avatar-1.1.7.tgz",
- "integrity": "sha512-V7ODUt4mUoJTe3VUxZw6nfURxaPALVqmDQh501YmaQsk3D8AZQrOPRnfKn4H7JGDLBc0KqLhT94H79nV88ppNg==",
+ "version": "1.1.10",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-avatar/-/react-avatar-1.1.10.tgz",
+ "integrity": "sha512-V8piFfWapM5OmNCXTzVQY+E1rDa53zY+MQ4Y7356v4fFz6vqCyUtIz2rUD44ZEdwg78/jKmMJHj07+C/Z/rcog==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-is-hydrated": "0.1.0",
"@radix-ui/react-use-layout-effect": "1.1.1"
@@ -1466,16 +1657,16 @@
}
},
"node_modules/@radix-ui/react-checkbox": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.2.3.tgz",
- "integrity": "sha512-pHVzDYsnaDmBlAuwim45y3soIN8H4R7KbkSVirGhXO+R/kO2OLCe0eucUEbddaTcdMHHdzcIGHtZSMSQlA+apw==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.3.3.tgz",
+ "integrity": "sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-previous": "1.1.1",
"@radix-ui/react-use-size": "1.1.1"
@@ -1496,17 +1687,17 @@
}
},
"node_modules/@radix-ui/react-collapsible": {
- "version": "1.1.8",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.8.tgz",
- "integrity": "sha512-hxEsLvK9WxIAPyxdDRULL4hcaSjMZCfP7fHB0Z1uUnDoDBat1Zh46hwYfa69DeZAbJrPckjf0AGAtEZyvDyJbw==",
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.12.tgz",
+ "integrity": "sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-layout-effect": "1.1.1"
},
@@ -1526,15 +1717,15 @@
}
},
"node_modules/@radix-ui/react-collection": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.4.tgz",
- "integrity": "sha512-cv4vSf7HttqXilDnAnvINd53OTl1/bjUYVZrkFnA7nwmY9Ob2POUy0WY0sfqBAe1s5FyKsyceQlqiEGPYNTadg==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.7.tgz",
+ "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-slot": "1.2.0"
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -1582,15 +1773,15 @@
}
},
"node_modules/@radix-ui/react-context-menu": {
- "version": "2.2.12",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.2.12.tgz",
- "integrity": "sha512-5UFKuTMX8F2/KjHvyqu9IYT8bEtDSCJwwIx1PghBo4jh9S6jJVsceq9xIjqsOVcxsynGwV5eaqPE3n/Cu+DrSA==",
+ "version": "2.2.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.2.16.tgz",
+ "integrity": "sha512-O8morBEW+HsVG28gYDZPTrT9UUovQUlJue5YO836tiTJhuIWBm/zQHc7j388sHWtdH/xUZurK9olD2+pcqx5ww==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-menu": "2.1.12",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-menu": "2.1.16",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
@@ -1610,22 +1801,22 @@
}
},
"node_modules/@radix-ui/react-dialog": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.11.tgz",
- "integrity": "sha512-yI7S1ipkP5/+99qhSI6nthfo/tR6bL6Zgxi/+1UO6qPa6UeM6nlafWcQ65vB4rU2XjgjMfMhI3k9Y5MztA62VQ==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.15.tgz",
+ "integrity": "sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.7",
- "@radix-ui/react-focus-guards": "1.1.2",
- "@radix-ui/react-focus-scope": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-portal": "1.1.6",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-slot": "1.2.0",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
"@radix-ui/react-use-controllable-state": "1.2.2",
"aria-hidden": "^1.2.4",
"react-remove-scroll": "^2.6.3"
@@ -1661,14 +1852,14 @@
}
},
"node_modules/@radix-ui/react-dismissable-layer": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.7.tgz",
- "integrity": "sha512-j5+WBUdhccJsmH5/H0K6RncjDtoALSEr6jbkaZu+bjw6hOPOhHycr6vEUujl+HBK8kjUfWcoCJXxP6e4lUlMZw==",
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.11.tgz",
+ "integrity": "sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-escape-keydown": "1.1.1"
},
@@ -1688,17 +1879,17 @@
}
},
"node_modules/@radix-ui/react-dropdown-menu": {
- "version": "2.1.12",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.12.tgz",
- "integrity": "sha512-VJoMs+BWWE7YhzEQyVwvF9n22Eiyr83HotCVrMQzla/OwRovXCgah7AcaEr4hMNj4gJxSdtIbcHGvmJXOoJVHA==",
+ "version": "2.1.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.16.tgz",
+ "integrity": "sha512-1PLGQEynI/3OX/ftV54COn+3Sud/Mn8vALg2rWnBLnRaGtJDduNW/22XjlGgPdpcIbiQxjKtb7BkcjP00nqfJw==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-menu": "2.1.12",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-menu": "2.1.16",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
"peerDependencies": {
@@ -1717,9 +1908,9 @@
}
},
"node_modules/@radix-ui/react-focus-guards": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.2.tgz",
- "integrity": "sha512-fyjAACV62oPV925xFCrH8DR5xWhg9KYtJT4s3u54jxp+L/hbpTY2kIeEFFbFe+a/HCE94zGQMZLIpVTPVZDhaA==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.3.tgz",
+ "integrity": "sha512-0rFg/Rj2Q62NCm62jZw0QX7a3sz6QCQU0LpZdNrJX8byRGaGVTqbrW9jAoIAHyMQqsNpeZ81YgSizOt5WXq0Pw==",
"license": "MIT",
"peerDependencies": {
"@types/react": "*",
@@ -1732,13 +1923,13 @@
}
},
"node_modules/@radix-ui/react-focus-scope": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.4.tgz",
- "integrity": "sha512-r2annK27lIW5w9Ho5NyQgqs0MmgZSTIKXWpVCJaLC1q2kZrZkcqnmHkCHMEmv8XLvsLlurKMPT+kbKkRkm/xVA==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz",
+ "integrity": "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1"
},
"peerDependencies": {
@@ -1757,19 +1948,19 @@
}
},
"node_modules/@radix-ui/react-hover-card": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.1.11.tgz",
- "integrity": "sha512-q9h9grUpGZKR3MNhtVCLVnPGmx1YnzBgGR+O40mhSNGsUnkR+LChVH8c7FB0mkS+oudhd8KAkZGTJPJCjdAPIg==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.1.15.tgz",
+ "integrity": "sha512-qgTkjNT1CfKMoP0rcasmlH2r1DAiYicWsDsufxl940sT2wHNEWWv6FMWIQXWhVdmC1d/HYfbhQx60KYyAtKxjg==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.7",
- "@radix-ui/react-popper": "1.2.4",
- "@radix-ui/react-portal": "1.1.6",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
"peerDependencies": {
@@ -1806,12 +1997,12 @@
}
},
"node_modules/@radix-ui/react-label": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.4.tgz",
- "integrity": "sha512-wy3dqizZnZVV4ja0FNnUhIWNwWdoldXrneEyUcVtLYDAt8ovGS4ridtMAOGgXBBIfggL4BOveVWsjXDORdGEQg==",
+ "version": "2.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.7.tgz",
+ "integrity": "sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.0"
+ "@radix-ui/react-primitive": "2.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -1829,26 +2020,26 @@
}
},
"node_modules/@radix-ui/react-menu": {
- "version": "2.1.12",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.12.tgz",
- "integrity": "sha512-+qYq6LfbiGo97Zz9fioX83HCiIYYFNs8zAsVCMQrIakoNYylIzWuoD/anAD3UzvvR6cnswmfRFJFq/zYYq/k7Q==",
+ "version": "2.1.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.16.tgz",
+ "integrity": "sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
- "@radix-ui/react-dismissable-layer": "1.1.7",
- "@radix-ui/react-focus-guards": "1.1.2",
- "@radix-ui/react-focus-scope": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-popper": "1.2.4",
- "@radix-ui/react-portal": "1.1.6",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-roving-focus": "1.1.7",
- "@radix-ui/react-slot": "1.2.0",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-slot": "1.2.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"aria-hidden": "^1.2.4",
"react-remove-scroll": "^2.6.3"
@@ -1869,20 +2060,20 @@
}
},
"node_modules/@radix-ui/react-menubar": {
- "version": "1.1.12",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.1.12.tgz",
- "integrity": "sha512-bM2vT5nxRqJH/d1vFQ9jLsW4qR70yFQw2ZD1TUPWUNskDsV0eYeMbbNJqxNjGMOVogEkOJaHtu11kzYdTJvVJg==",
+ "version": "1.1.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.1.16.tgz",
+ "integrity": "sha512-EB1FktTz5xRRi2Er974AUQZWg2yVBb1yjip38/lgwtCVRd3a+maUoGHN/xs9Yv8SY8QwbSEb+YrxGadVWbEutA==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-menu": "2.1.12",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-roving-focus": "1.1.7",
+ "@radix-ui/react-menu": "2.1.16",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
"peerDependencies": {
@@ -1901,25 +2092,25 @@
}
},
"node_modules/@radix-ui/react-navigation-menu": {
- "version": "1.2.10",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.10.tgz",
- "integrity": "sha512-kGDqMVPj2SRB1vJmXN/jnhC66REAXNyDmDRubbbmJ+360zSIJUDmWGMKIJOf72PHMwPENrbtJVb3CMAUJDjEIA==",
+ "version": "1.2.14",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.14.tgz",
+ "integrity": "sha512-YB9mTFQvCOAQMHU+C/jVl96WmuWeltyUEpRJJky51huhds5W2FQr1J8D/16sQlf0ozxkPK8uF3niQMdUwZPv5w==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
- "@radix-ui/react-dismissable-layer": "1.1.7",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-layout-effect": "1.1.1",
"@radix-ui/react-use-previous": "1.1.1",
- "@radix-ui/react-visually-hidden": "1.2.0"
+ "@radix-ui/react-visually-hidden": "1.2.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -1937,23 +2128,23 @@
}
},
"node_modules/@radix-ui/react-popover": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.11.tgz",
- "integrity": "sha512-yFMfZkVA5G3GJnBgb2PxrrcLKm1ZLWXrbYVgdyTl//0TYEIHS9LJbnyz7WWcZ0qCq7hIlJZpRtxeSeIG5T5oJw==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.15.tgz",
+ "integrity": "sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.7",
- "@radix-ui/react-focus-guards": "1.1.2",
- "@radix-ui/react-focus-scope": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-popper": "1.2.4",
- "@radix-ui/react-portal": "1.1.6",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-slot": "1.2.0",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
"@radix-ui/react-use-controllable-state": "1.2.2",
"aria-hidden": "^1.2.4",
"react-remove-scroll": "^2.6.3"
@@ -1974,16 +2165,16 @@
}
},
"node_modules/@radix-ui/react-popper": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.4.tgz",
- "integrity": "sha512-3p2Rgm/a1cK0r/UVkx5F/K9v/EplfjAeIFCGOPYPO4lZ0jtg4iSQXt/YGTSLWaf4x7NG6Z4+uKFcylcTZjeqDA==",
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.8.tgz",
+ "integrity": "sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==",
"license": "MIT",
"dependencies": {
"@floating-ui/react-dom": "^2.0.0",
- "@radix-ui/react-arrow": "1.1.4",
+ "@radix-ui/react-arrow": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-layout-effect": "1.1.1",
"@radix-ui/react-use-rect": "1.1.1",
@@ -2006,12 +2197,12 @@
}
},
"node_modules/@radix-ui/react-portal": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.6.tgz",
- "integrity": "sha512-XmsIl2z1n/TsYFLIdYam2rmFwf9OC/Sh2avkbmVMDuBZIe7hSpM0cYnWPAo7nHOVx8zTuwDZGByfcqLdnzp3Vw==",
+ "version": "1.1.9",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.9.tgz",
+ "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-layout-effect": "1.1.1"
},
"peerDependencies": {
@@ -2030,9 +2221,9 @@
}
},
"node_modules/@radix-ui/react-presence": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.4.tgz",
- "integrity": "sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.5.tgz",
+ "integrity": "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2",
@@ -2054,12 +2245,12 @@
}
},
"node_modules/@radix-ui/react-primitive": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.0.tgz",
- "integrity": "sha512-/J/FhLdK0zVcILOwt5g+dH4KnkonCtkVJsa2G6JmvbbtZfBEI1gMsO3QMjseL4F/SwfAMt1Vc/0XKYKq+xJ1sw==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz",
+ "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-slot": "1.2.0"
+ "@radix-ui/react-slot": "1.2.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -2077,13 +2268,13 @@
}
},
"node_modules/@radix-ui/react-progress": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.1.4.tgz",
- "integrity": "sha512-8rl9w7lJdcVPor47Dhws9mUHRHLE+8JEgyJRdNWCpGPa6HIlr3eh+Yn9gyx1CnCLbw5naHsI2gaO9dBWO50vzw==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.1.7.tgz",
+ "integrity": "sha512-vPdg/tF6YC/ynuBIJlk1mm7Le0VgW6ub6J2UWnTQ7/D23KXcPI1qy+0vBkgKgd38RCMJavBXpB83HPNFMTb0Fg==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-primitive": "2.1.0"
+ "@radix-ui/react-primitive": "2.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -2101,18 +2292,18 @@
}
},
"node_modules/@radix-ui/react-radio-group": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.3.4.tgz",
- "integrity": "sha512-N4J9QFdW5zcJNxxY/zwTXBN4Uc5VEuRM7ZLjNfnWoKmNvgrPtNNw4P8zY532O3qL6aPkaNO+gY9y6bfzmH4U1g==",
+ "version": "1.3.8",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.3.8.tgz",
+ "integrity": "sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-roving-focus": "1.1.7",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-previous": "1.1.1",
"@radix-ui/react-use-size": "1.1.1"
@@ -2133,18 +2324,18 @@
}
},
"node_modules/@radix-ui/react-roving-focus": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.7.tgz",
- "integrity": "sha512-C6oAg451/fQT3EGbWHbCQjYTtbyjNO1uzQgMzwyivcHT3GKNEmu1q3UuREhN+HzHAVtv3ivMVK08QlC+PkYw9Q==",
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.11.tgz",
+ "integrity": "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
@@ -2164,18 +2355,18 @@
}
},
"node_modules/@radix-ui/react-scroll-area": {
- "version": "1.2.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.6.tgz",
- "integrity": "sha512-lj8OMlpPERXrQIHlEQdlXHJoRT52AMpBrgyPYylOhXYq5e/glsEdtOc/kCQlsTdtgN5U0iDbrrolDadvektJGQ==",
+ "version": "1.2.10",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.10.tgz",
+ "integrity": "sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==",
"license": "MIT",
"dependencies": {
"@radix-ui/number": "1.1.1",
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-layout-effect": "1.1.1"
},
@@ -2195,30 +2386,30 @@
}
},
"node_modules/@radix-ui/react-select": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.2.2.tgz",
- "integrity": "sha512-HjkVHtBkuq+r3zUAZ/CvNWUGKPfuicGDbgtZgiQuFmNcV5F+Tgy24ep2nsAW2nFgvhGPJVqeBZa6KyVN0EyrBA==",
+ "version": "2.2.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.2.6.tgz",
+ "integrity": "sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ==",
"license": "MIT",
"dependencies": {
"@radix-ui/number": "1.1.1",
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
- "@radix-ui/react-dismissable-layer": "1.1.7",
- "@radix-ui/react-focus-guards": "1.1.2",
- "@radix-ui/react-focus-scope": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-focus-guards": "1.1.3",
+ "@radix-ui/react-focus-scope": "1.1.7",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-popper": "1.2.4",
- "@radix-ui/react-portal": "1.1.6",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-slot": "1.2.0",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-layout-effect": "1.1.1",
"@radix-ui/react-use-previous": "1.1.1",
- "@radix-ui/react-visually-hidden": "1.2.0",
+ "@radix-ui/react-visually-hidden": "1.2.3",
"aria-hidden": "^1.2.4",
"react-remove-scroll": "^2.6.3"
},
@@ -2238,12 +2429,12 @@
}
},
"node_modules/@radix-ui/react-separator": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.4.tgz",
- "integrity": "sha512-2fTm6PSiUm8YPq9W0E4reYuv01EE3aFSzt8edBiXqPHshF8N9+Kymt/k0/R+F3dkY5lQyB/zPtrP82phskLi7w==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.7.tgz",
+ "integrity": "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.0"
+ "@radix-ui/react-primitive": "2.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -2261,18 +2452,18 @@
}
},
"node_modules/@radix-ui/react-slider": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.3.2.tgz",
- "integrity": "sha512-oQnqfgSiYkxZ1MrF6672jw2/zZvpB+PJsrIc3Zm1zof1JHf/kj7WhmROw7JahLfOwYQ5/+Ip0rFORgF1tjSiaQ==",
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.3.6.tgz",
+ "integrity": "sha512-JPYb1GuM1bxfjMRlNLE+BcmBC8onfCi60Blk7OBqi2MLTFdS+8401U4uFjnwkOr49BLmXxLC6JHkvAsx5OJvHw==",
"license": "MIT",
"dependencies": {
"@radix-ui/number": "1.1.1",
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-layout-effect": "1.1.1",
"@radix-ui/react-use-previous": "1.1.1",
@@ -2294,9 +2485,9 @@
}
},
"node_modules/@radix-ui/react-slot": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.0.tgz",
- "integrity": "sha512-ujc+V6r0HNDviYqIK3rW4ffgYiZ8g5DEHrGJVk4x7kTlLXRDILnKX9vAUYeIsLOoDpDJ0ujpqMkjH4w2ofuo6w==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz",
+ "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==",
"license": "MIT",
"dependencies": {
"@radix-ui/react-compose-refs": "1.1.2"
@@ -2312,15 +2503,15 @@
}
},
"node_modules/@radix-ui/react-switch": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.2.2.tgz",
- "integrity": "sha512-7Z8n6L+ifMIIYZ83f28qWSceUpkXuslI2FJ34+kDMTiyj91ENdpdQ7VCidrzj5JfwfZTeano/BnGBbu/jqa5rQ==",
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.2.6.tgz",
+ "integrity": "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-previous": "1.1.1",
"@radix-ui/react-use-size": "1.1.1"
@@ -2341,18 +2532,18 @@
}
},
"node_modules/@radix-ui/react-tabs": {
- "version": "1.1.9",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.9.tgz",
- "integrity": "sha512-KIjtwciYvquiW/wAFkELZCVnaNLBsYNhTNcvl+zfMAbMhRkcvNuCLXDDd22L0j7tagpzVh/QwbFpwAATg7ILPw==",
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.13.tgz",
+ "integrity": "sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-roving-focus": "1.1.7",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
"peerDependencies": {
@@ -2371,23 +2562,23 @@
}
},
"node_modules/@radix-ui/react-toast": {
- "version": "1.2.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.2.11.tgz",
- "integrity": "sha512-Ed2mlOmT+tktOsu2NZBK1bCSHh/uqULu1vWOkpQTVq53EoOuZUZw7FInQoDB3uil5wZc2oe0XN9a7uVZB7/6AQ==",
+ "version": "1.2.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.2.15.tgz",
+ "integrity": "sha512-3OSz3TacUWy4WtOXV38DggwxoqJK4+eDkNMl5Z/MJZaoUPaP4/9lf81xXMe1I2ReTAptverZUpbPY4wWwWyL5g==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-collection": "1.1.4",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-collection": "1.1.7",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.7",
- "@radix-ui/react-portal": "1.1.6",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-callback-ref": "1.1.1",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@radix-ui/react-use-layout-effect": "1.1.1",
- "@radix-ui/react-visually-hidden": "1.2.0"
+ "@radix-ui/react-visually-hidden": "1.2.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -2405,13 +2596,13 @@
}
},
"node_modules/@radix-ui/react-toggle": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.6.tgz",
- "integrity": "sha512-3SeJxKeO3TO1zVw1Nl++Cp0krYk6zHDHMCUXXVkosIzl6Nxcvb07EerQpyD2wXQSJ5RZajrYAmPaydU8Hk1IyQ==",
+ "version": "1.1.10",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.10.tgz",
+ "integrity": "sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
- "@radix-ui/react-primitive": "2.1.0",
+ "@radix-ui/primitive": "1.1.3",
+ "@radix-ui/react-primitive": "2.1.3",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
"peerDependencies": {
@@ -2430,17 +2621,17 @@
}
},
"node_modules/@radix-ui/react-toggle-group": {
- "version": "1.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.1.7.tgz",
- "integrity": "sha512-GRaPJhxrRSOqAcmcX3MwRL/SZACkoYdmoY9/sg7Bd5DhBYsB2t4co0NxTvVW8H7jUmieQDQwRtUlZ5Ta8UbgJA==",
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.1.11.tgz",
+ "integrity": "sha512-5umnS0T8JQzQT6HbPyO7Hh9dgd82NmS36DQr+X/YJ9ctFNCiiQd6IJAYYZ33LUwm8M+taCz5t2ui29fHZc4Y6Q==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-context": "1.1.2",
"@radix-ui/react-direction": "1.1.1",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-roving-focus": "1.1.7",
- "@radix-ui/react-toggle": "1.1.6",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-roving-focus": "1.1.11",
+ "@radix-ui/react-toggle": "1.1.10",
"@radix-ui/react-use-controllable-state": "1.2.2"
},
"peerDependencies": {
@@ -2459,23 +2650,23 @@
}
},
"node_modules/@radix-ui/react-tooltip": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.2.4.tgz",
- "integrity": "sha512-DyW8VVeeMSSLFvAmnVnCwvI3H+1tpJFHT50r+tdOoMse9XqYDBCcyux8u3G2y+LOpt7fPQ6KKH0mhs+ce1+Z5w==",
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.2.8.tgz",
+ "integrity": "sha512-tY7sVt1yL9ozIxvmbtN5qtmH2krXcBCfjEiCgKGLqunJHvgvZG2Pcl2oQ3kbcZARb1BGEHdkLzcYGO8ynVlieg==",
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.2",
+ "@radix-ui/primitive": "1.1.3",
"@radix-ui/react-compose-refs": "1.1.2",
"@radix-ui/react-context": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.7",
+ "@radix-ui/react-dismissable-layer": "1.1.11",
"@radix-ui/react-id": "1.1.1",
- "@radix-ui/react-popper": "1.2.4",
- "@radix-ui/react-portal": "1.1.6",
- "@radix-ui/react-presence": "1.1.4",
- "@radix-ui/react-primitive": "2.1.0",
- "@radix-ui/react-slot": "1.2.0",
+ "@radix-ui/react-popper": "1.2.8",
+ "@radix-ui/react-portal": "1.1.9",
+ "@radix-ui/react-presence": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.3",
+ "@radix-ui/react-slot": "1.2.3",
"@radix-ui/react-use-controllable-state": "1.2.2",
- "@radix-ui/react-visually-hidden": "1.2.0"
+ "@radix-ui/react-visually-hidden": "1.2.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -2647,12 +2838,12 @@
}
},
"node_modules/@radix-ui/react-visually-hidden": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.0.tgz",
- "integrity": "sha512-rQj0aAWOpCdCMRbI6pLQm8r7S2BM3YhTa0SzOYD55k+hJA8oo9J+H+9wLM9oMlZWOX/wJWPTzfDfmZkf7LvCfg==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.3.tgz",
+ "integrity": "sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==",
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.0"
+ "@radix-ui/react-primitive": "2.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -2684,10 +2875,17 @@
"node": ">=14.0.0"
}
},
+ "node_modules/@rolldown/pluginutils": {
+ "version": "1.0.0-beta.27",
+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",
+ "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@rollup/pluginutils": {
- "version": "5.1.4",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz",
- "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz",
+ "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==",
"license": "MIT",
"dependencies": {
"@types/estree": "^1.0.0",
@@ -2712,22 +2910,10 @@
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
"license": "MIT"
},
- "node_modules/@rollup/pluginutils/node_modules/picomatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/@rollup/rollup-android-arm-eabi": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.1.tgz",
- "integrity": "sha512-kxz0YeeCrRUHz3zyqvd7n+TVRlNyTifBsmnmNPtk3hQURUyG9eAB+usz6DAwagMusjx/zb3AjvDUvhFGDAexGw==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.5.tgz",
+ "integrity": "sha512-8c1vW4ocv3UOMp9K+gToY5zL2XiiVw3k7f1ksf4yO1FlDFQ1C2u72iACFnSOceJFsWskc2WZNqeRhFRPzv+wtQ==",
"cpu": [
"arm"
],
@@ -2739,9 +2925,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.40.1.tgz",
- "integrity": "sha512-PPkxTOisoNC6TpnDKatjKkjRMsdaWIhyuMkA4UsBXT9WEZY4uHezBTjs6Vl4PbqQQeu6oION1w2voYZv9yquCw==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.5.tgz",
+ "integrity": "sha512-mQGfsIEFcu21mvqkEKKu2dYmtuSZOBMmAl5CFlPGLY94Vlcm+zWApK7F/eocsNzp8tKmbeBP8yXyAbx0XHsFNA==",
"cpu": [
"arm64"
],
@@ -2753,9 +2939,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.40.1.tgz",
- "integrity": "sha512-VWXGISWFY18v/0JyNUy4A46KCFCb9NVsH+1100XP31lud+TzlezBbz24CYzbnA4x6w4hx+NYCXDfnvDVO6lcAA==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.5.tgz",
+ "integrity": "sha512-takF3CR71mCAGA+v794QUZ0b6ZSrgJkArC+gUiG6LB6TQty9T0Mqh3m2ImRBOxS2IeYBo4lKWIieSvnEk2OQWA==",
"cpu": [
"arm64"
],
@@ -2767,9 +2953,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.40.1.tgz",
- "integrity": "sha512-nIwkXafAI1/QCS7pxSpv/ZtFW6TXcNUEHAIA9EIyw5OzxJZQ1YDrX+CL6JAIQgZ33CInl1R6mHet9Y/UZTg2Bw==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.5.tgz",
+ "integrity": "sha512-W901Pla8Ya95WpxDn//VF9K9u2JbocwV/v75TE0YIHNTbhqUTv9w4VuQ9MaWlNOkkEfFwkdNhXgcLqPSmHy0fA==",
"cpu": [
"x64"
],
@@ -2781,9 +2967,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.40.1.tgz",
- "integrity": "sha512-BdrLJ2mHTrIYdaS2I99mriyJfGGenSaP+UwGi1kB9BLOCu9SR8ZpbkmmalKIALnRw24kM7qCN0IOm6L0S44iWw==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.5.tgz",
+ "integrity": "sha512-QofO7i7JycsYOWxe0GFqhLmF6l1TqBswJMvICnRUjqCx8b47MTo46W8AoeQwiokAx3zVryVnxtBMcGcnX12LvA==",
"cpu": [
"arm64"
],
@@ -2795,9 +2981,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.40.1.tgz",
- "integrity": "sha512-VXeo/puqvCG8JBPNZXZf5Dqq7BzElNJzHRRw3vjBE27WujdzuOPecDPc/+1DcdcTptNBep3861jNq0mYkT8Z6Q==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.5.tgz",
+ "integrity": "sha512-jr21b/99ew8ujZubPo9skbrItHEIE50WdV86cdSoRkKtmWa+DDr6fu2c/xyRT0F/WazZpam6kk7IHBerSL7LDQ==",
"cpu": [
"x64"
],
@@ -2809,9 +2995,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.40.1.tgz",
- "integrity": "sha512-ehSKrewwsESPt1TgSE/na9nIhWCosfGSFqv7vwEtjyAqZcvbGIg4JAcV7ZEh2tfj/IlfBeZjgOXm35iOOjadcg==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.5.tgz",
+ "integrity": "sha512-PsNAbcyv9CcecAUagQefwX8fQn9LQ4nZkpDboBOttmyffnInRy8R8dSg6hxxl2Re5QhHBf6FYIDhIj5v982ATQ==",
"cpu": [
"arm"
],
@@ -2823,9 +3009,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.40.1.tgz",
- "integrity": "sha512-m39iO/aaurh5FVIu/F4/Zsl8xppd76S4qoID8E+dSRQvTyZTOI2gVk3T4oqzfq1PtcvOfAVlwLMK3KRQMaR8lg==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.5.tgz",
+ "integrity": "sha512-Fw4tysRutyQc/wwkmcyoqFtJhh0u31K+Q6jYjeicsGJJ7bbEq8LwPWV/w0cnzOqR2m694/Af6hpFayLJZkG2VQ==",
"cpu": [
"arm"
],
@@ -2837,9 +3023,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.40.1.tgz",
- "integrity": "sha512-Y+GHnGaku4aVLSgrT0uWe2o2Rq8te9hi+MwqGF9r9ORgXhmHK5Q71N757u0F8yU1OIwUIFy6YiJtKjtyktk5hg==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.5.tgz",
+ "integrity": "sha512-a+3wVnAYdQClOTlyapKmyI6BLPAFYs0JM8HRpgYZQO02rMR09ZcV9LbQB+NL6sljzG38869YqThrRnfPMCDtZg==",
"cpu": [
"arm64"
],
@@ -2851,9 +3037,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.40.1.tgz",
- "integrity": "sha512-jEwjn3jCA+tQGswK3aEWcD09/7M5wGwc6+flhva7dsQNRZZTe30vkalgIzV4tjkopsTS9Jd7Y1Bsj6a4lzz8gQ==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.5.tgz",
+ "integrity": "sha512-AvttBOMwO9Pcuuf7m9PkC1PUIKsfaAJ4AYhy944qeTJgQOqJYJ9oVl2nYgY7Rk0mkbsuOpCAYSs6wLYB2Xiw0Q==",
"cpu": [
"arm64"
],
@@ -2864,10 +3050,10 @@
"linux"
]
},
- "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.40.1.tgz",
- "integrity": "sha512-ySyWikVhNzv+BV/IDCsrraOAZ3UaC8SZB67FZlqVwXwnFhPihOso9rPOxzZbjp81suB1O2Topw+6Ug3JNegejQ==",
+ "node_modules/@rollup/rollup-linux-loong64-gnu": {
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.5.tgz",
+ "integrity": "sha512-DkDk8pmXQV2wVrF6oq5tONK6UHLz/XcEVow4JTTerdeV1uqPeHxwcg7aFsfnSm9L+OO8WJsWotKM2JJPMWrQtA==",
"cpu": [
"loong64"
],
@@ -2878,10 +3064,10 @@
"linux"
]
},
- "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.40.1.tgz",
- "integrity": "sha512-BvvA64QxZlh7WZWqDPPdt0GH4bznuL6uOO1pmgPnnv86rpUpc8ZxgZwcEgXvo02GRIZX1hQ0j0pAnhwkhwPqWg==",
+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.5.tgz",
+ "integrity": "sha512-W/b9ZN/U9+hPQVvlGwjzi+Wy4xdoH2I8EjaCkMvzpI7wJUs8sWJ03Rq96jRnHkSrcHTpQe8h5Tg3ZzUPGauvAw==",
"cpu": [
"ppc64"
],
@@ -2893,9 +3079,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.40.1.tgz",
- "integrity": "sha512-EQSP+8+1VuSulm9RKSMKitTav89fKbHymTf25n5+Yr6gAPZxYWpj3DzAsQqoaHAk9YX2lwEyAf9S4W8F4l3VBQ==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.5.tgz",
+ "integrity": "sha512-sjQLr9BW7R/ZiXnQiWPkErNfLMkkWIoCz7YMn27HldKsADEKa5WYdobaa1hmN6slu9oWQbB6/jFpJ+P2IkVrmw==",
"cpu": [
"riscv64"
],
@@ -2907,9 +3093,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.40.1.tgz",
- "integrity": "sha512-n/vQ4xRZXKuIpqukkMXZt9RWdl+2zgGNx7Uda8NtmLJ06NL8jiHxUawbwC+hdSq1rrw/9CghCpEONor+l1e2gA==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.5.tgz",
+ "integrity": "sha512-hq3jU/kGyjXWTvAh2awn8oHroCbrPm8JqM7RUpKjalIRWWXE01CQOf/tUNWNHjmbMHg/hmNCwc/Pz3k1T/j/Lg==",
"cpu": [
"riscv64"
],
@@ -2921,9 +3107,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.40.1.tgz",
- "integrity": "sha512-h8d28xzYb98fMQKUz0w2fMc1XuGzLLjdyxVIbhbil4ELfk5/orZlSTpF/xdI9C8K0I8lCkq+1En2RJsawZekkg==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.5.tgz",
+ "integrity": "sha512-gn8kHOrku8D4NGHMK1Y7NA7INQTRdVOntt1OCYypZPRt6skGbddska44K8iocdpxHTMMNui5oH4elPH4QOLrFQ==",
"cpu": [
"s390x"
],
@@ -2935,9 +3121,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.40.1.tgz",
- "integrity": "sha512-XiK5z70PEFEFqcNj3/zRSz/qX4bp4QIraTy9QjwJAb/Z8GM7kVUsD0Uk8maIPeTyPCP03ChdI+VVmJriKYbRHQ==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.5.tgz",
+ "integrity": "sha512-hXGLYpdhiNElzN770+H2nlx+jRog8TyynpTVzdlc6bndktjKWyZyiCsuDAlpd+j+W+WNqfcyAWz9HxxIGfZm1Q==",
"cpu": [
"x64"
],
@@ -2949,9 +3135,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.40.1.tgz",
- "integrity": "sha512-2BRORitq5rQ4Da9blVovzNCMaUlyKrzMSvkVR0D4qPuOy/+pMCrh1d7o01RATwVy+6Fa1WBw+da7QPeLWU/1mQ==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.5.tgz",
+ "integrity": "sha512-arCGIcuNKjBoKAXD+y7XomR9gY6Mw7HnFBv5Rw7wQRvwYLR7gBAgV7Mb2QTyjXfTveBNFAtPt46/36vV9STLNg==",
"cpu": [
"x64"
],
@@ -2962,10 +3148,24 @@
"linux"
]
},
+ "node_modules/@rollup/rollup-openharmony-arm64": {
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.5.tgz",
+ "integrity": "sha512-QoFqB6+/9Rly/RiPjaomPLmR/13cgkIGfA40LHly9zcH1S0bN2HVFYk3a1eAyHQyjs3ZJYlXvIGtcCs5tko9Cw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ]
+ },
"node_modules/@rollup/rollup-win32-arm64-msvc": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.40.1.tgz",
- "integrity": "sha512-b2bcNm9Kbde03H+q+Jjw9tSfhYkzrDUf2d5MAd1bOJuVplXvFhWz7tRtWvD8/ORZi7qSCy0idW6tf2HgxSXQSg==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.5.tgz",
+ "integrity": "sha512-w0cDWVR6MlTstla1cIfOGyl8+qb93FlAVutcor14Gf5Md5ap5ySfQ7R9S/NjNaMLSFdUnKGEasmVnu3lCMqB7w==",
"cpu": [
"arm64"
],
@@ -2977,9 +3177,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.40.1.tgz",
- "integrity": "sha512-DfcogW8N7Zg7llVEfpqWMZcaErKfsj9VvmfSyRjCyo4BI3wPEfrzTtJkZG6gKP/Z92wFm6rz2aDO7/JfiR/whA==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.5.tgz",
+ "integrity": "sha512-Aufdpzp7DpOTULJCuvzqcItSGDH73pF3ko/f+ckJhxQyHtp67rHw3HMNxoIdDMUITJESNE6a8uh4Lo4SLouOUg==",
"cpu": [
"ia32"
],
@@ -2990,10 +3190,24 @@
"win32"
]
},
+ "node_modules/@rollup/rollup-win32-x64-gnu": {
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.5.tgz",
+ "integrity": "sha512-UGBUGPFp1vkj6p8wCRraqNhqwX/4kNQPS57BCFc8wYh0g94iVIW33wJtQAx3G7vrjjNtRaxiMUylM0ktp/TRSQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
"node_modules/@rollup/rollup-win32-x64-msvc": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.40.1.tgz",
- "integrity": "sha512-ECyOuDeH3C1I8jH2MK1RtBJW+YPMvSfT0a5NN0nHfQYnDSJ6tUiZH3gzwVP5/Kfh/+Tt7tpWVF9LXNTnhTJ3kA==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.5.tgz",
+ "integrity": "sha512-TAcgQh2sSkykPRWLrdyy2AiceMckNf5loITqXxFI5VuQjS5tSuw3WlwdN8qv8vzjLAUTvYaH/mVjSFpbkFbpTg==",
"cpu": [
"x64"
],
@@ -3005,51 +3219,57 @@
]
},
"node_modules/@scure/base": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz",
- "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "license": "MIT"
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-2.0.0.tgz",
+ "integrity": "sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
},
"node_modules/@scure/bip32": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz",
- "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==",
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz",
+ "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==",
"license": "MIT",
"dependencies": {
- "@noble/curves": "~1.1.0",
- "@noble/hashes": "~1.3.1",
- "@scure/base": "~1.1.0"
+ "@noble/curves": "~1.9.0",
+ "@noble/hashes": "~1.8.0",
+ "@scure/base": "~1.2.5"
},
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
- "node_modules/@scure/bip32/node_modules/@noble/curves": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz",
- "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==",
+ "node_modules/@scure/bip32/node_modules/@scure/base": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz",
+ "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==",
"license": "MIT",
- "dependencies": {
- "@noble/hashes": "1.3.1"
- },
"funding": {
"url": "https://paulmillr.com/funding/"
}
},
"node_modules/@scure/bip39": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz",
- "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-2.0.1.tgz",
+ "integrity": "sha512-PsxdFj/d2AcJcZDX1FXN3dDgitDDTmwf78rKZq1a6c1P1Nan1X/Sxc7667zU3U+AN60g7SxxP0YCVw2H/hBycg==",
"license": "MIT",
"dependencies": {
- "@noble/hashes": "~1.3.0",
- "@scure/base": "~1.1.0"
+ "@noble/hashes": "2.0.1",
+ "@scure/base": "2.0.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@scure/bip39/node_modules/@noble/hashes": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz",
+ "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 20.19.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
@@ -3062,15 +3282,15 @@
"integrity": "sha512-zAuX2QV1zwJ5RSmrnDGVerAtN3pBXpYYNlGzhERW9AiQ1UJd2/xruyB3i5NdTWy2OK2pjETswOj+0+prYTPlxQ=="
},
"node_modules/@swc/core": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.11.24.tgz",
- "integrity": "sha512-MaQEIpfcEMzx3VWWopbofKJvaraqmL6HbLlw2bFZ7qYqYw3rkhM0cQVEgyzbHtTWwCwPMFZSC2DUbhlZgrMfLg==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.13.5.tgz",
+ "integrity": "sha512-WezcBo8a0Dg2rnR82zhwoR6aRNxeTGfK5QCD6TQ+kg3xx/zNT02s/0o+81h/3zhvFSB24NtqEr8FTw88O5W/JQ==",
"dev": true,
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
"@swc/counter": "^0.1.3",
- "@swc/types": "^0.1.21"
+ "@swc/types": "^0.1.24"
},
"engines": {
"node": ">=10"
@@ -3080,16 +3300,16 @@
"url": "https://opencollective.com/swc"
},
"optionalDependencies": {
- "@swc/core-darwin-arm64": "1.11.24",
- "@swc/core-darwin-x64": "1.11.24",
- "@swc/core-linux-arm-gnueabihf": "1.11.24",
- "@swc/core-linux-arm64-gnu": "1.11.24",
- "@swc/core-linux-arm64-musl": "1.11.24",
- "@swc/core-linux-x64-gnu": "1.11.24",
- "@swc/core-linux-x64-musl": "1.11.24",
- "@swc/core-win32-arm64-msvc": "1.11.24",
- "@swc/core-win32-ia32-msvc": "1.11.24",
- "@swc/core-win32-x64-msvc": "1.11.24"
+ "@swc/core-darwin-arm64": "1.13.5",
+ "@swc/core-darwin-x64": "1.13.5",
+ "@swc/core-linux-arm-gnueabihf": "1.13.5",
+ "@swc/core-linux-arm64-gnu": "1.13.5",
+ "@swc/core-linux-arm64-musl": "1.13.5",
+ "@swc/core-linux-x64-gnu": "1.13.5",
+ "@swc/core-linux-x64-musl": "1.13.5",
+ "@swc/core-win32-arm64-msvc": "1.13.5",
+ "@swc/core-win32-ia32-msvc": "1.13.5",
+ "@swc/core-win32-x64-msvc": "1.13.5"
},
"peerDependencies": {
"@swc/helpers": ">=0.5.17"
@@ -3101,9 +3321,9 @@
}
},
"node_modules/@swc/core-darwin-arm64": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.11.24.tgz",
- "integrity": "sha512-dhtVj0PC1APOF4fl5qT2neGjRLgHAAYfiVP8poJelhzhB/318bO+QCFWAiimcDoyMgpCXOhTp757gnoJJrheWA==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.13.5.tgz",
+ "integrity": "sha512-lKNv7SujeXvKn16gvQqUQI5DdyY8v7xcoO3k06/FJbHJS90zEwZdQiMNRiqpYw/orU543tPaWgz7cIYWhbopiQ==",
"cpu": [
"arm64"
],
@@ -3118,9 +3338,9 @@
}
},
"node_modules/@swc/core-darwin-x64": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.11.24.tgz",
- "integrity": "sha512-H/3cPs8uxcj2Fe3SoLlofN5JG6Ny5bl8DuZ6Yc2wr7gQFBmyBkbZEz+sPVgsID7IXuz7vTP95kMm1VL74SO5AQ==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.13.5.tgz",
+ "integrity": "sha512-ILd38Fg/w23vHb0yVjlWvQBoE37ZJTdlLHa8LRCFDdX4WKfnVBiblsCU9ar4QTMNdeTBEX9iUF4IrbNWhaF1Ng==",
"cpu": [
"x64"
],
@@ -3135,9 +3355,9 @@
}
},
"node_modules/@swc/core-linux-arm-gnueabihf": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.11.24.tgz",
- "integrity": "sha512-PHJgWEpCsLo/NGj+A2lXZ2mgGjsr96ULNW3+T3Bj2KTc8XtMUkE8tmY2Da20ItZOvPNC/69KroU7edyo1Flfbw==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.13.5.tgz",
+ "integrity": "sha512-Q6eS3Pt8GLkXxqz9TAw+AUk9HpVJt8Uzm54MvPsqp2yuGmY0/sNaPPNVqctCX9fu/Nu8eaWUen0si6iEiCsazQ==",
"cpu": [
"arm"
],
@@ -3152,9 +3372,9 @@
}
},
"node_modules/@swc/core-linux-arm64-gnu": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.11.24.tgz",
- "integrity": "sha512-C2FJb08+n5SD4CYWCTZx1uR88BN41ZieoHvI8A55hfVf2woT8+6ZiBzt74qW2g+ntZ535Jts5VwXAKdu41HpBg==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.13.5.tgz",
+ "integrity": "sha512-aNDfeN+9af+y+M2MYfxCzCy/VDq7Z5YIbMqRI739o8Ganz6ST+27kjQFd8Y/57JN/hcnUEa9xqdS3XY7WaVtSw==",
"cpu": [
"arm64"
],
@@ -3169,9 +3389,9 @@
}
},
"node_modules/@swc/core-linux-arm64-musl": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.11.24.tgz",
- "integrity": "sha512-ypXLIdszRo0re7PNNaXN0+2lD454G8l9LPK/rbfRXnhLWDBPURxzKlLlU/YGd2zP98wPcVooMmegRSNOKfvErw==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.13.5.tgz",
+ "integrity": "sha512-9+ZxFN5GJag4CnYnq6apKTnnezpfJhCumyz0504/JbHLo+Ue+ZtJnf3RhyA9W9TINtLE0bC4hKpWi8ZKoETyOQ==",
"cpu": [
"arm64"
],
@@ -3186,9 +3406,9 @@
}
},
"node_modules/@swc/core-linux-x64-gnu": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.11.24.tgz",
- "integrity": "sha512-IM7d+STVZD48zxcgo69L0yYptfhaaE9cMZ+9OoMxirNafhKKXwoZuufol1+alEFKc+Wbwp+aUPe/DeWC/Lh3dg==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.13.5.tgz",
+ "integrity": "sha512-WD530qvHrki8Ywt/PloKUjaRKgstQqNGvmZl54g06kA+hqtSE2FTG9gngXr3UJxYu/cNAjJYiBifm7+w4nbHbA==",
"cpu": [
"x64"
],
@@ -3203,9 +3423,9 @@
}
},
"node_modules/@swc/core-linux-x64-musl": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.11.24.tgz",
- "integrity": "sha512-DZByJaMVzSfjQKKQn3cqSeqwy6lpMaQDQQ4HPlch9FWtDx/dLcpdIhxssqZXcR2rhaQVIaRQsCqwV6orSDGAGw==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.13.5.tgz",
+ "integrity": "sha512-Luj8y4OFYx4DHNQTWjdIuKTq2f5k6uSXICqx+FSabnXptaOBAbJHNbHT/06JZh6NRUouaf0mYXN0mcsqvkhd7Q==",
"cpu": [
"x64"
],
@@ -3220,9 +3440,9 @@
}
},
"node_modules/@swc/core-win32-arm64-msvc": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.11.24.tgz",
- "integrity": "sha512-Q64Ytn23y9aVDKN5iryFi8mRgyHw3/kyjTjT4qFCa8AEb5sGUuSj//AUZ6c0J7hQKMHlg9do5Etvoe61V98/JQ==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.13.5.tgz",
+ "integrity": "sha512-cZ6UpumhF9SDJvv4DA2fo9WIzlNFuKSkZpZmPG1c+4PFSEMy5DFOjBSllCvnqihCabzXzpn6ykCwBmHpy31vQw==",
"cpu": [
"arm64"
],
@@ -3237,9 +3457,9 @@
}
},
"node_modules/@swc/core-win32-ia32-msvc": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.11.24.tgz",
- "integrity": "sha512-9pKLIisE/Hh2vJhGIPvSoTK4uBSPxNVyXHmOrtdDot4E1FUUI74Vi8tFdlwNbaj8/vusVnb8xPXsxF1uB0VgiQ==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.13.5.tgz",
+ "integrity": "sha512-C5Yi/xIikrFUzZcyGj9L3RpKljFvKiDMtyDzPKzlsDrKIw2EYY+bF88gB6oGY5RGmv4DAX8dbnpRAqgFD0FMEw==",
"cpu": [
"ia32"
],
@@ -3254,9 +3474,9 @@
}
},
"node_modules/@swc/core-win32-x64-msvc": {
- "version": "1.11.24",
- "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.11.24.tgz",
- "integrity": "sha512-sybnXtOsdB+XvzVFlBVGgRHLqp3yRpHK7CrmpuDKszhj/QhmsaZzY/GHSeALlMtLup13M0gqbcQvsTNlAHTg3w==",
+ "version": "1.13.5",
+ "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.13.5.tgz",
+ "integrity": "sha512-YrKdMVxbYmlfybCSbRtrilc6UA8GF5aPmGKBdPvjrarvsmf4i7ZHGCEnLtfOMd3Lwbs2WUZq3WdMbozYeLU93Q==",
"cpu": [
"x64"
],
@@ -3278,9 +3498,9 @@
"license": "Apache-2.0"
},
"node_modules/@swc/types": {
- "version": "0.1.21",
- "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.21.tgz",
- "integrity": "sha512-2YEtj5HJVbKivud9N4bpPBAyZhj4S2Ipe5LkUG94alTpr7in/GU/EARgPAd3BwU+YOmFVJC2+kjqhGRi3r0ZpQ==",
+ "version": "0.1.25",
+ "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.25.tgz",
+ "integrity": "sha512-iAoY/qRhNH8a/hBvm3zKj9qQ4oc2+3w1unPJa2XvTK3XjeLXtzcCingVPw/9e5mn1+0yPqxcBGp9Jf0pkfMb1g==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -3288,15 +3508,12 @@
}
},
"node_modules/@tailwindcss/typography": {
- "version": "0.5.16",
- "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.16.tgz",
- "integrity": "sha512-0wDLwCVF5V3x3b1SGXPCDcdsbDHMBe+lkFzBRaHeLvNi+nrrnZ1lA18u+OTWO8iSWU2GxUOCvlXtDuqftc1oiA==",
+ "version": "0.5.19",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.5.19.tgz",
+ "integrity": "sha512-w31dd8HOx3k9vPtcQh5QHP9GwKcgbMp87j58qi6xgiBnFFtKEAgCWnDw4qUT8aHwkCp8bKvb/KGKWWHedP0AAg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "lodash.castarray": "^4.4.0",
- "lodash.isplainobject": "^4.0.6",
- "lodash.merge": "^4.6.2",
"postcss-selector-parser": "6.0.10"
},
"peerDependencies": {
@@ -3304,9 +3521,9 @@
}
},
"node_modules/@tanstack/query-core": {
- "version": "5.75.0",
- "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.75.0.tgz",
- "integrity": "sha512-rk8KQuCdhoRkzjRVF3QxLgAfFUyS0k7+GCQjlGEpEGco+qazJ0eMH6aO1DjDjibH7/ik383nnztua3BG+lOnwg==",
+ "version": "5.90.5",
+ "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.90.5.tgz",
+ "integrity": "sha512-wLamYp7FaDq6ZnNehypKI5fNvxHPfTYylE0m/ZpuuzJfJqhR5Pxg9gvGBHZx4n7J+V5Rg5mZxHHTlv25Zt5u+w==",
"license": "MIT",
"funding": {
"type": "github",
@@ -3314,12 +3531,12 @@
}
},
"node_modules/@tanstack/react-query": {
- "version": "5.75.1",
- "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.75.1.tgz",
- "integrity": "sha512-tN+gG+eXCHYm+VpmdXUP1rfE9LUrRzgYozTkBZtJV1/WFM3vwWNKQC8G6b2RKcs+2cPg+hdToZHZfjL3bF4yIQ==",
+ "version": "5.90.5",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.90.5.tgz",
+ "integrity": "sha512-pN+8UWpxZkEJ/Rnnj2v2Sxpx1WFlaa9L6a4UO89p6tTQbeo+m0MS8oYDjbggrR8QcTyjKoYWKS3xJQGr3ExT8Q==",
"license": "MIT",
"dependencies": {
- "@tanstack/query-core": "5.75.0"
+ "@tanstack/query-core": "5.90.5"
},
"funding": {
"type": "github",
@@ -3330,39 +3547,54 @@
}
},
"node_modules/@testing-library/dom": {
- "version": "10.4.0",
- "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz",
- "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==",
+ "version": "10.4.1",
+ "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.1.tgz",
+ "integrity": "sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"@babel/code-frame": "^7.10.4",
"@babel/runtime": "^7.12.5",
"@types/aria-query": "^5.0.1",
"aria-query": "5.3.0",
- "chalk": "^4.1.0",
"dom-accessibility-api": "^0.5.9",
"lz-string": "^1.5.0",
+ "picocolors": "1.1.1",
"pretty-format": "^27.0.2"
},
"engines": {
"node": ">=18"
}
},
+ "node_modules/@testing-library/dom/node_modules/aria-query": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
+ "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "dequal": "^2.0.3"
+ }
+ },
+ "node_modules/@testing-library/dom/node_modules/dom-accessibility-api": {
+ "version": "0.5.16",
+ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
+ "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@testing-library/jest-dom": {
- "version": "6.6.3",
- "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.6.3.tgz",
- "integrity": "sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA==",
+ "version": "6.9.1",
+ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz",
+ "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@adobe/css-tools": "^4.4.0",
"aria-query": "^5.0.0",
- "chalk": "^3.0.0",
"css.escape": "^1.5.1",
"dom-accessibility-api": "^0.6.3",
- "lodash": "^4.17.21",
+ "picocolors": "^1.1.1",
"redent": "^3.0.0"
},
"engines": {
@@ -3371,27 +3603,6 @@
"yarn": ">=1"
}
},
- "node_modules/@testing-library/jest-dom/node_modules/chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz",
- "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/@testing-library/react": {
"version": "16.3.0",
"resolved": "https://registry.npmjs.org/@testing-library/react/-/react-16.3.0.tgz",
@@ -3425,13 +3636,23 @@
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
"integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==",
"dev": true,
+ "license": "MIT"
+ },
+ "node_modules/@types/chai": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz",
+ "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==",
+ "dev": true,
"license": "MIT",
- "peer": true
+ "dependencies": {
+ "@types/deep-eql": "*",
+ "assertion-error": "^2.0.1"
+ }
},
"node_modules/@types/d3-array": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.1.tgz",
- "integrity": "sha512-Y2Jn2idRrLzUfAKV2LyRImR+y4oa2AntrgID95SHJxuMUrkNXmanDSed71sRNZysveJVt1hLLemQZIady0FpEg==",
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz",
+ "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==",
"license": "MIT"
},
"node_modules/@types/d3-color": {
@@ -3491,10 +3712,17 @@
"integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==",
"license": "MIT"
},
+ "node_modules/@types/deep-eql": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz",
+ "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@types/estree": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
- "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
+ "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
"license": "MIT"
},
"node_modules/@types/json-schema": {
@@ -3505,19 +3733,18 @@
"license": "MIT"
},
"node_modules/@types/node": {
- "version": "22.15.3",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz",
- "integrity": "sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw==",
- "dev": true,
+ "version": "22.18.11",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.18.11.tgz",
+ "integrity": "sha512-Gd33J2XIrXurb+eT2ktze3rJAfAp9ZNjlBdh4SVgyrKEOADwCbdUDaK7QgJno8Ue4kcajscsKqu6n8OBG3hhCQ==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.21.0"
}
},
"node_modules/@types/prop-types": {
- "version": "15.7.14",
- "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.14.tgz",
- "integrity": "sha512-gNMvNH49DJ7OJYv+KAKn0Xp45p8PLl6zo2YnvDIbTd4J6MER2BmWN49TG7n9LvkyihINxeKW8+3bfS2yDC9dzQ==",
+ "version": "15.7.15",
+ "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
+ "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",
"devOptional": true,
"license": "MIT"
},
@@ -3531,10 +3758,20 @@
"@types/node": "*"
}
},
+ "node_modules/@types/randombytes": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/@types/randombytes/-/randombytes-2.0.3.tgz",
+ "integrity": "sha512-+NRgihTfuURllWCiIAhm1wsJqzsocnqXM77V/CalsdJIYSRGEHMnritxh+6EsBklshC+clo1KgnN14qgSGeQdw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/react": {
- "version": "18.3.20",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.20.tgz",
- "integrity": "sha512-IPaCZN7PShZK/3t6Q87pfTkRm6oLTd4vztyoj+cbHUF1g3FfVb2tFIL79uCRKEfv16AhqDMBywP2VW3KIZUvcg==",
+ "version": "18.3.26",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.26.tgz",
+ "integrity": "sha512-RFA/bURkcKzx/X9oumPG9Vp3D3JUgus/d0b67KB0t5S/raciymilkOa66olh78MUI92QLbEJevO7rvqU/kjwKA==",
"devOptional": true,
"license": "MIT",
"dependencies": {
@@ -3553,21 +3790,21 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.31.1.tgz",
- "integrity": "sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==",
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.2.tgz",
+ "integrity": "sha512-ZGBMToy857/NIPaaCucIUQgqueOiq7HeAKkhlvqVV4lm089zUFW6ikRySx2v+cAhKeUCPuWVHeimyk6Dw1iY3w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
- "@typescript-eslint/scope-manager": "8.31.1",
- "@typescript-eslint/type-utils": "8.31.1",
- "@typescript-eslint/utils": "8.31.1",
- "@typescript-eslint/visitor-keys": "8.31.1",
+ "@typescript-eslint/scope-manager": "8.46.2",
+ "@typescript-eslint/type-utils": "8.46.2",
+ "@typescript-eslint/utils": "8.46.2",
+ "@typescript-eslint/visitor-keys": "8.46.2",
"graphemer": "^1.4.0",
- "ignore": "^5.3.1",
+ "ignore": "^7.0.0",
"natural-compare": "^1.4.0",
- "ts-api-utils": "^2.0.1"
+ "ts-api-utils": "^2.1.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3577,22 +3814,32 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0",
+ "@typescript-eslint/parser": "^8.46.2",
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <5.9.0"
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
+ "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">= 4"
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.31.1.tgz",
- "integrity": "sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==",
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.2.tgz",
+ "integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/scope-manager": "8.31.1",
- "@typescript-eslint/types": "8.31.1",
- "@typescript-eslint/typescript-estree": "8.31.1",
- "@typescript-eslint/visitor-keys": "8.31.1",
+ "@typescript-eslint/scope-manager": "8.46.2",
+ "@typescript-eslint/types": "8.46.2",
+ "@typescript-eslint/typescript-estree": "8.46.2",
+ "@typescript-eslint/visitor-keys": "8.46.2",
"debug": "^4.3.4"
},
"engines": {
@@ -3604,18 +3851,40 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <5.9.0"
+ "typescript": ">=4.8.4 <6.0.0"
}
},
- "node_modules/@typescript-eslint/scope-manager": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.31.1.tgz",
- "integrity": "sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==",
+ "node_modules/@typescript-eslint/project-service": {
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.2.tgz",
+ "integrity": "sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.31.1",
- "@typescript-eslint/visitor-keys": "8.31.1"
+ "@typescript-eslint/tsconfig-utils": "^8.46.2",
+ "@typescript-eslint/types": "^8.46.2",
+ "debug": "^4.3.4"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
+ "node_modules/@typescript-eslint/scope-manager": {
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz",
+ "integrity": "sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@typescript-eslint/types": "8.46.2",
+ "@typescript-eslint/visitor-keys": "8.46.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3625,17 +3894,35 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
+ "node_modules/@typescript-eslint/tsconfig-utils": {
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz",
+ "integrity": "sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/typescript-eslint"
+ },
+ "peerDependencies": {
+ "typescript": ">=4.8.4 <6.0.0"
+ }
+ },
"node_modules/@typescript-eslint/type-utils": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.31.1.tgz",
- "integrity": "sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==",
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.2.tgz",
+ "integrity": "sha512-HbPM4LbaAAt/DjxXaG9yiS9brOOz6fabal4uvUmaUYe6l3K1phQDMQKBRUrr06BQkxkvIZVVHttqiybM9nJsLA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/typescript-estree": "8.31.1",
- "@typescript-eslint/utils": "8.31.1",
+ "@typescript-eslint/types": "8.46.2",
+ "@typescript-eslint/typescript-estree": "8.46.2",
+ "@typescript-eslint/utils": "8.46.2",
"debug": "^4.3.4",
- "ts-api-utils": "^2.0.1"
+ "ts-api-utils": "^2.1.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3646,13 +3933,13 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <5.9.0"
+ "typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/@typescript-eslint/types": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.31.1.tgz",
- "integrity": "sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==",
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.2.tgz",
+ "integrity": "sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3664,20 +3951,22 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.31.1.tgz",
- "integrity": "sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==",
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz",
+ "integrity": "sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.31.1",
- "@typescript-eslint/visitor-keys": "8.31.1",
+ "@typescript-eslint/project-service": "8.46.2",
+ "@typescript-eslint/tsconfig-utils": "8.46.2",
+ "@typescript-eslint/types": "8.46.2",
+ "@typescript-eslint/visitor-keys": "8.46.2",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
"minimatch": "^9.0.4",
"semver": "^7.6.0",
- "ts-api-utils": "^2.0.1"
+ "ts-api-utils": "^2.1.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3687,7 +3976,7 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "typescript": ">=4.8.4 <5.9.0"
+ "typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {
@@ -3717,16 +4006,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.31.1.tgz",
- "integrity": "sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==",
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.2.tgz",
+ "integrity": "sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@eslint-community/eslint-utils": "^4.4.0",
- "@typescript-eslint/scope-manager": "8.31.1",
- "@typescript-eslint/types": "8.31.1",
- "@typescript-eslint/typescript-estree": "8.31.1"
+ "@eslint-community/eslint-utils": "^4.7.0",
+ "@typescript-eslint/scope-manager": "8.46.2",
+ "@typescript-eslint/types": "8.46.2",
+ "@typescript-eslint/typescript-estree": "8.46.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3737,18 +4026,18 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <5.9.0"
+ "typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.31.1.tgz",
- "integrity": "sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==",
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz",
+ "integrity": "sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.31.1",
- "eslint-visitor-keys": "^4.2.0"
+ "@typescript-eslint/types": "8.46.2",
+ "eslint-visitor-keys": "^4.2.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3759,60 +4048,62 @@
}
},
"node_modules/@unhead/addons": {
- "version": "2.0.10",
- "resolved": "https://registry.npmjs.org/@unhead/addons/-/addons-2.0.10.tgz",
- "integrity": "sha512-9+w/m+X5e7CDKXKGTym1N4MpBjrRC89cfl95RDgKwBcFJfQ3pZu50llIjx/j462VqtrNMXddBKcUnfWvQyapuw==",
+ "version": "2.0.19",
+ "resolved": "https://registry.npmjs.org/@unhead/addons/-/addons-2.0.19.tgz",
+ "integrity": "sha512-GkyyScEvar+8LTJqQPJ0QBZC1b7Frj8zMu+SJmyd5WuD6Wv9byhM+hLGfDNQpQ9G9HfT7ZnBKZs88e5BMnovuw==",
"license": "MIT",
"dependencies": {
- "@rollup/pluginutils": "^5.1.4",
+ "@rollup/pluginutils": "^5.3.0",
"estree-walker": "^3.0.3",
- "magic-string": "^0.30.17",
- "mlly": "^1.7.4",
+ "magic-string": "^0.30.19",
+ "mlly": "^1.8.0",
"ufo": "^1.6.1",
- "unplugin": "^2.3.4",
- "unplugin-ast": "^0.15.0"
+ "unplugin": "^2.3.10",
+ "unplugin-ast": "^0.15.3"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
}
},
"node_modules/@unhead/react": {
- "version": "2.0.10",
- "resolved": "https://registry.npmjs.org/@unhead/react/-/react-2.0.10.tgz",
- "integrity": "sha512-U5tqhUYk4qmyLD8YpKOuYwWmbIGFpB7aacOzcGAhjJ59GH3W/BSFOFHj/6dcoYV5yzr1CZrINGGH7stRVMMLjQ==",
+ "version": "2.0.19",
+ "resolved": "https://registry.npmjs.org/@unhead/react/-/react-2.0.19.tgz",
+ "integrity": "sha512-pW00tkOneGGTEJp5UeVkVWmti4VecLj0rIje5AqcBs0AoglSxc18LGGKi9Exd098++GzVouhkGo1Ch02YnZS7g==",
"license": "MIT",
"dependencies": {
- "unhead": "2.0.10"
+ "unhead": "2.0.19"
},
"funding": {
"url": "https://github.com/sponsors/harlan-zw"
},
"peerDependencies": {
- "react": ">=18"
+ "react": ">=18.3.1"
}
},
"node_modules/@vitejs/plugin-react-swc": {
- "version": "3.9.0",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.9.0.tgz",
- "integrity": "sha512-jYFUSXhwMCYsh/aQTgSGLIN3Foz5wMbH9ahb0Zva//UzwZYbMiZd7oT3AU9jHT9DLswYDswsRwPU9jVF3yA48Q==",
+ "version": "3.11.0",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react-swc/-/plugin-react-swc-3.11.0.tgz",
+ "integrity": "sha512-YTJCGFdNMHCMfjODYtxRNVAYmTWQ1Lb8PulP/2/f/oEEtglw8oKxKIZmmRkyXrVrHfsKOaVkAc3NT9/dMutO5w==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@swc/core": "^1.11.21"
+ "@rolldown/pluginutils": "1.0.0-beta.27",
+ "@swc/core": "^1.12.11"
},
"peerDependencies": {
- "vite": "^4 || ^5 || ^6"
+ "vite": "^4 || ^5 || ^6 || ^7"
}
},
"node_modules/@vitest/expect": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.1.4.tgz",
- "integrity": "sha512-xkD/ljeliyaClDYqHPNCiJ0plY5YIcM0OlRiZizLhlPmpXWpxnGMyTZXOHFhFeG7w9P5PBeL4IdtJ/HeQwTbQA==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.4.tgz",
+ "integrity": "sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/spy": "3.1.4",
- "@vitest/utils": "3.1.4",
+ "@types/chai": "^5.2.2",
+ "@vitest/spy": "3.2.4",
+ "@vitest/utils": "3.2.4",
"chai": "^5.2.0",
"tinyrainbow": "^2.0.0"
},
@@ -3821,13 +4112,13 @@
}
},
"node_modules/@vitest/mocker": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.1.4.tgz",
- "integrity": "sha512-8IJ3CvwtSw/EFXqWFL8aCMu+YyYXG2WUSrQbViOZkWTKTVicVwZ/YiEZDSqD00kX+v/+W+OnxhNWoeVKorHygA==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.4.tgz",
+ "integrity": "sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/spy": "3.1.4",
+ "@vitest/spy": "3.2.4",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.17"
},
@@ -3836,7 +4127,7 @@
},
"peerDependencies": {
"msw": "^2.4.9",
- "vite": "^5.0.0 || ^6.0.0"
+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0"
},
"peerDependenciesMeta": {
"msw": {
@@ -3848,9 +4139,9 @@
}
},
"node_modules/@vitest/pretty-format": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.1.4.tgz",
- "integrity": "sha512-cqv9H9GvAEoTaoq+cYqUTCGscUjKqlJZC7PRwY5FMySVj5J+xOm1KQcCiYHJOEzOKRUhLH4R2pTwvFlWCEScsg==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.4.tgz",
+ "integrity": "sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -3861,27 +4152,28 @@
}
},
"node_modules/@vitest/runner": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.1.4.tgz",
- "integrity": "sha512-djTeF1/vt985I/wpKVFBMWUlk/I7mb5hmD5oP8K9ACRmVXgKTae3TUOtXAEBfslNKPzUQvnKhNd34nnRSYgLNQ==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.4.tgz",
+ "integrity": "sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/utils": "3.1.4",
- "pathe": "^2.0.3"
+ "@vitest/utils": "3.2.4",
+ "pathe": "^2.0.3",
+ "strip-literal": "^3.0.0"
},
"funding": {
"url": "https://opencollective.com/vitest"
}
},
"node_modules/@vitest/snapshot": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.1.4.tgz",
- "integrity": "sha512-JPHf68DvuO7vilmvwdPr9TS0SuuIzHvxeaCkxYcCD4jTk67XwL45ZhEHFKIuCm8CYstgI6LZ4XbwD6ANrwMpFg==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.4.tgz",
+ "integrity": "sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "3.1.4",
+ "@vitest/pretty-format": "3.2.4",
"magic-string": "^0.30.17",
"pathe": "^2.0.3"
},
@@ -3890,33 +4182,45 @@
}
},
"node_modules/@vitest/spy": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.1.4.tgz",
- "integrity": "sha512-Xg1bXhu+vtPXIodYN369M86K8shGLouNjoVI78g8iAq2rFoHFdajNvJJ5A/9bPMFcfQqdaCpOgWKEoMQg/s0Yg==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.4.tgz",
+ "integrity": "sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "tinyspy": "^3.0.2"
+ "tinyspy": "^4.0.3"
},
"funding": {
"url": "https://opencollective.com/vitest"
}
},
"node_modules/@vitest/utils": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.1.4.tgz",
- "integrity": "sha512-yriMuO1cfFhmiGc8ataN51+9ooHRuURdfAZfwFd3usWynjzpLslZdYnRegTv32qdgtJTsj15FoeZe2g15fY1gg==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.4.tgz",
+ "integrity": "sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "3.1.4",
- "loupe": "^3.1.3",
+ "@vitest/pretty-format": "3.2.4",
+ "loupe": "^3.1.4",
"tinyrainbow": "^2.0.0"
},
"funding": {
"url": "https://opencollective.com/vitest"
}
},
+ "node_modules/@vulpemventures/secp256k1-zkp": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/@vulpemventures/secp256k1-zkp/-/secp256k1-zkp-3.2.1.tgz",
+ "integrity": "sha512-2U4nuNbXuUgMmxhuoILbRMoD2DE7KND3udk5cYilIS1MHvMtje9ywUm/zsI0g7d7x8g2A57xri+wvqCC/fCnJg==",
+ "license": "MIT",
+ "dependencies": {
+ "long": "^5.2.3"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/@webbtc/webln-types": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@webbtc/webln-types/-/webln-types-3.0.0.tgz",
@@ -3951,9 +4255,9 @@
}
},
"node_modules/agent-base": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
- "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
+ "version": "7.1.4",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
+ "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3978,9 +4282,9 @@
}
},
"node_modules/ansi-regex": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
- "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
+ "version": "6.2.2",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
"license": "MIT",
"engines": {
"node": ">=12"
@@ -4023,6 +4327,18 @@
"node": ">= 8"
}
},
+ "node_modules/anymatch/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
"node_modules/arg": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
@@ -4037,9 +4353,9 @@
"license": "Python-2.0"
},
"node_modules/aria-hidden": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.4.tgz",
- "integrity": "sha512-y+CcFFwelSXpLZk/7fMB2mUbGtX9lKycf1MWJ7CaTIERyitVlyQx6C+sxcROU2BAJ24OiZyK+8wj2i8AlBoS3A==",
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz",
+ "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==",
"license": "MIT",
"dependencies": {
"tslib": "^2.0.0"
@@ -4049,13 +4365,13 @@
}
},
"node_modules/aria-query": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz",
- "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.2.tgz",
+ "integrity": "sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==",
"dev": true,
"license": "Apache-2.0",
- "dependencies": {
- "dequal": "^2.0.3"
+ "engines": {
+ "node": ">= 0.4"
}
},
"node_modules/assertion-error": {
@@ -4069,16 +4385,16 @@
}
},
"node_modules/ast-kit": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/ast-kit/-/ast-kit-2.1.0.tgz",
- "integrity": "sha512-ROM2LlXbZBZVk97crfw8PGDOBzzsJvN2uJCmwswvPUNyfH14eg90mSN3xNqsri1JS1G9cz0VzeDUhxJkTrr4Ew==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/ast-kit/-/ast-kit-2.1.3.tgz",
+ "integrity": "sha512-TH+b3Lv6pUjy/Nu0m6A2JULtdzLpmqF9x1Dhj00ZoEiML8qvVA9j1flkzTKNYgdEhWrjDwtWNpyyCUbfQe514g==",
"license": "MIT",
"dependencies": {
- "@babel/parser": "^7.27.3",
+ "@babel/parser": "^7.28.4",
"pathe": "^2.0.3"
},
"engines": {
- "node": ">=20.18.0"
+ "node": ">=20.19.0"
},
"funding": {
"url": "https://github.com/sponsors/sxzz"
@@ -4122,12 +4438,33 @@
"postcss": "^8.1.0"
}
},
+ "node_modules/available-typed-arrays": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz",
+ "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==",
+ "license": "MIT",
+ "dependencies": {
+ "possible-typed-array-names": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
"license": "MIT"
},
+ "node_modules/base-x": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-5.0.1.tgz",
+ "integrity": "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg==",
+ "license": "MIT"
+ },
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
@@ -4148,6 +4485,22 @@
],
"license": "MIT"
},
+ "node_modules/baseline-browser-mapping": {
+ "version": "2.8.18",
+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.18.tgz",
+ "integrity": "sha512-UYmTpOBwgPScZpS4A+YbapwWuBwasxvO/2IOHArSsAhL/+ZdmATBXTex3t+l2hXwLVYK382ibr/nKoY9GKe86w==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "bin": {
+ "baseline-browser-mapping": "dist/cli.js"
+ }
+ },
+ "node_modules/bech32": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz",
+ "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==",
+ "license": "MIT"
+ },
"node_modules/binary-extensions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
@@ -4160,6 +4513,248 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/bip174": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/bip174/-/bip174-3.0.0.tgz",
+ "integrity": "sha512-N3vz3rqikLEu0d6yQL8GTrSkpYb35NQKWMR7Hlza0lOj6ZOlvQ3Xr7N9Y+JPebaCVoEUHdBeBSuLxcHr71r+Lw==",
+ "license": "MIT",
+ "dependencies": {
+ "uint8array-tools": "^0.0.9",
+ "varuint-bitcoin": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/bip174-liquid": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/bip174-liquid/-/bip174-liquid-1.0.3.tgz",
+ "integrity": "sha512-e69sC0Cq2tBJuhG2+wieXv40DN13YBR/wbIjZp4Mqwpar5vQm8Ldqijdd6N33XG7LtfvQi/zKm5fSzdPY/9mgw==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/bip32": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/bip32/-/bip32-4.0.0.tgz",
+ "integrity": "sha512-aOGy88DDlVUhspIXJN+dVEtclhIsfAUppD43V0j40cPTld3pv/0X/MlrZSZ6jowIaQQzFwP8M6rFU2z2mVYjDQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "^1.2.0",
+ "@scure/base": "^1.1.1",
+ "typeforce": "^1.11.5",
+ "wif": "^2.0.6"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/bip32/node_modules/@scure/base": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz",
+ "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/bip32/node_modules/base-x": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz",
+ "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/bip32/node_modules/bs58": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
+ "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
+ "license": "MIT",
+ "dependencies": {
+ "base-x": "^3.0.2"
+ }
+ },
+ "node_modules/bip32/node_modules/bs58check": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz",
+ "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==",
+ "license": "MIT",
+ "dependencies": {
+ "bs58": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "node_modules/bip32/node_modules/wif": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
+ "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==",
+ "license": "MIT",
+ "dependencies": {
+ "bs58check": "<3.0.0"
+ }
+ },
+ "node_modules/bip65": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/bip65/-/bip65-1.0.3.tgz",
+ "integrity": "sha512-RQ1nc7xtnLa5XltnCqkoR2zmhuz498RjMJwrLKQzOE049D1HUqnYfon7cVSbwS5UGm0/EQlC2CH+NY3MyITA4Q==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=4.5.0"
+ }
+ },
+ "node_modules/bip66": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/bip66/-/bip66-2.0.0.tgz",
+ "integrity": "sha512-kBG+hSpgvZBrkIm9dt5T1Hd/7xGCPEX2npoxAWZfsK1FvjgaxySEh2WizjyIstWXriKo9K9uJ4u0OnsyLDUPXQ==",
+ "license": "MIT"
+ },
+ "node_modules/bitcoinjs-lib": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-7.0.0.tgz",
+ "integrity": "sha512-2W6dGXFd1KG3Bs90Bzb5+ViCeSKNIYkCUWZ4cvUzUgwnneiNNZ6Sk8twGNcjlesmxC0JyLc/958QycfpvXLg7A==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "^1.2.0",
+ "bech32": "^2.0.0",
+ "bip174": "^3.0.0",
+ "bs58check": "^4.0.0",
+ "uint8array-tools": "^0.0.9",
+ "valibot": "^0.38.0",
+ "varuint-bitcoin": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/bitset": {
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/bitset/-/bitset-5.2.3.tgz",
+ "integrity": "sha512-uZ7++Z60MC9cZ+7YzQ1v9yPDydcjhmcMjGx2yoGTjjSXBoVMmTr2LCRbkpI19S9P/C75hhP7Bsakj+gVzVUDbQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/rawify"
+ }
+ },
+ "node_modules/blech32": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/blech32/-/blech32-1.1.2.tgz",
+ "integrity": "sha512-C5qxzoF9KyX88X8Zz18cZ6BOeL0n5/Eg/cDot1frntkArRMwg1djNim5wA6QFWwu0lJ1LN8iiRMN4Lp2kZzdfA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "long": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/blech32/node_modules/long": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+ "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
+ "license": "Apache-2.0",
+ "peer": true
+ },
+ "node_modules/bn.js": {
+ "version": "5.2.2",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.2.tgz",
+ "integrity": "sha512-v2YAxEmKaBLahNwE1mjp4WON6huMNeuDvagFZW+ASCuA/ku0bXR9hSMw0XpiqMoA3+rmnyck/tPRSFQkoC9Cuw==",
+ "license": "MIT"
+ },
+ "node_modules/boltz-core": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/boltz-core/-/boltz-core-3.0.0.tgz",
+ "integrity": "sha512-L0jzUnTIb/vir9k6yVlCkV8I29ZeBK7LWq3rrDcp/KP7bB0VvKR5JTceua8g2KBCBM5HOMVDEuPW3c9/82/Nmg==",
+ "license": "AGPL-3.0",
+ "dependencies": {
+ "@boltz/bitcoin-ops": "^2.0.0",
+ "@openzeppelin/contracts": "^5.2.0",
+ "@vulpemventures/secp256k1-zkp": "^3.2.1",
+ "bip32": "^4.0.0",
+ "bip65": "^1.0.3",
+ "bip66": "^2.0.0",
+ "bitcoinjs-lib": "^6.1.7",
+ "bn.js": "^5.2.1",
+ "ecpair": "^3.0.0",
+ "varuint-bitcoin": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=20"
+ },
+ "peerDependencies": {
+ "liquidjs-lib": "^6.0.2-liquid.37"
+ }
+ },
+ "node_modules/boltz-core/node_modules/base-x": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.1.tgz",
+ "integrity": "sha512-uAZ8x6r6S3aUM9rbHGVOIsR15U/ZSc82b3ymnCPsT45Gk1DDvhDPdIgB5MrhirZWt+5K0EEPQH985kNqZgNPFw==",
+ "license": "MIT"
+ },
+ "node_modules/boltz-core/node_modules/bip174": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.1.tgz",
+ "integrity": "sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/boltz-core/node_modules/bitcoinjs-lib": {
+ "version": "6.1.7",
+ "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.1.7.tgz",
+ "integrity": "sha512-tlf/r2DGMbF7ky1MgUqXHzypYHakkEnm0SZP23CJKIqNY/5uNAnMbFhMJdhjrL/7anfb/U8+AlpdjPWjPnAalg==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "^1.2.0",
+ "bech32": "^2.0.0",
+ "bip174": "^2.1.1",
+ "bs58check": "^3.0.1",
+ "typeforce": "^1.11.3",
+ "varuint-bitcoin": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/boltz-core/node_modules/bitcoinjs-lib/node_modules/varuint-bitcoin": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz",
+ "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "node_modules/boltz-core/node_modules/bs58": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
+ "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
+ "license": "MIT",
+ "dependencies": {
+ "base-x": "^4.0.0"
+ }
+ },
+ "node_modules/boltz-core/node_modules/bs58check": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz",
+ "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "^1.2.0",
+ "bs58": "^5.0.0"
+ }
+ },
"node_modules/brace-expansion": {
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
@@ -4184,9 +4779,9 @@
}
},
"node_modules/browserslist": {
- "version": "4.24.4",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz",
- "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
+ "version": "4.26.3",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz",
+ "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==",
"dev": true,
"funding": [
{
@@ -4204,10 +4799,11 @@
],
"license": "MIT",
"dependencies": {
- "caniuse-lite": "^1.0.30001688",
- "electron-to-chromium": "^1.5.73",
- "node-releases": "^2.0.19",
- "update-browserslist-db": "^1.1.1"
+ "baseline-browser-mapping": "^2.8.9",
+ "caniuse-lite": "^1.0.30001746",
+ "electron-to-chromium": "^1.5.227",
+ "node-releases": "^2.0.21",
+ "update-browserslist-db": "^1.1.3"
},
"bin": {
"browserslist": "cli.js"
@@ -4216,6 +4812,25 @@
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
+ "node_modules/bs58": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-6.0.0.tgz",
+ "integrity": "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw==",
+ "license": "MIT",
+ "dependencies": {
+ "base-x": "^5.0.0"
+ }
+ },
+ "node_modules/bs58check": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-4.0.0.tgz",
+ "integrity": "sha512-FsGDOnFg9aVI9erdriULkd/JjEWONV/lQE5aYziB5PoBsXRind56lh8doIZIc9X4HoxT5x4bLjMWN1/NB8Zp5g==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "^1.2.0",
+ "bs58": "^6.0.0"
+ }
+ },
"node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
@@ -4250,6 +4865,53 @@
"node": ">=8"
}
},
+ "node_modules/call-bind": {
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz",
+ "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.0",
+ "es-define-property": "^1.0.0",
+ "get-intrinsic": "^1.2.4",
+ "set-function-length": "^1.2.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -4279,9 +4941,9 @@
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001716",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001716.tgz",
- "integrity": "sha512-49/c1+x3Kwz7ZIWt+4DvK3aMJy9oYXXG6/97JKsnjdCk/6n9vVyWL8NAwVt95Lwt9eigI10Hl782kDfZUUlRXw==",
+ "version": "1.0.30001751",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001751.tgz",
+ "integrity": "sha512-A0QJhug0Ly64Ii3eIqHu5X51ebln3k4yTUkY1j8drqpWHVreg/VLijN48cZ1bYPiqOQuqpkIKnzr/Ul8V+p6Cw==",
"dev": true,
"funding": [
{
@@ -4300,9 +4962,9 @@
"license": "CC-BY-4.0"
},
"node_modules/chai": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/chai/-/chai-5.2.0.tgz",
- "integrity": "sha512-mCuXncKXk5iCLhfhwTc0izo0gtEmpz5CtG2y8GiOINBlMVS6v8TMRc5TaLWKS6692m9+dVVfzgeVxR5UxWHTYw==",
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz",
+ "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4313,7 +4975,7 @@
"pathval": "^2.0.0"
},
"engines": {
- "node": ">=12"
+ "node": ">=18"
}
},
"node_modules/chalk": {
@@ -4379,6 +5041,20 @@
"node": ">= 6"
}
},
+ "node_modules/cipher-base": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.7.tgz",
+ "integrity": "sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.4",
+ "safe-buffer": "^5.2.1",
+ "to-buffer": "^1.2.2"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
"node_modules/class-variance-authority": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/class-variance-authority/-/class-variance-authority-0.7.1.tgz",
@@ -4482,6 +5158,29 @@
"react-dom": "^18 || ^19 || ^19.0.0-rc"
}
},
+ "node_modules/coco-cashu-core": {
+ "version": "1.0.0-rc.17",
+ "resolved": "https://registry.npmjs.org/coco-cashu-core/-/coco-cashu-core-1.0.0-rc.17.tgz",
+ "integrity": "sha512-+G3ip1z5PkejhARW4F0djELPNYeUFTKP3shMcCNDLmkK1W3IcGvVlzVf60mbUaM4jl5IidbP9IZkcx7/aaJPYQ==",
+ "dependencies": {
+ "@cashu/cashu-ts": "^2.7.2"
+ },
+ "peerDependencies": {
+ "typescript": "^5"
+ }
+ },
+ "node_modules/coco-cashu-indexeddb": {
+ "version": "1.0.0-rc.17",
+ "resolved": "https://registry.npmjs.org/coco-cashu-indexeddb/-/coco-cashu-indexeddb-1.0.0-rc.17.tgz",
+ "integrity": "sha512-eaKGYMlpdjxn9t40Vynca50VtyPXsPnNg82zjRIMmryf9UC8jJEMccXsVIa3h1BC988KHJwwsz6myAWviu+5jw==",
+ "dependencies": {
+ "dexie": "^4.0.8"
+ },
+ "peerDependencies": {
+ "coco-cashu-core": "1.0.0-rc.17",
+ "typescript": "^5"
+ }
+ },
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -4522,6 +5221,40 @@
"integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==",
"license": "MIT"
},
+ "node_modules/core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
+ "license": "MIT"
+ },
+ "node_modules/create-hash": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+ "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
+ "license": "MIT",
+ "dependencies": {
+ "cipher-base": "^1.0.1",
+ "inherits": "^2.0.1",
+ "md5.js": "^1.3.4",
+ "ripemd160": "^2.0.1",
+ "sha.js": "^2.4.0"
+ }
+ },
+ "node_modules/create-hmac": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+ "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "cipher-base": "^1.0.3",
+ "create-hash": "^1.1.0",
+ "inherits": "^2.0.1",
+ "ripemd160": "^2.0.0",
+ "safe-buffer": "^5.0.1",
+ "sha.js": "^2.4.8"
+ }
+ },
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
@@ -4556,13 +5289,13 @@
}
},
"node_modules/cssstyle": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.3.1.tgz",
- "integrity": "sha512-ZgW+Jgdd7i52AaLYCriF8Mxqft0gD/R9i9wi6RWBhs1pqdPEzPjym7rvRKi397WmQFf3SlyUsszhw+VVCbx79Q==",
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.6.0.tgz",
+ "integrity": "sha512-2z+rWdzbbSZv6/rhtvzvqeZQHrBaqgogqt85sqFNbabZOuFbCVFb8kPeEtZjiKkbrm395irpNKiYeFeLiQnFPg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@asamuzakjp/css-color": "^3.1.2",
+ "@asamuzakjp/css-color": "^3.2.0",
"rrweb-cssom": "^0.8.0"
},
"engines": {
@@ -4721,9 +5454,9 @@
}
},
"node_modules/debug": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
- "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -4748,9 +5481,9 @@
}
},
"node_modules/decimal.js": {
- "version": "10.5.0",
- "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz",
- "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==",
+ "version": "10.6.0",
+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz",
+ "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==",
"dev": true,
"license": "MIT"
},
@@ -4777,6 +5510,23 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/define-data-property": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz",
+ "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==",
+ "license": "MIT",
+ "dependencies": {
+ "es-define-property": "^1.0.0",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/dequal": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
@@ -4793,6 +5543,12 @@
"integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==",
"license": "MIT"
},
+ "node_modules/dexie": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/dexie/-/dexie-4.2.1.tgz",
+ "integrity": "sha512-Ckej0NS6jxQ4Po3OrSQBFddayRhTCic2DoCAG5zacOfOVB9P2Q5Xc5uL/nVa7ZVs+HdMnvUPzLFCB/JwpB6Csg==",
+ "license": "Apache-2.0"
+ },
"node_modules/didyoumean": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
@@ -4812,12 +5568,11 @@
"license": "MIT"
},
"node_modules/dom-accessibility-api": {
- "version": "0.5.16",
- "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
- "integrity": "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==",
+ "version": "0.6.3",
+ "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz",
+ "integrity": "sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
},
"node_modules/dom-helpers": {
"version": "5.2.1",
@@ -4829,16 +5584,67 @@
"csstype": "^3.0.2"
}
},
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/eastasianwidth": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
"license": "MIT"
},
+ "node_modules/ecpair": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/ecpair/-/ecpair-3.0.0.tgz",
+ "integrity": "sha512-kf4JxjsRQoD4EBzpYjGAcR0t9i/4oAeRPtyCpKvSwyotgkc6oA4E4M0/e+kep7cXe+mgxAvoeh/jdgH9h5+Wxw==",
+ "license": "MIT",
+ "dependencies": {
+ "uint8array-tools": "^0.0.8",
+ "valibot": "^0.37.0",
+ "wif": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=20.0.0"
+ }
+ },
+ "node_modules/ecpair/node_modules/uint8array-tools": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.8.tgz",
+ "integrity": "sha512-xS6+s8e0Xbx++5/0L+yyexukU7pz//Yg6IHg3BKhXotg1JcYtgxVcUctQ0HxLByiJzpAkNFawz1Nz5Xadzo82g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/ecpair/node_modules/valibot": {
+ "version": "0.37.0",
+ "resolved": "https://registry.npmjs.org/valibot/-/valibot-0.37.0.tgz",
+ "integrity": "sha512-FQz52I8RXgFgOHym3XHYSREbNtkgSjF9prvMFH1nBsRyfL6SfCzoT1GuSDTlbsuPubM7/6Kbw0ZMQb8A+V+VsQ==",
+ "license": "MIT",
+ "peerDependencies": {
+ "typescript": ">=5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
"node_modules/electron-to-chromium": {
- "version": "1.5.149",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.149.tgz",
- "integrity": "sha512-UyiO82eb9dVOx8YO3ajDf9jz2kKyt98DEITRdeLPstOEuTlLzDA4Gyq5K9he71TQziU5jUVu2OAu5N48HmQiyQ==",
+ "version": "1.5.237",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.237.tgz",
+ "integrity": "sha512-icUt1NvfhGLar5lSWH3tHNzablaA5js3HVHacQimfP8ViEBOQv+L7DKEuHdbTZ0SKCO1ogTJTIL1Gwk9S6Qvcg==",
"dev": true,
"license": "ISC"
},
@@ -4877,9 +5683,9 @@
"license": "MIT"
},
"node_modules/entities": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.0.tgz",
- "integrity": "sha512-aKstq2TDOndCn4diEyp9Uq/Flu2i1GlLkc6XIDQSDMuaFE3OPW5OphLCyQ5SpSJZTb4reN+kTcYru5yIfXoRPw==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz",
+ "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
@@ -4889,6 +5695,24 @@
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-errors": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/es-html-parser": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/es-html-parser/-/es-html-parser-0.2.0.tgz",
@@ -4903,10 +5727,22 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/es-object-atoms": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/esbuild": {
- "version": "0.25.5",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz",
- "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==",
+ "version": "0.25.11",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.11.tgz",
+ "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -4917,31 +5753,32 @@
"node": ">=18"
},
"optionalDependencies": {
- "@esbuild/aix-ppc64": "0.25.5",
- "@esbuild/android-arm": "0.25.5",
- "@esbuild/android-arm64": "0.25.5",
- "@esbuild/android-x64": "0.25.5",
- "@esbuild/darwin-arm64": "0.25.5",
- "@esbuild/darwin-x64": "0.25.5",
- "@esbuild/freebsd-arm64": "0.25.5",
- "@esbuild/freebsd-x64": "0.25.5",
- "@esbuild/linux-arm": "0.25.5",
- "@esbuild/linux-arm64": "0.25.5",
- "@esbuild/linux-ia32": "0.25.5",
- "@esbuild/linux-loong64": "0.25.5",
- "@esbuild/linux-mips64el": "0.25.5",
- "@esbuild/linux-ppc64": "0.25.5",
- "@esbuild/linux-riscv64": "0.25.5",
- "@esbuild/linux-s390x": "0.25.5",
- "@esbuild/linux-x64": "0.25.5",
- "@esbuild/netbsd-arm64": "0.25.5",
- "@esbuild/netbsd-x64": "0.25.5",
- "@esbuild/openbsd-arm64": "0.25.5",
- "@esbuild/openbsd-x64": "0.25.5",
- "@esbuild/sunos-x64": "0.25.5",
- "@esbuild/win32-arm64": "0.25.5",
- "@esbuild/win32-ia32": "0.25.5",
- "@esbuild/win32-x64": "0.25.5"
+ "@esbuild/aix-ppc64": "0.25.11",
+ "@esbuild/android-arm": "0.25.11",
+ "@esbuild/android-arm64": "0.25.11",
+ "@esbuild/android-x64": "0.25.11",
+ "@esbuild/darwin-arm64": "0.25.11",
+ "@esbuild/darwin-x64": "0.25.11",
+ "@esbuild/freebsd-arm64": "0.25.11",
+ "@esbuild/freebsd-x64": "0.25.11",
+ "@esbuild/linux-arm": "0.25.11",
+ "@esbuild/linux-arm64": "0.25.11",
+ "@esbuild/linux-ia32": "0.25.11",
+ "@esbuild/linux-loong64": "0.25.11",
+ "@esbuild/linux-mips64el": "0.25.11",
+ "@esbuild/linux-ppc64": "0.25.11",
+ "@esbuild/linux-riscv64": "0.25.11",
+ "@esbuild/linux-s390x": "0.25.11",
+ "@esbuild/linux-x64": "0.25.11",
+ "@esbuild/netbsd-arm64": "0.25.11",
+ "@esbuild/netbsd-x64": "0.25.11",
+ "@esbuild/openbsd-arm64": "0.25.11",
+ "@esbuild/openbsd-x64": "0.25.11",
+ "@esbuild/openharmony-arm64": "0.25.11",
+ "@esbuild/sunos-x64": "0.25.11",
+ "@esbuild/win32-arm64": "0.25.11",
+ "@esbuild/win32-ia32": "0.25.11",
+ "@esbuild/win32-x64": "0.25.11"
}
},
"node_modules/escalade": {
@@ -4968,25 +5805,24 @@
}
},
"node_modules/eslint": {
- "version": "9.31.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.31.0.tgz",
- "integrity": "sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==",
+ "version": "9.38.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.38.0.tgz",
+ "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.1",
- "@eslint/config-array": "^0.21.0",
- "@eslint/config-helpers": "^0.3.0",
- "@eslint/core": "^0.15.0",
+ "@eslint/config-array": "^0.21.1",
+ "@eslint/config-helpers": "^0.4.1",
+ "@eslint/core": "^0.16.0",
"@eslint/eslintrc": "^3.3.1",
- "@eslint/js": "9.31.0",
- "@eslint/plugin-kit": "^0.3.1",
+ "@eslint/js": "9.38.0",
+ "@eslint/plugin-kit": "^0.4.0",
"@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
"@humanwhocodes/retry": "^0.4.2",
"@types/estree": "^1.0.6",
- "@types/json-schema": "^7.0.15",
"ajv": "^6.12.4",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.6",
@@ -5042,9 +5878,9 @@
}
},
"node_modules/eslint-plugin-react-refresh": {
- "version": "0.4.20",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.20.tgz",
- "integrity": "sha512-XpbHQ2q5gUF8BGOX4dHe+71qoirYMhApEPZ7sfhF/dNnOF1UXnCMGZf79SFTBO7Bz5YEIT4TMieSlJBWhP9WBA==",
+ "version": "0.4.24",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-refresh/-/eslint-plugin-react-refresh-0.4.24.tgz",
+ "integrity": "sha512-nLHIW7TEq3aLrEYWpVaJ1dRgFR+wLDPN8e8FpYAql/bMV2oBEfC37K0gLEGgv9fy66juNShSMV8OkTqzltcG/w==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -5081,6 +5917,33 @@
"url": "https://opencollective.com/eslint"
}
},
+ "node_modules/eslint/node_modules/@eslint/core": {
+ "version": "0.16.0",
+ "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.16.0.tgz",
+ "integrity": "sha512-nmC8/totwobIiFcGkDza3GIKfAw1+hLiYVrh3I1nIomQ8PEr5cxg34jnkmGawul/ep52wGRAcyeDCNtWKSOj4Q==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@types/json-schema": "^7.0.15"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
+ "node_modules/eslint/node_modules/@eslint/plugin-kit": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.0.tgz",
+ "integrity": "sha512-sB5uyeq+dwCWyPi31B2gQlVlo+j5brPlWx4yZBrEaRo/nhdDE8Xke1gsGgtiBdaBTxuTkceLVuVt/pclrasb0A==",
+ "dev": true,
+ "license": "Apache-2.0",
+ "dependencies": {
+ "@eslint/core": "^0.16.0",
+ "levn": "^0.4.1"
+ },
+ "engines": {
+ "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+ }
+ },
"node_modules/espree": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
@@ -5161,9 +6024,9 @@
"license": "MIT"
},
"node_modules/expect-type": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.1.tgz",
- "integrity": "sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==",
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.2.2.tgz",
+ "integrity": "sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==",
"dev": true,
"license": "Apache-2.0",
"engines": {
@@ -5178,9 +6041,9 @@
"license": "MIT"
},
"node_modules/fast-equals": {
- "version": "5.2.2",
- "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.2.2.tgz",
- "integrity": "sha512-V7/RktU11J3I36Nwq2JnZEM7tNm17eBJz+u25qdxBZeCKiX6BkVSZQjwWIr+IobgnZy+ag73tTZgZi7tr0LrBw==",
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.3.2.tgz",
+ "integrity": "sha512-6rxyATwPCkaFIL3JLqw8qXqMpIZ942pTX/tbQFkRsDGblS8tNGtlUauA/+mt6RUfqn/4MoEr+WDkYoIQbibWuQ==",
"license": "MIT",
"engines": {
"node": ">=6.0.0"
@@ -5237,6 +6100,24 @@
"reusify": "^1.0.4"
}
},
+ "node_modules/fdir": {
+ "version": "6.5.0",
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=12.0.0"
+ },
+ "peerDependencies": {
+ "picomatch": "^3 || ^4"
+ },
+ "peerDependenciesMeta": {
+ "picomatch": {
+ "optional": true
+ }
+ }
+ },
"node_modules/file-entry-cache": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
@@ -5300,6 +6181,21 @@
"dev": true,
"license": "ISC"
},
+ "node_modules/for-each": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz",
+ "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==",
+ "license": "MIT",
+ "dependencies": {
+ "is-callable": "^1.2.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/foreground-child": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
@@ -5362,6 +6258,30 @@
"node": "6.* || 8.* || >= 10.*"
}
},
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/get-nonce": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz",
@@ -5371,6 +6291,19 @@
"node": ">=6"
}
},
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/glob": {
"version": "10.4.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
@@ -5440,6 +6373,18 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/graphemer": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
@@ -5479,6 +6424,60 @@
"node": ">=8"
}
},
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz",
+ "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==",
+ "license": "MIT",
+ "dependencies": {
+ "es-define-property": "^1.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
+ "license": "MIT",
+ "dependencies": {
+ "has-symbols": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hash-base": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.2.tgz",
+ "integrity": "sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg==",
+ "license": "MIT",
+ "dependencies": {
+ "inherits": "^2.0.4",
+ "readable-stream": "^2.3.8",
+ "safe-buffer": "^5.2.1",
+ "to-buffer": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/hasown": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
@@ -5510,6 +6509,12 @@
"node": ">=18"
}
},
+ "node_modules/html5-qrcode": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/html5-qrcode/-/html5-qrcode-2.3.8.tgz",
+ "integrity": "sha512-jsr4vafJhwoLVEDW3n1KvPnCCXWaQfRng0/EEYk1vNcQGcG/htAdhJX0be8YyqMoSz7+hZvOZSTAepsabiuhiQ==",
+ "license": "Apache-2.0"
+ },
"node_modules/http-proxy-agent": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz",
@@ -5624,6 +6629,12 @@
"node": ">=8"
}
},
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "license": "ISC"
+ },
"node_modules/input-otp": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/input-otp/-/input-otp-1.4.2.tgz",
@@ -5655,6 +6666,18 @@
"node": ">=8"
}
},
+ "node_modules/is-callable": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/is-core-module": {
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
@@ -5716,6 +6739,27 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/is-typed-array": {
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz",
+ "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==",
+ "license": "MIT",
+ "dependencies": {
+ "which-typed-array": "^1.1.16"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==",
+ "license": "MIT"
+ },
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -5880,6 +6924,164 @@
"integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
"license": "MIT"
},
+ "node_modules/liquidjs-lib": {
+ "version": "6.0.2-liquid.37",
+ "resolved": "https://registry.npmjs.org/liquidjs-lib/-/liquidjs-lib-6.0.2-liquid.37.tgz",
+ "integrity": "sha512-AOPwqg9wtLMNxfqOf8afC+bYYrs3VBsTq/Mq/iOe0F2X3CcbgiLeSAcvOY34jbnUre6U+zmuXKP9bWmxnOG08A==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/randombytes": "^2.0.0",
+ "bech32": "^2.0.0",
+ "bip174-liquid": "^1.0.3",
+ "bip66": "^1.1.0",
+ "bitcoinjs-lib": "^6.0.2",
+ "bitset": "^5.1.1",
+ "blech32": "^1.0.1",
+ "bs58check": "^2.0.0",
+ "create-hash": "^1.2.0",
+ "ecpair": "^2.1.0",
+ "slip77": "^0.2.0",
+ "typeforce": "^1.11.3",
+ "varuint-bitcoin": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/base-x": {
+ "version": "3.0.11",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.11.tgz",
+ "integrity": "sha512-xz7wQ8xDhdyP7tQxwdteLYeFfS68tSMNCZ/Y37WJ4bhGfKPpqEIlmIyueQHqOyoPhE6xNUqjzRr8ra0eF9VRvA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/bip174": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/bip174/-/bip174-2.1.1.tgz",
+ "integrity": "sha512-mdFV5+/v0XyNYXjBS6CQPLo9ekCx4gtKZFnJm5PMto7Fs9hTTDpkkzOB7/FtluRI6JbUUAu+snTYfJRgHLZbZQ==",
+ "license": "MIT",
+ "peer": true,
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/bip66": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz",
+ "integrity": "sha512-nemMHz95EmS38a26XbbdxIYj5csHd3RMP3H5bwQknX0WYHF01qhpufP42mLOwVICuH2JmhIhXiWs89MfUGL7Xw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "safe-buffer": "^5.0.1"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/bitcoinjs-lib": {
+ "version": "6.1.7",
+ "resolved": "https://registry.npmjs.org/bitcoinjs-lib/-/bitcoinjs-lib-6.1.7.tgz",
+ "integrity": "sha512-tlf/r2DGMbF7ky1MgUqXHzypYHakkEnm0SZP23CJKIqNY/5uNAnMbFhMJdhjrL/7anfb/U8+AlpdjPWjPnAalg==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@noble/hashes": "^1.2.0",
+ "bech32": "^2.0.0",
+ "bip174": "^2.1.1",
+ "bs58check": "^3.0.1",
+ "typeforce": "^1.11.3",
+ "varuint-bitcoin": "^1.1.2"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/bitcoinjs-lib/node_modules/base-x": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/base-x/-/base-x-4.0.1.tgz",
+ "integrity": "sha512-uAZ8x6r6S3aUM9rbHGVOIsR15U/ZSc82b3ymnCPsT45Gk1DDvhDPdIgB5MrhirZWt+5K0EEPQH985kNqZgNPFw==",
+ "license": "MIT",
+ "peer": true
+ },
+ "node_modules/liquidjs-lib/node_modules/bitcoinjs-lib/node_modules/bs58": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz",
+ "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "base-x": "^4.0.0"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/bitcoinjs-lib/node_modules/bs58check": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-3.0.1.tgz",
+ "integrity": "sha512-hjuuJvoWEybo7Hn/0xOrczQKKEKD63WguEjlhLExYs2wUBcebDC1jDNK17eEAD2lYfw82d5ASC1d7K3SWszjaQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@noble/hashes": "^1.2.0",
+ "bs58": "^5.0.0"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/bs58": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
+ "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "base-x": "^3.0.2"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/bs58check": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz",
+ "integrity": "sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "bs58": "^4.0.0",
+ "create-hash": "^1.1.0",
+ "safe-buffer": "^5.1.2"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/ecpair": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/ecpair/-/ecpair-2.1.0.tgz",
+ "integrity": "sha512-cL/mh3MtJutFOvFc27GPZE2pWL3a3k4YvzUWEOvilnfZVlH3Jwgx/7d6tlD7/75tNk8TG2m+7Kgtz0SI1tWcqw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "randombytes": "^2.1.0",
+ "typeforce": "^1.18.0",
+ "wif": "^2.0.6"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/varuint-bitcoin": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz",
+ "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "safe-buffer": "^5.1.1"
+ }
+ },
+ "node_modules/liquidjs-lib/node_modules/wif": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz",
+ "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "bs58check": "<3.0.0"
+ }
+ },
"node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
@@ -5902,20 +7104,6 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"license": "MIT"
},
- "node_modules/lodash.castarray": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz",
- "integrity": "sha512-aVx8ztPv7/2ULbArGJ2Y42bG1mEQ5mGjpdvrbJcJFU3TbYybe+QlLS4pst9zV52ymy2in1KpFPiZnAOATxD4+Q==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/lodash.isplainobject": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
- "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
@@ -5923,6 +7111,12 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/long": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
+ "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
+ "license": "Apache-2.0"
+ },
"node_modules/loose-envify": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@@ -5936,9 +7130,9 @@
}
},
"node_modules/loupe": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.3.tgz",
- "integrity": "sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==",
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz",
+ "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==",
"dev": true,
"license": "MIT"
},
@@ -5963,35 +7157,54 @@
"integrity": "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"bin": {
"lz-string": "bin/bin.js"
}
},
"node_modules/magic-string": {
- "version": "0.30.17",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",
- "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
+ "version": "0.30.19",
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz",
+ "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==",
"license": "MIT",
"dependencies": {
- "@jridgewell/sourcemap-codec": "^1.5.0"
+ "@jridgewell/sourcemap-codec": "^1.5.5"
}
},
"node_modules/magic-string-ast": {
- "version": "0.9.1",
- "resolved": "https://registry.npmjs.org/magic-string-ast/-/magic-string-ast-0.9.1.tgz",
- "integrity": "sha512-18dv2ZlSSgJ/jDWlZGKfnDJx56ilNlYq9F7NnwuWTErsmYmqJ2TWE4l1o2zlUHBYUGBy3tIhPCC1gxq8M5HkMA==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/magic-string-ast/-/magic-string-ast-1.0.3.tgz",
+ "integrity": "sha512-CvkkH1i81zl7mmb94DsRiFeG9V2fR2JeuK8yDgS8oiZSFa++wWLEgZ5ufEOyLHbvSbD1gTRKv9NdX69Rnvr9JA==",
"license": "MIT",
"dependencies": {
- "magic-string": "^0.30.17"
+ "magic-string": "^0.30.19"
},
"engines": {
- "node": ">=20.18.0"
+ "node": ">=20.19.0"
},
"funding": {
"url": "https://github.com/sponsors/sxzz"
}
},
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/md5.js": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+ "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
+ "license": "MIT",
+ "dependencies": {
+ "hash-base": "^3.0.0",
+ "inherits": "^2.0.1",
+ "safe-buffer": "^5.1.2"
+ }
+ },
"node_modules/merge2": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
@@ -6014,6 +7227,18 @@
"node": ">=8.6"
}
},
+ "node_modules/micromatch/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
"node_modules/min-indent": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
@@ -6047,15 +7272,15 @@
}
},
"node_modules/mlly": {
- "version": "1.7.4",
- "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.7.4.tgz",
- "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==",
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.0.tgz",
+ "integrity": "sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==",
"license": "MIT",
"dependencies": {
- "acorn": "^8.14.0",
- "pathe": "^2.0.1",
- "pkg-types": "^1.3.0",
- "ufo": "^1.5.4"
+ "acorn": "^8.15.0",
+ "pathe": "^2.0.3",
+ "pkg-types": "^1.3.1",
+ "ufo": "^1.6.1"
}
},
"node_modules/ms": {
@@ -6102,9 +7327,9 @@
"license": "MIT"
},
"node_modules/node-releases": {
- "version": "2.0.19",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
- "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
+ "version": "2.0.25",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.25.tgz",
+ "integrity": "sha512-4auku8B/vw5psvTiiN9j1dAOsXvMoGqJuKJcR+dTdqiXEK20mMTk1UEo3HS16LeGQsVG6+qKTPM9u/qQ2LqATA==",
"dev": true,
"license": "MIT"
},
@@ -6128,9 +7353,9 @@
}
},
"node_modules/nostr-tools": {
- "version": "2.15.0",
- "resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.15.0.tgz",
- "integrity": "sha512-Jj/+UFbu3JbTAWP4ipPFNuyD4W5eVRBNAP+kmnoRCYp3bLmTrlQ0Qhs5O1xSQJTFpjdZqoS0zZOUKdxUdjc+pw==",
+ "version": "2.17.0",
+ "resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.17.0.tgz",
+ "integrity": "sha512-lrvHM7cSaGhz7F0YuBvgHMoU2s8/KuThihDoOYk8w5gpVHTy0DeUCAgCN8uLGeuSl5MAWekJr9Dkfo5HClqO9w==",
"license": "Unlicense",
"dependencies": {
"@noble/ciphers": "^0.5.1",
@@ -6150,16 +7375,118 @@
}
}
},
+ "node_modules/nostr-tools/node_modules/@noble/curves": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz",
+ "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "1.3.2"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/nostr-tools/node_modules/@noble/curves/node_modules/@noble/hashes": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz",
+ "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/nostr-tools/node_modules/@noble/hashes": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz",
+ "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/nostr-tools/node_modules/@scure/base": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.1.tgz",
+ "integrity": "sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "license": "MIT"
+ },
+ "node_modules/nostr-tools/node_modules/@scure/bip32": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.3.1.tgz",
+ "integrity": "sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/curves": "~1.1.0",
+ "@noble/hashes": "~1.3.1",
+ "@scure/base": "~1.1.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/nostr-tools/node_modules/@scure/bip32/node_modules/@noble/curves": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.1.0.tgz",
+ "integrity": "sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "1.3.1"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/nostr-tools/node_modules/@scure/bip39": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.2.1.tgz",
+ "integrity": "sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==",
+ "license": "MIT",
+ "dependencies": {
+ "@noble/hashes": "~1.3.0",
+ "@scure/base": "~1.1.0"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
"node_modules/nostr-wasm": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/nostr-wasm/-/nostr-wasm-0.1.0.tgz",
"integrity": "sha512-78BTryCLcLYv96ONU8Ws3Q1JzjlAt+43pWQhIl86xZmWeegYCNLPml7yQ+gG3vR6V5h4XGj+TxO+SS5dsThQIA==",
"license": "MIT"
},
+ "node_modules/npubcash-sdk": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/npubcash-sdk/-/npubcash-sdk-0.2.0.tgz",
+ "integrity": "sha512-Y8UcXYsEbW0mm5VrZDHG1i4YrwYAwFbJPFqQ6GOyVxFDt6/JZ42yLPMu+wWKvEEOCJO5IHwwYkiXQXzFyAK3pA==",
+ "dependencies": {
+ "nostr-tools": "^2.15.0",
+ "npubcash-types": "^0.1.1"
+ }
+ },
+ "node_modules/npubcash-types": {
+ "version": "0.1.1",
+ "resolved": "https://registry.npmjs.org/npubcash-types/-/npubcash-types-0.1.1.tgz",
+ "integrity": "sha512-/HGfes2cvQpkrWOuUrdemJJhJUQu+xiXl4x+AxQtKUMGCB8uEhfrXJfAQ0n+DgtkIX1YVLOh0a/e6E5LX+fUew==",
+ "license": "MIT"
+ },
"node_modules/nwsapi": {
- "version": "2.2.20",
- "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz",
- "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==",
+ "version": "2.2.22",
+ "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz",
+ "integrity": "sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==",
"dev": true,
"license": "MIT"
},
@@ -6319,9 +7646,9 @@
"license": "MIT"
},
"node_modules/pathval": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz",
- "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz",
+ "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -6335,12 +7662,12 @@
"license": "ISC"
},
"node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
+ "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"license": "MIT",
"engines": {
- "node": ">=8.6"
+ "node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
@@ -6384,10 +7711,19 @@
"node": ">=10.13.0"
}
},
+ "node_modules/possible-typed-array-names": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
+ "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/postcss": {
- "version": "8.5.3",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz",
- "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==",
+ "version": "8.5.6",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
+ "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
"funding": [
{
"type": "opencollective",
@@ -6404,7 +7740,7 @@
],
"license": "MIT",
"dependencies": {
- "nanoid": "^3.3.8",
+ "nanoid": "^3.3.11",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
@@ -6430,28 +7766,9 @@
}
},
"node_modules/postcss-js": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.1.tgz",
- "integrity": "sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==",
- "license": "MIT",
- "dependencies": {
- "camelcase-css": "^2.0.1"
- },
- "engines": {
- "node": "^12 || ^14 || >= 16"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- "peerDependencies": {
- "postcss": "^8.4.21"
- }
- },
- "node_modules/postcss-load-config": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz",
- "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.1.0.tgz",
+ "integrity": "sha512-oIAOTqgIo7q2EOwbhb8UalYePMvYoIeRY2YKntdpFQXNosSu3vLrniGgmH9OKs/qAkfoj5oB3le/7mINW1LCfw==",
"funding": [
{
"type": "opencollective",
@@ -6464,21 +7781,53 @@
],
"license": "MIT",
"dependencies": {
- "lilconfig": "^3.0.0",
- "yaml": "^2.3.4"
+ "camelcase-css": "^2.0.1"
},
"engines": {
- "node": ">= 14"
+ "node": "^12 || ^14 || >= 16"
},
"peerDependencies": {
+ "postcss": "^8.4.21"
+ }
+ },
+ "node_modules/postcss-load-config": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-6.0.1.tgz",
+ "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==",
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "lilconfig": "^3.1.1"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "peerDependencies": {
+ "jiti": ">=1.21.0",
"postcss": ">=8.0.9",
- "ts-node": ">=9.0.0"
+ "tsx": "^4.8.1",
+ "yaml": "^2.4.2"
},
"peerDependenciesMeta": {
+ "jiti": {
+ "optional": true
+ },
"postcss": {
"optional": true
},
- "ts-node": {
+ "tsx": {
+ "optional": true
+ },
+ "yaml": {
"optional": true
}
}
@@ -6557,7 +7906,6 @@
"integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"ansi-regex": "^5.0.1",
"ansi-styles": "^5.0.0",
@@ -6573,7 +7921,6 @@
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=8"
}
@@ -6584,7 +7931,6 @@
"integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=10"
},
@@ -6597,8 +7943,13 @@
"resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
"integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
"dev": true,
- "license": "MIT",
- "peer": true
+ "license": "MIT"
+ },
+ "node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+ "license": "MIT"
},
"node_modules/prop-types": {
"version": "15.8.1",
@@ -6664,6 +8015,16 @@
],
"license": "MIT"
},
+ "node_modules/randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
"node_modules/react": {
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
@@ -6704,9 +8065,9 @@
}
},
"node_modules/react-hook-form": {
- "version": "7.56.1",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.56.1.tgz",
- "integrity": "sha512-qWAVokhSpshhcEuQDSANHx3jiAEFzu2HAaaQIzi/r9FNPm1ioAvuJSD4EuZzWd7Al7nTRKcKPnBKO7sRn+zavQ==",
+ "version": "7.65.0",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.65.0.tgz",
+ "integrity": "sha512-xtOzDz063WcXvGWaHgLNrNzlsdFgtUWcb32E6WFaGTd7kPZG3EeDusjdZfUsPwKCKVXy1ZlntifaHZ4l8pAsmw==",
"license": "MIT",
"engines": {
"node": ">=18.0.0"
@@ -6741,9 +8102,9 @@
"license": "MIT"
},
"node_modules/react-remove-scroll": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.6.3.tgz",
- "integrity": "sha512-pnAi91oOk8g8ABQKGF5/M9qxmmOPxaAnopyTHYfqYEwJhyFrbbBtHuSgtKEoH0jpcxx5o3hXqH1mNd9/Oi+8iQ==",
+ "version": "2.7.1",
+ "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.1.tgz",
+ "integrity": "sha512-HpMh8+oahmIdOuS5aFKKY6Pyog+FNaZV/XyJOq7b4YFwsFHe5yYfdbIalI4k3vU2nSDql7YskmUseHsRrJqIPA==",
"license": "MIT",
"dependencies": {
"react-remove-scroll-bar": "^2.3.7",
@@ -6798,9 +8159,9 @@
}
},
"node_modules/react-router": {
- "version": "6.30.0",
- "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.0.tgz",
- "integrity": "sha512-D3X8FyH9nBcTSHGdEKurK7r8OYE1kKFn3d/CF+CoxbSHkxU7o37+Uh7eAHRXr6k2tSExXYO++07PeXJtA/dEhQ==",
+ "version": "6.30.1",
+ "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.30.1.tgz",
+ "integrity": "sha512-X1m21aEmxGXqENEPG3T6u0Th7g0aS4ZmoNynhbs+Cn+q+QGTLt+d5IQ2bHAXKzKcxGJjxACpVbnYQSCRcfxHlQ==",
"license": "MIT",
"dependencies": {
"@remix-run/router": "1.23.0"
@@ -6813,13 +8174,13 @@
}
},
"node_modules/react-router-dom": {
- "version": "6.30.0",
- "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.0.tgz",
- "integrity": "sha512-x30B78HV5tFk8ex0ITwzC9TTZMua4jGyA9IUlH1JLQYQTFyxr/ZxwOJq7evg1JX1qGVUcvhsmQSKdPncQrjTgA==",
+ "version": "6.30.1",
+ "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.30.1.tgz",
+ "integrity": "sha512-llKsgOkZdbPU1Eg3zK8lCn+sjD9wMRZZPuzmdWWX5SUs8OFkN5HnFVC0u5KMeMaC9aoancFI/KoLuKPqN+hxHw==",
"license": "MIT",
"dependencies": {
"@remix-run/router": "1.23.0",
- "react-router": "6.30.0"
+ "react-router": "6.30.1"
},
"engines": {
"node": ">=14.0.0"
@@ -6891,6 +8252,27 @@
"pify": "^2.3.0"
}
},
+ "node_modules/readable-stream": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
+ "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
+ "license": "MIT",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/readable-stream/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "license": "MIT"
+ },
"node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
@@ -6903,10 +8285,22 @@
"node": ">=8.10.0"
}
},
+ "node_modules/readdirp/node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
"node_modules/recharts": {
- "version": "2.15.3",
- "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.15.3.tgz",
- "integrity": "sha512-EdOPzTwcFSuqtvkDoaM5ws/Km1+WTAO2eizL7rqiG0V2UVhTnz0m7J2i0CjVPUCdEkZImaWvXLbZDS2H5t6GFQ==",
+ "version": "2.15.4",
+ "resolved": "https://registry.npmjs.org/recharts/-/recharts-2.15.4.tgz",
+ "integrity": "sha512-UT/q6fwS3c1dHbXv2uFgYJ9BMFHu3fwnd7AYZaEQhXuYQ4hgsxLvsUXzGdKeZrW5xopzDCvuA2N41WJ88I7zIw==",
"license": "MIT",
"dependencies": {
"clsx": "^2.0.0",
@@ -6965,12 +8359,12 @@
"license": "ISC"
},
"node_modules/resolve": {
- "version": "1.22.10",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
- "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
+ "version": "1.22.11",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz",
+ "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==",
"license": "MIT",
"dependencies": {
- "is-core-module": "^2.16.0",
+ "is-core-module": "^2.16.1",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
@@ -7004,14 +8398,27 @@
"node": ">=0.10.0"
}
},
+ "node_modules/ripemd160": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.3.tgz",
+ "integrity": "sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==",
+ "license": "MIT",
+ "dependencies": {
+ "hash-base": "^3.1.2",
+ "inherits": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/rollup": {
- "version": "4.40.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.40.1.tgz",
- "integrity": "sha512-C5VvvgCCyfyotVITIAv+4efVytl5F7wt+/I2i9q9GZcEXW9BP52YYOXC58igUi+LFZVHukErIIqQSWwv/M3WRw==",
+ "version": "4.52.5",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.5.tgz",
+ "integrity": "sha512-3GuObel8h7Kqdjt0gxkEzaifHTqLVW56Y/bjN7PSQtkKr0w3V/QYSdt6QWYtd7A1xUtYQigtdUfgj1RvWVtorw==",
"devOptional": true,
"license": "MIT",
"dependencies": {
- "@types/estree": "1.0.7"
+ "@types/estree": "1.0.8"
},
"bin": {
"rollup": "dist/bin/rollup"
@@ -7021,26 +8428,28 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
- "@rollup/rollup-android-arm-eabi": "4.40.1",
- "@rollup/rollup-android-arm64": "4.40.1",
- "@rollup/rollup-darwin-arm64": "4.40.1",
- "@rollup/rollup-darwin-x64": "4.40.1",
- "@rollup/rollup-freebsd-arm64": "4.40.1",
- "@rollup/rollup-freebsd-x64": "4.40.1",
- "@rollup/rollup-linux-arm-gnueabihf": "4.40.1",
- "@rollup/rollup-linux-arm-musleabihf": "4.40.1",
- "@rollup/rollup-linux-arm64-gnu": "4.40.1",
- "@rollup/rollup-linux-arm64-musl": "4.40.1",
- "@rollup/rollup-linux-loongarch64-gnu": "4.40.1",
- "@rollup/rollup-linux-powerpc64le-gnu": "4.40.1",
- "@rollup/rollup-linux-riscv64-gnu": "4.40.1",
- "@rollup/rollup-linux-riscv64-musl": "4.40.1",
- "@rollup/rollup-linux-s390x-gnu": "4.40.1",
- "@rollup/rollup-linux-x64-gnu": "4.40.1",
- "@rollup/rollup-linux-x64-musl": "4.40.1",
- "@rollup/rollup-win32-arm64-msvc": "4.40.1",
- "@rollup/rollup-win32-ia32-msvc": "4.40.1",
- "@rollup/rollup-win32-x64-msvc": "4.40.1",
+ "@rollup/rollup-android-arm-eabi": "4.52.5",
+ "@rollup/rollup-android-arm64": "4.52.5",
+ "@rollup/rollup-darwin-arm64": "4.52.5",
+ "@rollup/rollup-darwin-x64": "4.52.5",
+ "@rollup/rollup-freebsd-arm64": "4.52.5",
+ "@rollup/rollup-freebsd-x64": "4.52.5",
+ "@rollup/rollup-linux-arm-gnueabihf": "4.52.5",
+ "@rollup/rollup-linux-arm-musleabihf": "4.52.5",
+ "@rollup/rollup-linux-arm64-gnu": "4.52.5",
+ "@rollup/rollup-linux-arm64-musl": "4.52.5",
+ "@rollup/rollup-linux-loong64-gnu": "4.52.5",
+ "@rollup/rollup-linux-ppc64-gnu": "4.52.5",
+ "@rollup/rollup-linux-riscv64-gnu": "4.52.5",
+ "@rollup/rollup-linux-riscv64-musl": "4.52.5",
+ "@rollup/rollup-linux-s390x-gnu": "4.52.5",
+ "@rollup/rollup-linux-x64-gnu": "4.52.5",
+ "@rollup/rollup-linux-x64-musl": "4.52.5",
+ "@rollup/rollup-openharmony-arm64": "4.52.5",
+ "@rollup/rollup-win32-arm64-msvc": "4.52.5",
+ "@rollup/rollup-win32-ia32-msvc": "4.52.5",
+ "@rollup/rollup-win32-x64-gnu": "4.52.5",
+ "@rollup/rollup-win32-x64-msvc": "4.52.5",
"fsevents": "~2.3.2"
}
},
@@ -7074,6 +8483,26 @@
"queue-microtask": "^1.2.2"
}
},
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "license": "MIT"
+ },
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
@@ -7104,9 +8533,9 @@
}
},
"node_modules/semver": {
- "version": "7.7.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
- "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
+ "version": "7.7.3",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
+ "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==",
"dev": true,
"license": "ISC",
"bin": {
@@ -7122,6 +8551,43 @@
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==",
"license": "ISC"
},
+ "node_modules/set-function-length": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz",
+ "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==",
+ "license": "MIT",
+ "dependencies": {
+ "define-data-property": "^1.1.4",
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.4",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/sha.js": {
+ "version": "2.4.12",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz",
+ "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==",
+ "license": "(MIT AND BSD-3-Clause)",
+ "dependencies": {
+ "inherits": "^2.0.4",
+ "safe-buffer": "^5.2.1",
+ "to-buffer": "^1.2.0"
+ },
+ "bin": {
+ "sha.js": "bin.js"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -7162,6 +8628,28 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/slip77": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/slip77/-/slip77-0.2.0.tgz",
+ "integrity": "sha512-LQaxb1Hef10kU36qvk71tlSt5BWph7GM0j+t2n5zs169X4QfnNbb6xqKZ38X3ETzGmCQaVdBwr925HDagHra/Q==",
+ "license": "MIT",
+ "peer": true,
+ "dependencies": {
+ "@types/node": "^13.9.1",
+ "create-hmac": "^1.1.7",
+ "typeforce": "^1.18.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/slip77/node_modules/@types/node": {
+ "version": "13.13.52",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.52.tgz",
+ "integrity": "sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==",
+ "license": "MIT",
+ "peer": true
+ },
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
@@ -7179,12 +8667,27 @@
"license": "MIT"
},
"node_modules/std-env": {
- "version": "3.9.0",
- "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.9.0.tgz",
- "integrity": "sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==",
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz",
+ "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==",
"dev": true,
"license": "MIT"
},
+ "node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "license": "MIT",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/string_decoder/node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "license": "MIT"
+ },
"node_modules/string-width": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
@@ -7245,9 +8748,9 @@
}
},
"node_modules/strip-ansi": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz",
+ "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==",
"license": "MIT",
"dependencies": {
"ansi-regex": "^6.0.1"
@@ -7307,6 +8810,26 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/strip-literal": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz",
+ "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "js-tokens": "^9.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/strip-literal/node_modules/js-tokens": {
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz",
+ "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/sucrase": {
"version": "3.35.0",
"resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz",
@@ -7372,9 +8895,9 @@
}
},
"node_modules/tailwindcss": {
- "version": "3.4.17",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.17.tgz",
- "integrity": "sha512-w33E2aCvSDP0tW9RZuNXadXlkHXqFzSkQew/aIa2i/Sj8fThxwovwlXHSPXTbAHwEIhBFXAedUhP2tueAKP8Og==",
+ "version": "3.4.18",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.18.tgz",
+ "integrity": "sha512-6A2rnmW5xZMdw11LYjhcI5846rt9pbLSabY5XPxo+XWdxwZaFEn47Go4NzFiHu9sNNmr/kXivP1vStfvMaK1GQ==",
"license": "MIT",
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
@@ -7385,7 +8908,7 @@
"fast-glob": "^3.3.2",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
- "jiti": "^1.21.6",
+ "jiti": "^1.21.7",
"lilconfig": "^3.1.3",
"micromatch": "^4.0.8",
"normalize-path": "^3.0.0",
@@ -7394,7 +8917,7 @@
"postcss": "^8.4.47",
"postcss-import": "^15.1.0",
"postcss-js": "^4.0.1",
- "postcss-load-config": "^4.0.2",
+ "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0",
"postcss-nested": "^6.2.0",
"postcss-selector-parser": "^6.1.2",
"resolve": "^1.22.8",
@@ -7472,14 +8995,14 @@
"license": "MIT"
},
"node_modules/tinyglobby": {
- "version": "0.2.14",
- "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz",
- "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==",
+ "version": "0.2.15",
+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
+ "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "fdir": "^6.4.4",
- "picomatch": "^4.0.2"
+ "fdir": "^6.5.0",
+ "picomatch": "^4.0.3"
},
"engines": {
"node": ">=12.0.0"
@@ -7488,38 +9011,10 @@
"url": "https://github.com/sponsors/SuperchupuDev"
}
},
- "node_modules/tinyglobby/node_modules/fdir": {
- "version": "6.4.4",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz",
- "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/tinyglobby/node_modules/picomatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/tinypool": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.0.2.tgz",
- "integrity": "sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz",
+ "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7537,9 +9032,9 @@
}
},
"node_modules/tinyspy": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.2.tgz",
- "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==",
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz",
+ "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7566,6 +9061,26 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/to-buffer": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz",
+ "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==",
+ "license": "MIT",
+ "dependencies": {
+ "isarray": "^2.0.5",
+ "safe-buffer": "^5.2.1",
+ "typed-array-buffer": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/to-buffer/node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "license": "MIT"
+ },
"node_modules/to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -7642,11 +9157,30 @@
"node": ">= 0.8.0"
}
},
+ "node_modules/typed-array-buffer": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz",
+ "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.3",
+ "es-errors": "^1.3.0",
+ "is-typed-array": "^1.1.14"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/typeforce": {
+ "version": "1.18.0",
+ "resolved": "https://registry.npmjs.org/typeforce/-/typeforce-1.18.0.tgz",
+ "integrity": "sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g==",
+ "license": "MIT"
+ },
"node_modules/typescript": {
- "version": "5.8.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
- "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
- "devOptional": true,
+ "version": "5.9.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
+ "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
"license": "Apache-2.0",
"bin": {
"tsc": "bin/tsc",
@@ -7657,15 +9191,16 @@
}
},
"node_modules/typescript-eslint": {
- "version": "8.31.1",
- "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.31.1.tgz",
- "integrity": "sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==",
+ "version": "8.46.2",
+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.46.2.tgz",
+ "integrity": "sha512-vbw8bOmiuYNdzzV3lsiWv6sRwjyuKJMQqWulBOU7M0RrxedXledX8G8kBbQeiOYDnTfiXz0Y4081E1QMNB6iQg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/eslint-plugin": "8.31.1",
- "@typescript-eslint/parser": "8.31.1",
- "@typescript-eslint/utils": "8.31.1"
+ "@typescript-eslint/eslint-plugin": "8.46.2",
+ "@typescript-eslint/parser": "8.46.2",
+ "@typescript-eslint/typescript-estree": "8.46.2",
+ "@typescript-eslint/utils": "8.46.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -7676,7 +9211,7 @@
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0",
- "typescript": ">=4.8.4 <5.9.0"
+ "typescript": ">=4.8.4 <6.0.0"
}
},
"node_modules/ufo": {
@@ -7685,17 +9220,25 @@
"integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==",
"license": "MIT"
},
+ "node_modules/uint8array-tools": {
+ "version": "0.0.9",
+ "resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.9.tgz",
+ "integrity": "sha512-9vqDWmoSXOoi+K14zNaf6LBV51Q8MayF0/IiQs3GlygIKUYtog603e6virExkjjFosfJUBI4LhbQK1iq8IG11A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
"node_modules/undici-types": {
"version": "6.21.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
- "dev": true,
"license": "MIT"
},
"node_modules/unhead": {
- "version": "2.0.10",
- "resolved": "https://registry.npmjs.org/unhead/-/unhead-2.0.10.tgz",
- "integrity": "sha512-GT188rzTCeSKt55tYyQlHHKfUTtZvgubrXiwzGeXg6UjcKO3FsagaMzQp6TVDrpDY++3i7Qt0t3pnCc/ebg5yQ==",
+ "version": "2.0.19",
+ "resolved": "https://registry.npmjs.org/unhead/-/unhead-2.0.19.tgz",
+ "integrity": "sha512-gEEjkV11Aj+rBnY6wnRfsFtF2RxKOLaPN4i+Gx3UhBxnszvV6ApSNZbGk7WKyy/lErQ6ekPN63qdFL7sa1leow==",
"license": "MIT",
"dependencies": {
"hookable": "^5.5.3"
@@ -7705,13 +9248,14 @@
}
},
"node_modules/unplugin": {
- "version": "2.3.5",
- "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.5.tgz",
- "integrity": "sha512-RyWSb5AHmGtjjNQ6gIlA67sHOsWpsbWpwDokLwTcejVdOjEkJZh7QKu14J00gDDVSh8kGH4KYC/TNBceXFZhtw==",
+ "version": "2.3.10",
+ "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.10.tgz",
+ "integrity": "sha512-6NCPkv1ClwH+/BGE9QeoTIl09nuiAt0gS28nn1PvYXsGKRwM2TCbFA2QiilmehPDTXIe684k4rZI1yl3A1PCUw==",
"license": "MIT",
"dependencies": {
- "acorn": "^8.14.1",
- "picomatch": "^4.0.2",
+ "@jridgewell/remapping": "^2.3.5",
+ "acorn": "^8.15.0",
+ "picomatch": "^4.0.3",
"webpack-virtual-modules": "^0.6.2"
},
"engines": {
@@ -7719,35 +9263,23 @@
}
},
"node_modules/unplugin-ast": {
- "version": "0.15.0",
- "resolved": "https://registry.npmjs.org/unplugin-ast/-/unplugin-ast-0.15.0.tgz",
- "integrity": "sha512-3ReKQUmmYEcNhjoyiwfFuaJU0jkZNcNk8+iLdLVWk73iojVjJLiF/QhnpAFf3O7CJd6bqhWBzNyQ68Udp2fi5Q==",
+ "version": "0.15.3",
+ "resolved": "https://registry.npmjs.org/unplugin-ast/-/unplugin-ast-0.15.3.tgz",
+ "integrity": "sha512-71pdLm4aiNT4y0NUaz86joG7YhtfubtfNvlWyOe5vtVjS6vG9YMRfCzEwMM27pZP67XlqWJkACXz/f1nSofxbg==",
"license": "MIT",
"dependencies": {
- "@babel/generator": "^7.27.1",
- "ast-kit": "^2.0.0",
- "magic-string-ast": "^0.9.1",
- "unplugin": "^2.3.2"
+ "@babel/generator": "^7.28.3",
+ "ast-kit": "^2.1.3",
+ "magic-string-ast": "^1.0.3",
+ "unplugin": "^2.3.10"
},
"engines": {
- "node": ">=20.18.0"
+ "node": ">=20.19.0"
},
"funding": {
"url": "https://github.com/sponsors/sxzz"
}
},
- "node_modules/unplugin/node_modules/picomatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/update-browserslist-db": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
@@ -7833,9 +9365,9 @@
}
},
"node_modules/use-sync-external-store": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz",
- "integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz",
+ "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==",
"license": "MIT",
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
@@ -7847,6 +9379,38 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
"license": "MIT"
},
+ "node_modules/valibot": {
+ "version": "0.38.0",
+ "resolved": "https://registry.npmjs.org/valibot/-/valibot-0.38.0.tgz",
+ "integrity": "sha512-RCJa0fetnzp+h+KN9BdgYOgtsMAG9bfoJ9JSjIhFHobKWVWyzM3jjaeNTdpFK9tQtf3q1sguXeERJ/LcmdFE7w==",
+ "license": "MIT",
+ "peerDependencies": {
+ "typescript": ">=5"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/varuint-bitcoin": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-2.0.0.tgz",
+ "integrity": "sha512-6QZbU/rHO2ZQYpWFDALCDSRsXbAs1VOEmXAxtbtjLtKuMJ/FQ8YbhfxlaiKv5nklci0M6lZtlZyxo9Q+qNnyog==",
+ "license": "MIT",
+ "dependencies": {
+ "uint8array-tools": "^0.0.8"
+ }
+ },
+ "node_modules/varuint-bitcoin/node_modules/uint8array-tools": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/uint8array-tools/-/uint8array-tools-0.0.8.tgz",
+ "integrity": "sha512-xS6+s8e0Xbx++5/0L+yyexukU7pz//Yg6IHg3BKhXotg1JcYtgxVcUctQ0HxLByiJzpAkNFawz1Nz5Xadzo82g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
"node_modules/vaul": {
"version": "0.9.9",
"resolved": "https://registry.npmjs.org/vaul/-/vaul-0.9.9.tgz",
@@ -7883,9 +9447,9 @@
}
},
"node_modules/vite": {
- "version": "6.3.5",
- "resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz",
- "integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
+ "version": "6.4.1",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
+ "integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7958,17 +9522,17 @@
}
},
"node_modules/vite-node": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.1.4.tgz",
- "integrity": "sha512-6enNwYnpyDo4hEgytbmc6mYWHXDHYEn0D1/rw4Q+tnHUGtKTJsn8T1YkX6Q18wI5LCrS8CTYlBaiCqxOy2kvUA==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz",
+ "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==",
"dev": true,
"license": "MIT",
"dependencies": {
"cac": "^6.7.14",
- "debug": "^4.4.0",
+ "debug": "^4.4.1",
"es-module-lexer": "^1.7.0",
"pathe": "^2.0.3",
- "vite": "^5.0.0 || ^6.0.0"
+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0"
},
"bin": {
"vite-node": "vite-node.mjs"
@@ -7980,61 +9544,35 @@
"url": "https://opencollective.com/vitest"
}
},
- "node_modules/vite/node_modules/fdir": {
- "version": "6.4.5",
- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.5.tgz",
- "integrity": "sha512-4BG7puHpVsIYxZUbiUE3RqGloLaSSwzYie5jvasC4LWuBWzZawynvYouhjbQKw2JuIGYdm0DzIxl8iVidKlUEw==",
- "dev": true,
- "license": "MIT",
- "peerDependencies": {
- "picomatch": "^3 || ^4"
- },
- "peerDependenciesMeta": {
- "picomatch": {
- "optional": true
- }
- }
- },
- "node_modules/vite/node_modules/picomatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
"node_modules/vitest": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.1.4.tgz",
- "integrity": "sha512-Ta56rT7uWxCSJXlBtKgIlApJnT6e6IGmTYxYcmxjJ4ujuZDI59GUQgVDObXXJujOmPDBYXHK1qmaGtneu6TNIQ==",
+ "version": "3.2.4",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz",
+ "integrity": "sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/expect": "3.1.4",
- "@vitest/mocker": "3.1.4",
- "@vitest/pretty-format": "^3.1.4",
- "@vitest/runner": "3.1.4",
- "@vitest/snapshot": "3.1.4",
- "@vitest/spy": "3.1.4",
- "@vitest/utils": "3.1.4",
+ "@types/chai": "^5.2.2",
+ "@vitest/expect": "3.2.4",
+ "@vitest/mocker": "3.2.4",
+ "@vitest/pretty-format": "^3.2.4",
+ "@vitest/runner": "3.2.4",
+ "@vitest/snapshot": "3.2.4",
+ "@vitest/spy": "3.2.4",
+ "@vitest/utils": "3.2.4",
"chai": "^5.2.0",
- "debug": "^4.4.0",
+ "debug": "^4.4.1",
"expect-type": "^1.2.1",
"magic-string": "^0.30.17",
"pathe": "^2.0.3",
+ "picomatch": "^4.0.2",
"std-env": "^3.9.0",
"tinybench": "^2.9.0",
"tinyexec": "^0.3.2",
- "tinyglobby": "^0.2.13",
- "tinypool": "^1.0.2",
+ "tinyglobby": "^0.2.14",
+ "tinypool": "^1.1.1",
"tinyrainbow": "^2.0.0",
- "vite": "^5.0.0 || ^6.0.0",
- "vite-node": "3.1.4",
+ "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0",
+ "vite-node": "3.2.4",
"why-is-node-running": "^2.3.0"
},
"bin": {
@@ -8050,8 +9588,8 @@
"@edge-runtime/vm": "*",
"@types/debug": "^4.1.12",
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
- "@vitest/browser": "3.1.4",
- "@vitest/ui": "3.1.4",
+ "@vitest/browser": "3.2.4",
+ "@vitest/ui": "3.2.4",
"happy-dom": "*",
"jsdom": "*"
},
@@ -8171,6 +9709,27 @@
"integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==",
"license": "ISC"
},
+ "node_modules/which-typed-array": {
+ "version": "1.1.19",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz",
+ "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==",
+ "license": "MIT",
+ "dependencies": {
+ "available-typed-arrays": "^1.0.7",
+ "call-bind": "^1.0.8",
+ "call-bound": "^1.0.4",
+ "for-each": "^0.3.5",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-tostringtag": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/why-is-node-running": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz",
@@ -8188,6 +9747,15 @@
"node": ">=8"
}
},
+ "node_modules/wif": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/wif/-/wif-5.0.0.tgz",
+ "integrity": "sha512-iFzrC/9ne740qFbNjTZ2FciSRJlHIXoxqk/Y5EnE08QOXu1WjJyCCswwDTYbohAOEnlCtLaAAQBhyaLRFh2hMA==",
+ "license": "MIT",
+ "dependencies": {
+ "bs58check": "^4.0.0"
+ }
+ },
"node_modules/word-wrap": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz",
@@ -8275,9 +9843,9 @@
}
},
"node_modules/wrap-ansi/node_modules/ansi-styles": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+ "version": "6.2.3",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
+ "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
"license": "MIT",
"engines": {
"node": ">=12"
@@ -8290,6 +9858,10 @@
"version": "8.18.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
+<<<<<<< HEAD
+=======
+ "dev": true,
+>>>>>>> main
"license": "MIT",
"engines": {
"node": ">=10.0.0"
@@ -8330,18 +9902,6 @@
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"license": "ISC"
},
- "node_modules/yaml": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz",
- "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==",
- "license": "ISC",
- "bin": {
- "yaml": "bin.mjs"
- },
- "engines": {
- "node": ">= 14"
- }
- },
"node_modules/yargs": {
"version": "15.4.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz",
@@ -8484,9 +10044,9 @@
}
},
"node_modules/zod": {
- "version": "3.25.71",
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.71.tgz",
- "integrity": "sha512-BsBc/NPk7h8WsUWYWYL+BajcJPY8YhjelaWu2NMLuzgraKAz4Lb4/6K11g9jpuDetjMiqhZ6YaexFLOC0Ogi3Q==",
+ "version": "3.25.76",
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
+ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
diff --git a/package.json b/package.json
index 762d854..52b452c 100644
--- a/package.json
+++ b/package.json
@@ -7,9 +7,10 @@
"dev": "npm i --silent && vite",
"build": "npm i --silent && vite build -l error && cp dist/index.html dist/404.html && echo 'Project built successfully!'",
"test": "npm i --silent && tsc --noEmit && eslint && vitest run --reporter=dot --silent && vite build -l error && cp dist/index.html dist/404.html && echo 'All tests passed!'",
- "deploy": "npm run build && npx -y nostr-deploy-cli deploy --skip-setup"
+ "deploy": "npm i --silent && npm run build && npx -y nostr-deploy-cli deploy --skip-setup"
},
"dependencies": {
+ "@bitcoinerlab/secp256k1": "^1.2.0",
"@fontsource-variable/inter": "^5.2.6",
"@getalby/sdk": "^5.1.1",
"@hookform/resolvers": "^3.9.0",
@@ -42,19 +43,28 @@
"@radix-ui/react-toggle": "^1.1.0",
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.4",
+ "@scure/bip39": "^2.0.0",
"@tanstack/react-query": "^5.56.2",
"@unhead/addons": "^2.0.10",
"@unhead/react": "^2.0.10",
+ "@vulpemventures/secp256k1-zkp": "^3.2.1",
+ "bitcoinjs-lib": "^7.0.0",
+ "boltz-core": "^3.0.0",
"buffer": "^6.0.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
+ "coco-cashu-core": "1.0.0-rc.17",
+ "coco-cashu-indexeddb": "1.0.0-rc.17",
"date-fns": "^3.6.0",
+ "ecpair": "^3.0.0",
"embla-carousel-react": "^8.3.0",
"idb": "^8.0.3",
+ "html5-qrcode": "^2.3.8",
"input-otp": "^1.2.4",
"lucide-react": "^0.462.0",
"nostr-tools": "^2.13.0",
+ "npubcash-sdk": "^0.2.0",
"qrcode": "^1.5.4",
"react": "^18.3.1",
"react-day-picker": "^8.10.1",
@@ -74,6 +84,7 @@
"@html-eslint/eslint-plugin": "^0.41.0",
"@html-eslint/parser": "^0.41.0",
"@tailwindcss/typography": "^0.5.15",
+ "@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@types/node": "^22.5.5",
diff --git a/public/icon-192.png b/public/icon-192.png
new file mode 100644
index 0000000..55dfa62
Binary files /dev/null and b/public/icon-192.png differ
diff --git a/public/icon-512.png b/public/icon-512.png
new file mode 100644
index 0000000..dcf0f05
Binary files /dev/null and b/public/icon-512.png differ
diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest
new file mode 100644
index 0000000..a06805e
--- /dev/null
+++ b/public/manifest.webmanifest
@@ -0,0 +1,21 @@
+{
+ "name": "NutStack",
+ "short_name": "NutStack",
+ "description": "Nostr application with Cashu wallet integration",
+ "start_url": "/",
+ "display": "standalone",
+ "background_color": "#000000",
+ "theme_color": "#000000",
+ "icons": [
+ {
+ "src": "/icon-192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ },
+ {
+ "src": "/icon-512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/public/sw.js b/public/sw.js
new file mode 100644
index 0000000..2a71498
--- /dev/null
+++ b/public/sw.js
@@ -0,0 +1,33 @@
+// public/sw.js
+
+self.addEventListener("push", (event) => {
+ if (!event.data) return;
+
+ try {
+ const data = event.data.json();
+
+ const title = data.title || "New Notification";
+ const options = {
+ body: data.body,
+ icon: data.icon || "/icon-192.png"
+ // badge: data.badge || "/badge-72x72.png",
+ // data: data.data || {},
+ };
+
+ event.waitUntil(
+ self.registration.showNotification(title, options)
+ );
+ } catch (err) {
+ console.error("Push event error:", err);
+ }
+});
+
+self.addEventListener("notificationclick", (event) => {
+ event.notification.close();
+
+ // If you send a `url` in payload.data, open it
+ const url = event.notification.data?.url;
+ if (url) {
+ event.waitUntil(clients.openWindow(url));
+ }
+});
diff --git a/src/App.tsx b/src/App.tsx
index 88f0bf2..c5c8415 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -33,7 +33,7 @@ const queryClient = new QueryClient({
});
const defaultConfig: AppConfig = {
- theme: "light",
+ theme: "system",
relayUrl: "wss://relay.ditto.pub",
};
diff --git a/src/AppRouter.tsx b/src/AppRouter.tsx
index c6532c2..71fcd99 100644
--- a/src/AppRouter.tsx
+++ b/src/AppRouter.tsx
@@ -5,6 +5,7 @@ import Index from "./pages/Index";
import Messages from "./pages/Messages";
import { NIP19Page } from "./pages/NIP19Page";
import NotFound from "./pages/NotFound";
+import { WalletContainer } from "./components/wallet/WalletContainer";
export function AppRouter() {
return (
@@ -13,6 +14,7 @@ export function AppRouter() {
} />
} />
+ } />
{/* NIP-19 route for npub1, note1, naddr1, nevent1, nprofile1 */}
} />
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
diff --git a/src/components/WalletModal.tsx b/src/components/WalletModal.tsx
index 280052c..cee4d04 100644
--- a/src/components/WalletModal.tsx
+++ b/src/components/WalletModal.tsx
@@ -1,5 +1,5 @@
import { useState, forwardRef } from 'react';
-import { Wallet, Plus, Trash2, Zap, Globe, WalletMinimal, CheckCircle, X } from 'lucide-react';
+import { Wallet, Plus, Trash2, Zap, Globe, WalletMinimal, CheckCircle, X, Coins } from 'lucide-react';
import { Button } from '@/components/ui/button';
import {
Dialog,
@@ -26,12 +26,13 @@ import { Badge } from '@/components/ui/badge';
import { Separator } from '@/components/ui/separator';
import { useNWC } from '@/hooks/useNWCContext';
import { useWallet } from '@/hooks/useWallet';
+import { useCashu } from '@/hooks/wallet/useCashu';
import { useToast } from '@/hooks/useToast';
import { useIsMobile } from '@/hooks/useIsMobile';
import type { NWCConnection, NWCInfo } from '@/hooks/useNWC';
import type { WebLNProvider } from "@webbtc/webln-types";
-interface WalletModalProps {
+interface LightningWalletModalProps {
children?: React.ReactNode;
className?: string;
}
@@ -74,6 +75,8 @@ const WalletContent = forwardRef;
activeConnection: string | null;
+ cashuBalance: number;
+ isCashuInitialized: boolean;
handleSetActive: (cs: string) => void;
handleRemoveConnection: (cs: string) => void;
setAddDialogOpen: (open: boolean) => void;
@@ -83,14 +86,43 @@ const WalletContent = forwardRef (
- {/* Current Status */}
+ {/* Primary Payment Method - Cashu */}
-
Current Status
+
Primary Wallet
+
+
+
+
+
Cashu Wallet
+
+ {isCashuInitialized
+ ? `${cashuBalance.toLocaleString()} sats available`
+ : "Instant Bitcoin payments"
+ }
+
+
+
+
+ {isCashuInitialized && }
+
+ {isCashuInitialized ? "Active" : "Not Set Up"}
+
+
+
+
+
+
+
+ {/* Lightning Fallback Methods */}
+
+
Other Options
{/* WebLN */}
@@ -190,12 +222,12 @@ const WalletContent = forwardRef
{/* Help */}
- {!webln && connections.length === 0 && (
+ {!isCashuInitialized && !webln && connections.length === 0 && (
<>
- Install a WebLN extension or connect a NWC wallet for zaps.
+ Set up your Cashu wallet for instant payments, or install a WebLN extension/connect NWC wallet for Lightning
>
@@ -204,7 +236,7 @@ const WalletContent = forwardRef 0 && connections.some(c => c.isConnected);
+ const cashuBalance = Object.values(balances).reduce((sum, balance) => sum + balance, 0);
const { toast } = useToast();
const handleAddConnection = async () => {
@@ -267,6 +301,8 @@ export function WalletModal({ children, className }: WalletModalProps) {
connections,
connectionInfo,
activeConnection,
+ cashuBalance,
+ isCashuInitialized,
handleSetActive,
handleRemoveConnection,
setAddDialogOpen,
@@ -308,7 +344,7 @@ export function WalletModal({ children, className }: WalletModalProps) {
{children || (
- Wallet Settings
+ Payment Settings
)}
@@ -322,10 +358,10 @@ export function WalletModal({ children, className }: WalletModalProps) {
- Lightning Wallet
+ Payment Settings
- Connect your lightning wallet to send zaps instantly.
+ Manage wallet methods for zaps
@@ -370,7 +406,7 @@ export function WalletModal({ children, className }: WalletModalProps) {
{children || (
- Wallet Settings
+ Payment Settings
)}
@@ -378,10 +414,10 @@ export function WalletModal({ children, className }: WalletModalProps) {
- Lightning Wallet
+ Payment Settings
- Connect your lightning wallet to send zaps instantly.
+ Manage wallet methods for zaps
diff --git a/src/components/ZapButton.tsx b/src/components/ZapButton.tsx
index bb3bbd8..f9e8132 100644
--- a/src/components/ZapButton.tsx
+++ b/src/components/ZapButton.tsx
@@ -1,10 +1,40 @@
-import { ZapDialog } from '@/components/ZapDialog';
-import { useZaps } from '@/hooks/useZaps';
-import { useWallet } from '@/hooks/useWallet';
+import { useState, useEffect, useRef, forwardRef } from 'react';
+import { Zap, Copy, Check, ExternalLink, Sparkle, Sparkles, Star, Rocket, ArrowLeft, X, Coins } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+import { cn } from '@/lib/utils';
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+ DialogTrigger,
+} from '@/components/ui/dialog';
+import {
+ Drawer,
+ DrawerContent,
+ DrawerDescription,
+ DrawerHeader,
+ DrawerTitle,
+ DrawerTrigger,
+ DrawerClose,
+} from '@/components/ui/drawer';
+import { Input } from '@/components/ui/input';
+import { Label } from '@/components/ui/label';
+import { Textarea } from '@/components/ui/textarea';
+import { Card, CardContent } from '@/components/ui/card';
+import { Separator } from '@/components/ui/separator';
+import { ToggleGroup, ToggleGroupItem } from '@/components/ui/toggle-group';
import { useCurrentUser } from '@/hooks/useCurrentUser';
import { useAuthor } from '@/hooks/useAuthor';
-import { Zap } from 'lucide-react';
+import { useToast } from '@/hooks/useToast';
+import { useZaps } from '@/hooks/useZaps';
+import { useWallet } from '@/hooks/useWallet';
+import { useCashu } from '@/hooks/wallet/useCashu';
+import { useIsMobile } from '@/hooks/useIsMobile';
import type { Event } from 'nostr-tools';
+import QRCode from 'qrcode';
+import type { WebLNProvider } from "@webbtc/webln-types";
interface ZapButtonProps {
target: Event;
@@ -13,15 +43,276 @@ interface ZapButtonProps {
zapData?: { count: number; totalSats: number; isLoading?: boolean };
}
+const presetAmounts = [
+ { amount: 1, icon: Sparkle },
+ { amount: 50, icon: Sparkles },
+ { amount: 100, icon: Zap },
+ { amount: 250, icon: Star },
+ { amount: 1000, icon: Rocket },
+];
+
+interface ZapContentProps {
+ invoice: string | null;
+ amount: number | string;
+ comment: string;
+ isZapping: boolean;
+ qrCodeUrl: string;
+ copied: boolean;
+ webln: WebLNProvider | null;
+ canPayWithCashu: boolean;
+ cashuBalance: number;
+ handleZap: () => void;
+ handleCopy: () => void;
+ openInWallet: () => void;
+ setAmount: (amount: number | string) => void;
+ setComment: (comment: string) => void;
+ inputRef: React.RefObject
;
+ zap: (amount: number, comment: string) => void;
+}
+
+const ZapContent = forwardRef(({
+ invoice,
+ amount,
+ comment,
+ isZapping,
+ qrCodeUrl,
+ copied,
+ webln,
+ canPayWithCashu,
+ cashuBalance,
+ handleZap,
+ handleCopy,
+ openInWallet,
+ setAmount,
+ setComment,
+ inputRef,
+ zap,
+}, ref) => (
+
+ {invoice ? (
+
+ {/* Payment amount display */}
+
+
+
+
+
+ {/* QR Code */}
+
+
+
+ {qrCodeUrl ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ {/* Invoice input */}
+
+
Lightning Invoice
+
+ e.currentTarget.select()}
+ />
+
+ {copied ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ {/* Payment buttons */}
+
+ {/* Primary Lightning payment button - powered by Cashu when available */}
+
{
+ const finalAmount = typeof amount === 'string' ? parseInt(amount, 10) : amount;
+ zap(finalAmount, comment);
+ }}
+ disabled={isZapping}
+ className="w-full"
+ size="lg"
+ >
+ {canPayWithCashu ? (
+ <>
+
+ {isZapping ? "Processing..." : `Pay with Cashu (${cashuBalance.toLocaleString()} sats)`}
+ >
+ ) : (
+ <>
+
+ {isZapping ? "Processing..." : "Pay with Lightning"}
+ >
+ )}
+
+
+ {/* WebLN fallback button */}
+ {webln && (
+
{
+ const finalAmount = typeof amount === 'string' ? parseInt(amount, 10) : amount;
+ zap(finalAmount, comment);
+ }}
+ disabled={isZapping}
+ className="w-full"
+ size="lg"
+ >
+
+ {isZapping ? "Processing..." : "Pay with WebLN"}
+
+ )}
+
+
+
+ Open in Lightning Wallet
+
+
+
+ {canPayWithCashu
+ ? "Pay Lightning invoice using your Cashu token balance, or scan QR code manually."
+ : "Scan the QR code or copy the invoice to pay with any Lightning wallet."
+ }
+
+
+
+
+ ) : (
+ <>
+ {/* Cashu balance indicator */}
+ {canPayWithCashu && (
+
+
+
+ Pay with Cashu Balance: {cashuBalance.toLocaleString()} sats
+
+
+ )}
+
+
+
{
+ if (value) {
+ setAmount(parseInt(value, 10));
+ }
+ }}
+ className="grid grid-cols-5 gap-1 w-full"
+ >
+ {presetAmounts.map(({ amount: presetAmount, icon: Icon }) => (
+ cashuBalance}
+ >
+
+ {presetAmount}
+
+ ))}
+
+
+
setAmount(e.target.value)}
+ className="w-full text-sm"
+ max={canPayWithCashu ? cashuBalance : undefined}
+ />
+
+
+ cashuBalance)}
+ size="default"
+ >
+ {isZapping ? (
+ 'Creating Lightning invoice...'
+ ) : canPayWithCashu ? (
+ <>
+
+ Zap {amount} sats (Cashu → Lightning)
+ >
+ ) : (
+ <>
+
+ Zap {amount} sats
+ >
+ )}
+
+
+ >
+ )}
+
+));
+ZapContent.displayName = 'ZapContent';
+
export function ZapButton({
target,
className = "text-xs ml-1",
showCount = true,
zapData: externalZapData
}: ZapButtonProps) {
+ const [open, setOpen] = useState(false);
const { user } = useCurrentUser();
const { data: author } = useAuthor(target?.pubkey || '');
+ const { toast } = useToast();
const { webln, activeNWC } = useWallet();
+ const { zap, isZapping, invoice, setInvoice } = useZaps(target, webln, activeNWC, () => setOpen(false));
+ const { balances, mints, isInitialized: isCashuInitialized } = useCashu();
+ const [amount, setAmount] = useState(100);
+ const [comment, setComment] = useState('');
+ const [copied, setCopied] = useState(false);
+ const [qrCodeUrl, setQrCodeUrl] = useState('');
+ const inputRef = useRef(null);
+ const isMobile = useIsMobile();
+
+ // Check if Cashu wallet is available and has balance
+ const canPayWithCashu = isCashuInitialized && mints.some(mint => (balances[mint.url] || 0) > 0);
+ const cashuBalance = Object.values(balances).reduce((sum, balance) => sum + balance, 0);
// Only fetch data if not provided externally
const { totalSats: fetchedTotalSats, isLoading } = useZaps(
@@ -30,29 +321,245 @@ export function ZapButton({
activeNWC
);
+ // Use external data if provided, otherwise use fetched data
+ const totalSats = externalZapData?.totalSats ?? fetchedTotalSats;
+ const showLoading = externalZapData?.isLoading || isLoading;
+
+ useEffect(() => {
+ if (target) {
+ setComment('Zapped with MKStack!');
+ }
+ }, [target]);
+
+ // Generate QR code
+ useEffect(() => {
+ let isCancelled = false;
+
+ const generateQR = async () => {
+ if (!invoice) {
+ setQrCodeUrl('');
+ return;
+ }
+
+ try {
+ const url = await QRCode.toDataURL(invoice.toUpperCase(), {
+ width: 512,
+ margin: 2,
+ color: {
+ dark: '#000000',
+ light: '#FFFFFF',
+ },
+ });
+
+ if (!isCancelled) {
+ setQrCodeUrl(url);
+ }
+ } catch (err) {
+ if (!isCancelled) {
+ console.error('Failed to generate QR code:', err);
+ }
+ }
+ };
+
+ generateQR();
+
+ return () => {
+ isCancelled = true;
+ };
+ }, [invoice]);
+
+ const handleCopy = async () => {
+ if (invoice) {
+ await navigator.clipboard.writeText(invoice);
+ setCopied(true);
+ toast({
+ title: 'Invoice copied',
+ description: 'Lightning invoice copied to clipboard',
+ });
+ setTimeout(() => setCopied(false), 2000);
+ }
+ };
+
+ const openInWallet = () => {
+ if (invoice) {
+ const lightningUrl = `lightning:${invoice}`;
+ window.open(lightningUrl, '_blank');
+ }
+ };
+
+ useEffect(() => {
+ if (open) {
+ setAmount(100);
+ setInvoice(null);
+ setCopied(false);
+ setQrCodeUrl('');
+ } else {
+ setAmount(100);
+ setInvoice(null);
+ setCopied(false);
+ setQrCodeUrl('');
+ }
+ }, [open, setInvoice]);
+
+ const handleZap = () => {
+ const finalAmount = typeof amount === 'string' ? parseInt(amount, 10) : amount;
+ if (canPayWithCashu && finalAmount > cashuBalance) {
+ toast({
+ title: 'Insufficient Cashu balance',
+ description: `You only have ${cashuBalance} sats available.`,
+ variant: 'destructive',
+ });
+ return;
+ }
+ zap(finalAmount, comment);
+ };
+
+ const contentProps = {
+ invoice,
+ amount,
+ comment,
+ isZapping,
+ qrCodeUrl,
+ copied,
+ webln,
+ canPayWithCashu,
+ cashuBalance,
+ handleZap,
+ handleCopy,
+ openInWallet,
+ setAmount,
+ setComment,
+ inputRef,
+ zap,
+ };
+
// Don't show zap button if user is not logged in, is the author, or author has no lightning address
if (!user || !target || user.pubkey === target.pubkey || (!author?.metadata?.lud16 && !author?.metadata?.lud06)) {
return null;
}
- // Use external data if provided, otherwise use fetched data
- const totalSats = externalZapData?.totalSats ?? fetchedTotalSats;
- const showLoading = externalZapData?.isLoading || isLoading;
+ if (isMobile) {
+ return (
+
+
+
+
+
+
+ {showLoading ? (
+ '...'
+ ) : showCount && totalSats > 0 ? (
+ `${totalSats.toLocaleString()}`
+ ) : (
+ 'Zap'
+ )}
+
+
+
+
+
+
+ {/* Back button when showing invoice */}
+ {invoice && (
+ {
+ setInvoice(null);
+ setQrCodeUrl('');
+ }}
+ className="absolute left-4 top-4 flex items-center gap-2"
+ >
+
+
+ )}
+
+ {/* Close button */}
+
+
+
+ Close
+
+
+
+
+ {invoice ? 'Lightning Payment' : 'Send a Zap'}
+
+
+ {invoice ? (
+ 'Pay with Bitcoin Lightning Network'
+ ) : (
+ canPayWithCashu
+ ? 'Pay Lightning invoices using your Cashu token balance. Zaps support the creator of this item!'
+ : 'Zaps are small Bitcoin payments that support the creator of this item. If you enjoyed this, consider sending a zap!'
+ )}
+
+
+
+
+
+
+
+ );
+ }
return (
-
-
-
-
- {showLoading ? (
- '...'
- ) : showCount && totalSats > 0 ? (
- `${totalSats.toLocaleString()}`
- ) : (
- 'Zap'
- )}
-
-
-
+
+
+
+
+
+
+ {showLoading ? (
+ '...'
+ ) : showCount && totalSats > 0 ? (
+ `${totalSats.toLocaleString()}`
+ ) : (
+ 'Zap'
+ )}
+
+
+
+
+
+
+
+ {invoice ? 'Lightning Payment' : 'Send a Zap'}
+
+
+ {invoice ? (
+ 'Pay with Bitcoin Lightning Network'
+ ) : (
+ canPayWithCashu
+ ? 'Pay Lightning invoices using your Cashu token balance. Zaps support the creator of this item!'
+ : 'Zaps are small Bitcoin payments that support the creator of this item. If you enjoyed this, consider sending a zap!'
+ )}
+
+
+
+
+
+
+
);
}
\ No newline at end of file
diff --git a/src/components/ZapDialog.tsx b/src/components/ZapDialog.tsx
index c50bf20..2b55eff 100644
--- a/src/components/ZapDialog.tsx
+++ b/src/components/ZapDialog.tsx
@@ -1,5 +1,5 @@
import { useState, useEffect, useRef, forwardRef } from 'react';
-import { Zap, Copy, Check, ExternalLink, Sparkle, Sparkles, Star, Rocket, ArrowLeft, X } from 'lucide-react';
+import { Zap, Copy, Check, ExternalLink, Sparkle, Sparkles, Star, Rocket, ArrowLeft, X, Coins } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import {
@@ -30,6 +30,7 @@ import { useAuthor } from '@/hooks/useAuthor';
import { useToast } from '@/hooks/useToast';
import { useZaps } from '@/hooks/useZaps';
import { useWallet } from '@/hooks/useWallet';
+import { useCashu } from '@/hooks/wallet/useCashu';
import { useIsMobile } from '@/hooks/useIsMobile';
import type { Event } from 'nostr-tools';
import QRCode from 'qrcode';
@@ -57,6 +58,9 @@ interface ZapContentProps {
qrCodeUrl: string;
copied: boolean;
webln: WebLNProvider | null;
+ // Cashu-related props
+ canPayWithCashu: boolean;
+ cashuBalance: number;
handleZap: () => void;
handleCopy: () => void;
openInWallet: () => void;
@@ -75,6 +79,8 @@ const ZapContent = forwardRef(({
qrCodeUrl,
copied,
webln,
+ canPayWithCashu,
+ cashuBalance,
handleZap,
handleCopy,
openInWallet,
@@ -139,8 +145,33 @@ const ZapContent = forwardRef(({
{/* Payment buttons */}
+ {/* Primary Lightning payment button - powered by Cashu when available */}
+
{
+ const finalAmount = typeof amount === 'string' ? parseInt(amount, 10) : amount;
+ zap(finalAmount, comment);
+ }}
+ disabled={isZapping}
+ className="w-full"
+ size="lg"
+ >
+ {canPayWithCashu ? (
+ <>
+
+ {isZapping ? "Processing..." : `Pay with Cashu (${cashuBalance.toLocaleString()} sats)`}
+ >
+ ) : (
+ <>
+
+ {isZapping ? "Processing..." : "Pay with Lightning"}
+ >
+ )}
+
+
+ {/* WebLN fallback button */}
{webln && (
{
const finalAmount = typeof amount === 'string' ? parseInt(amount, 10) : amount;
zap(finalAmount, comment);
@@ -165,13 +196,26 @@ const ZapContent = forwardRef(({
- Scan the QR code or copy the invoice to pay with any Lightning wallet.
+ {canPayWithCashu
+ ? "Pay Lightning invoice using your Cashu token balance, or scan QR code manually."
+ : "Scan the QR code or copy the invoice to pay with any Lightning wallet."
+ }
) : (
<>
+ {/* Cashu balance indicator */}
+ {canPayWithCashu && (
+
+
+
+ Pay with Cashu Balance: {cashuBalance.toLocaleString()} sats
+
+
+ )}
+
(({
key={presetAmount}
value={String(presetAmount)}
className="flex flex-col h-auto min-w-0 text-xs px-1 py-2"
+ disabled={canPayWithCashu && presetAmount > cashuBalance}
>
{presetAmount}
@@ -207,6 +252,7 @@ const ZapContent = forwardRef(({
value={amount}
onChange={(e) => setAmount(e.target.value)}
className="w-full text-sm"
+ max={canPayWithCashu ? cashuBalance : undefined}
/>
-
+ cashuBalance)}
+ size="default"
+ >
{isZapping ? (
- 'Creating invoice...'
+ 'Creating Lightning invoice...'
+ ) : canPayWithCashu ? (
+ <>
+
+ Zap {amount} sats (Cashu → Lightning)
+ >
) : (
<>
@@ -242,6 +298,7 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) {
const { toast } = useToast();
const { webln, activeNWC } = useWallet();
const { zap, isZapping, invoice, setInvoice } = useZaps(target, webln, activeNWC, () => setOpen(false));
+ const { balances, mints, isInitialized: isCashuInitialized } = useCashu();
const [amount, setAmount] = useState(100);
const [comment, setComment] = useState('');
const [copied, setCopied] = useState(false);
@@ -249,6 +306,10 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) {
const inputRef = useRef(null);
const isMobile = useIsMobile();
+ // Check if Cashu wallet is available and has balance
+ const canPayWithCashu = isCashuInitialized && mints.some(mint => (balances[mint.url] || 0) > 0);
+ const cashuBalance = Object.values(balances).reduce((sum, balance) => sum + balance, 0);
+
useEffect(() => {
if (target) {
setComment('Zapped with MKStack!');
@@ -328,6 +389,25 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) {
const handleZap = () => {
const finalAmount = typeof amount === 'string' ? parseInt(amount, 10) : amount;
+
+ // Validate the amount
+ if (isNaN(finalAmount) || finalAmount <= 0) {
+ toast({
+ title: 'Invalid amount',
+ description: 'Please enter a valid amount greater than 0.',
+ variant: 'destructive',
+ });
+ return;
+ }
+
+ if (canPayWithCashu && finalAmount > cashuBalance) {
+ toast({
+ title: 'Insufficient Cashu balance',
+ description: `You only have ${cashuBalance} sats available.`,
+ variant: 'destructive',
+ });
+ return;
+ }
zap(finalAmount, comment);
};
@@ -339,6 +419,8 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) {
qrCodeUrl,
copied,
webln,
+ canPayWithCashu,
+ cashuBalance,
handleZap,
handleCopy,
openInWallet,
@@ -420,7 +502,9 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) {
{invoice ? (
'Pay with Bitcoin Lightning Network'
) : (
- 'Zaps are small Bitcoin payments that support the creator of this item. If you enjoyed this, consider sending a zap!'
+ canPayWithCashu
+ ? 'Pay Lightning invoices using your Cashu token balance. Zaps support the creator of this item!'
+ : 'Zaps are small Bitcoin payments that support the creator of this item. If you enjoyed this, consider sending a zap!'
)}
@@ -448,9 +532,9 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) {
{invoice ? (
'Pay with Bitcoin Lightning Network'
) : (
- <>
- Zaps are small Bitcoin payments that support the creator of this item. If you enjoyed this, consider sending a zap!
- >
+ canPayWithCashu
+ ? 'Pay Lightning invoices using your Cashu token balance. Zaps support the creator of this item!'
+ : 'Zaps are small Bitcoin payments that support the creator of this item. If you enjoyed this, consider sending a zap!'
)}
diff --git a/src/components/auth/AccountSwitcher.tsx b/src/components/auth/AccountSwitcher.tsx
index 9b4783b..67bc3a5 100644
--- a/src/components/auth/AccountSwitcher.tsx
+++ b/src/components/auth/AccountSwitcher.tsx
@@ -11,7 +11,7 @@ import {
} from '@/components/ui/dropdown-menu.tsx';
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar.tsx';
import { RelaySelector } from '@/components/RelaySelector';
-import { WalletModal } from '@/components/WalletModal';
+import { LightningWalletModal } from '@/components/WalletModal';
import { useLoggedInAccounts, type Account } from '@/hooks/useLoggedInAccounts';
import { genUserName } from '@/lib/genUserName';
@@ -64,15 +64,15 @@ export function AccountSwitcher({ onAddAccountClick }: AccountSwitcherProps) {
))}
-
+
e.preventDefault()}
>
- Wallet Settings
+ Payment Settings
-
+
= ({ isOpen, onClose, onLogin, onS
return (
@@ -190,7 +190,7 @@ const LoginDialog: React.FC = ({ isOpen, onClose, onLogin, onS
Sign up or log in to continue
-
+
{/* Prominent Sign Up Section */}
diff --git a/src/components/auth/LoginIcon.tsx b/src/components/auth/LoginIcon.tsx
new file mode 100644
index 0000000..fb66baf
--- /dev/null
+++ b/src/components/auth/LoginIcon.tsx
@@ -0,0 +1,50 @@
+import { useState } from 'react';
+import { User } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+import LoginDialog from './LoginDialog';
+import SignupDialog from './SignupDialog';
+import { useLoggedInAccounts } from '@/hooks/useLoggedInAccounts';
+import { AccountSwitcher } from './AccountSwitcher';
+
+export function LoginIcon() {
+ const { currentUser } = useLoggedInAccounts();
+ const [loginDialogOpen, setLoginDialogOpen] = useState(false);
+ const [signupDialogOpen, setSignupDialogOpen] = useState(false);
+
+ const handleLogin = () => {
+ setLoginDialogOpen(false);
+ setSignupDialogOpen(false);
+ };
+
+ if (currentUser) {
+ return (
+
setLoginDialogOpen(true)} />
+ );
+ }
+
+ return (
+ <>
+ setLoginDialogOpen(true)}
+ variant="ghost"
+ size="sm"
+ className="h-8 w-8 p-0"
+ title="Log in"
+ >
+
+
+
+ setLoginDialogOpen(false)}
+ onLogin={handleLogin}
+ onSignup={() => setSignupDialogOpen(true)}
+ />
+
+ setSignupDialogOpen(false)}
+ />
+ >
+ );
+}
diff --git a/src/components/auth/SignupDialog.tsx b/src/components/auth/SignupDialog.tsx
index b80f333..19cbd24 100644
--- a/src/components/auth/SignupDialog.tsx
+++ b/src/components/auth/SignupDialog.tsx
@@ -301,7 +301,7 @@ const SignupDialog: React.FC = ({ isOpen, onClose, onComplete
{getTitle()}
-
+
{/* Welcome Step - New engaging introduction */}
{step === 'welcome' && (
diff --git a/src/components/ui/loading-screen.tsx b/src/components/ui/loading-screen.tsx
new file mode 100644
index 0000000..d7081ce
--- /dev/null
+++ b/src/components/ui/loading-screen.tsx
@@ -0,0 +1,20 @@
+import { Card, CardContent } from '@/components/ui/card';
+import { Loader2 } from 'lucide-react';
+
+interface LoadingScreenProps {
+ isLoading: boolean;
+}
+
+export function LoadingScreen({ isLoading }: LoadingScreenProps) {
+ if (!isLoading) return null;
+
+ return (
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/components/ui/qr-modal.tsx b/src/components/ui/qr-modal.tsx
new file mode 100644
index 0000000..eb20550
--- /dev/null
+++ b/src/components/ui/qr-modal.tsx
@@ -0,0 +1,145 @@
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
+import { X, Copy, Check, QrCode, Zap, Clock } from 'lucide-react';
+import { useCopyToClipboard } from '@/hooks/useCopyToClipboard';
+import { useEffect, useState } from 'react';
+
+interface QRModalProps {
+ isOpen: boolean;
+ onClose: () => void;
+ title: string;
+ description: string;
+ qrCodeUrl: string;
+ content: string;
+ icon?: 'qr' | 'zap';
+ expiryTimestamp?: number;
+ onExpiry?: () => void;
+}
+
+export function QRModal({
+ isOpen,
+ onClose,
+ title,
+ description,
+ qrCodeUrl,
+ content,
+ icon = 'qr',
+ expiryTimestamp,
+ onExpiry,
+}: QRModalProps) {
+ const { copy, copied } = useCopyToClipboard();
+ const [timeRemaining, setTimeRemaining] = useState
(null);
+
+ const handleCopy = () => {
+ copy(content);
+ };
+
+ // Countdown timer effect
+ useEffect(() => {
+ if (!isOpen || !expiryTimestamp) return;
+
+ const updateTimer = () => {
+ const now = Math.floor(Date.now() / 1000); // Current time in seconds
+ const remaining = expiryTimestamp - now;
+
+ if (remaining <= 0) {
+ setTimeRemaining(0);
+ // Call expiry callback
+ if (onExpiry) {
+ onExpiry();
+ }
+ onClose();
+ } else {
+ setTimeRemaining(remaining);
+ }
+ };
+
+ // Update immediately
+ updateTimer();
+
+ // Then update every second
+ const interval = setInterval(updateTimer, 1000);
+
+ return () => clearInterval(interval);
+ }, [isOpen, expiryTimestamp, onExpiry, onClose]);
+
+ // Format time remaining as MM:SS
+ const formatTime = (seconds: number): string => {
+ const mins = Math.floor(seconds / 60);
+ const secs = seconds % 60;
+ return `${mins}:${secs.toString().padStart(2, '0')}`;
+ };
+
+ if (!isOpen) return null;
+
+ const IconComponent = icon === 'zap' ? Zap : QrCode;
+
+ return (
+
+
e.stopPropagation()}
+ >
+
+
+
+
+
+
+ {title}
+
+
+ {description}
+
+
+
+ {expiryTimestamp && timeRemaining !== null && timeRemaining <= 3600 && (
+
+
+
+ Expires in {formatTime(timeRemaining)}
+
+
+ )}
+
+
+
+
+
+
+
+
+ {content.length > 33
+ ? `${content.substring(0, 15)}...${content.substring(content.length - 15)}`
+ : content}
+
+ {copied ? (
+
+ ) : (
+
+ )}
+
+
+
+
+
+
+
+ );
+}
diff --git a/src/components/ui/slider.tsx b/src/components/ui/slider.tsx
index e161dae..17bd099 100644
--- a/src/components/ui/slider.tsx
+++ b/src/components/ui/slider.tsx
@@ -15,10 +15,10 @@ const Slider = React.forwardRef<
)}
{...props}
>
-
+
-
+
))
Slider.displayName = SliderPrimitive.Root.displayName
diff --git a/src/components/ui/toast.tsx b/src/components/ui/toast.tsx
index a822477..c2da6d8 100644
--- a/src/components/ui/toast.tsx
+++ b/src/components/ui/toast.tsx
@@ -47,6 +47,7 @@ const Toast = React.forwardRef<
)
diff --git a/src/components/wallet/BitcoinWallet.tsx b/src/components/wallet/BitcoinWallet.tsx
new file mode 100644
index 0000000..b9c24ba
--- /dev/null
+++ b/src/components/wallet/BitcoinWallet.tsx
@@ -0,0 +1,412 @@
+import { useState, useEffect, useRef } from 'react';
+import { nip19 } from 'nostr-tools';
+import { useBitcoinBalance, useBitcoinTransactionHistory, useBitcoinOperations } from '@/hooks/wallet/useBitcoin';
+import { useNsecAccess } from '@/hooks/useNsecAccess';
+import { nostrPubkeyToBitcoinAddress } from '@/lib/bitcoin';
+import { QRModal } from '@/components/ui/qr-modal';
+import { TransactionCard } from './PaymentCard';
+import { ConsolidationModal } from './ConsolidationModal';
+import { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from '@/components/ui/drawer';
+import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
+import { TransactionHistory } from './TransactionHistory';
+import { ScrollArea } from '@/components/ui/scroll-area';
+import { ChevronUp, Send, Download, ScanLine } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+import type { QRScanResult } from '@/hooks/wallet/useQRCode';
+
+interface BitcoinWalletProps {
+ toast: ReturnType['toast'];
+ generateQRCode: (text: string) => Promise;
+ copyToClipboard: (text: string) => Promise;
+ user?: { pubkey: string };
+ onRequestQRScanner: () => void;
+ onQRResult?: (result: QRScanResult) => void;
+ onWalletHeaderPropsChange?: (props: any) => void;
+}
+
+export function BitcoinWallet({
+ toast,
+ generateQRCode,
+ copyToClipboard,
+ user,
+ onRequestQRScanner,
+ onQRResult,
+ onWalletHeaderPropsChange,
+}: BitcoinWalletProps) {
+ const { hasNsecAccess } = useNsecAccess();
+ const bitcoinAddress = user?.pubkey ? nostrPubkeyToBitcoinAddress(user.pubkey) : null;
+ const { data: bitcoinBalanceData, isLoading: isBitcoinBalanceLoading } = useBitcoinBalance(bitcoinAddress);
+
+ const {
+ utxos,
+ isConsolidating,
+ bitcoinMaxAmount,
+ fetchBitcoinUtxos,
+ handleSendMax,
+ handleBitcoinSend,
+ handleBitcoinReceive,
+ handleConsolidateUtxos,
+ } = useBitcoinOperations(bitcoinAddress);
+
+ const {
+ data: bitcoinTransactions = [],
+ isLoading: isBitcoinTransactionsLoading
+ } = useBitcoinTransactionHistory(bitcoinAddress);
+
+ // Bitcoin state
+ const [bitcoinAmount, setBitcoinAmount] = useState('');
+ const [bitcoinRecipient, setBitcoinRecipient] = useState('');
+ const [pendingBitcoinRecipient, setPendingBitcoinRecipient] = useState(null);
+ const [showBitcoinAddressQR, setShowBitcoinAddressQR] = useState(false);
+ const [bitcoinAddressQRCode, setBitcoinAddressQRCode] = useState('');
+ const [showConsolidationModal, setShowConsolidationModal] = useState(false);
+ const [showSendModal, setShowSendModal] = useState(false);
+ const [showReceiveModal, setShowReceiveModal] = useState(false);
+ const [showHistoryModal, setShowHistoryModal] = useState(false);
+
+ // UTXO state
+ const [utxoDropdownOpen, setUtxoDropdownOpen] = useState(false);
+
+ // Fetch UTXOs when component mounts
+ useEffect(() => {
+ if (bitcoinAddress) {
+ fetchBitcoinUtxos();
+ }
+ }, [bitcoinAddress, fetchBitcoinUtxos]);
+
+ // Handle drawer close with state reset
+ const handleSendDrawerClose = (open: boolean) => {
+ setShowSendModal(open);
+ if (!open) {
+ setBitcoinAmount('');
+ setBitcoinRecipient('');
+ setPendingBitcoinRecipient(null);
+ }
+ };
+
+ const handleReceiveDrawerClose = (open: boolean) => {
+ setShowReceiveModal(open);
+ };
+
+ // Handle focus management when drawers open
+ useEffect(() => {
+ if (showSendModal || showReceiveModal || showHistoryModal) {
+ const activeElement = document.activeElement as HTMLElement;
+ if (activeElement && activeElement.blur) {
+ activeElement.blur();
+ }
+ }
+ }, [showSendModal, showReceiveModal, showHistoryModal]);
+
+ // Handle QR scan results (called from parent WalletContainer)
+ useEffect(() => {
+ if (!onQRResult) return;
+
+ const handleQRResult = (result: QRScanResult) => {
+ if (result.type === 'bitcoin_address') {
+ setBitcoinRecipient(result.value);
+ setPendingBitcoinRecipient(result.value);
+ setShowSendModal(true);
+ toast({
+ title: "Bitcoin Address Scanned",
+ description: "Enter amount to send",
+ });
+ } else if (result.type === 'npub') {
+ try {
+ const decoded = nip19.decode(result.value);
+ if (decoded.type === 'npub') {
+ const address = nostrPubkeyToBitcoinAddress(decoded.data);
+ setBitcoinRecipient(address);
+ setPendingBitcoinRecipient(address);
+ setShowSendModal(true);
+ toast({
+ title: "Nostr npub Scanned",
+ description: "Enter amount to send",
+ });
+ }
+ } catch (err) {
+ toast({
+ variant: "destructive",
+ title: "Invalid npub",
+ description: "Could not decode npub",
+ });
+ }
+ }
+ };
+
+ // Store handler for parent to call
+ (window as any).__bitcoinWalletQRHandler = handleQRResult;
+ return () => {
+ delete (window as any).__bitcoinWalletQRHandler;
+ };
+ }, [onQRResult, toast]);
+
+ const totalBalance = bitcoinBalanceData?.balance || 0;
+
+ // Expose WalletHeader props to parent WalletContainer
+ // Use ref to track previous values and prevent infinite loops
+ const prevPropsRef = useRef<{
+ utxosLength?: number;
+ utxoDropdownOpen?: boolean;
+ isConsolidating?: boolean;
+ }>({});
+
+ useEffect(() => {
+ if (!onWalletHeaderPropsChange) return;
+
+ // Check if values actually changed
+ const currentProps = {
+ utxosLength: utxos?.length,
+ utxoDropdownOpen,
+ isConsolidating,
+ };
+
+ const prevProps = prevPropsRef.current;
+ const hasChanged =
+ prevProps.utxosLength !== currentProps.utxosLength ||
+ prevProps.utxoDropdownOpen !== currentProps.utxoDropdownOpen ||
+ prevProps.isConsolidating !== currentProps.isConsolidating;
+
+ if (!hasChanged && Object.keys(prevProps).length > 0) {
+ // Values haven't changed, skip update
+ return;
+ }
+
+ // Update ref
+ prevPropsRef.current = currentProps;
+
+ // Send updated props
+ onWalletHeaderPropsChange({
+ utxos,
+ utxoDropdownOpen,
+ setUtxoDropdownOpen,
+ onShowConsolidationModal: () => setShowConsolidationModal(true),
+ isConsolidating,
+ onShowBitcoinAddressQR: async (qr: string) => {
+ setBitcoinAddressQRCode(qr);
+ setShowBitcoinAddressQR(true);
+ },
+ });
+ }, [
+ onWalletHeaderPropsChange,
+ utxos?.length,
+ utxoDropdownOpen,
+ isConsolidating,
+ // Note: Functions (setUtxoDropdownOpen, etc.) are not in deps
+ // because they're stable setters or we accept they may change
+ // The ref-based change detection ensures we only update when primitives change
+ ]);
+
+ return (
+ <>
+ {/* Action Buttons and Transaction History Container */}
+
+ {/* Action Buttons */}
+
+ setShowReceiveModal(true)}
+ disabled={isBitcoinBalanceLoading}
+ className="h-20 w-20 rounded-full bg-muted transition-all duration-200 hover:scale-105 [&_svg]:size-6"
+ >
+
+
+
+
+
+
+
+ setShowSendModal(true)}
+ disabled={isBitcoinBalanceLoading}
+ className="h-20 w-20 rounded-full bg-muted transition-all duration-200 hover:scale-105 [&_svg]:size-6"
+ >
+
+
+
+
+ {/* Transaction History Button */}
+
+ setShowHistoryModal(true)}
+ className="w-full py-2 px-4 flex flex-col items-center gap-1 border-t border-muted hover:bg-muted/30 transition-colors"
+ >
+
+ History
+
+
+
+
+ {/* Modals */}
+ <>
+ {/* Consolidation Modal */}
+ setShowConsolidationModal(false)}
+ utxos={utxos}
+ onConfirm={handleConsolidateUtxos}
+ isConsolidating={isConsolidating}
+ />
+
+ {/* Bitcoin Address QR Modal */}
+ setShowBitcoinAddressQR(false)}
+ title="Bitcoin Address"
+ description="Scan this QR code to send Bitcoin to your address"
+ qrCodeUrl={bitcoinAddressQRCode}
+ content={bitcoinAddress || ''}
+ icon="qr"
+ />
+
+ {/* Bottom Drawer Modals */}
+
+
+
+ Send
+
+
+ Send Bitcoin on-chain
+
+
+
+
+ {}}
+ lightningInvoice=""
+ setLightningInvoice={() => {}}
+ lightningAddressInput=""
+ setLightningAddressInput={() => {}}
+ lightningAddressAmount=""
+ setLightningAddressAmount={() => {}}
+ pendingLightningAddress={null}
+ setPendingLightningAddress={() => {}}
+ decodedInvoiceAmount={null}
+ setDecodedInvoiceAmount={() => {}}
+ pendingInvoice={null}
+ setPendingInvoice={() => {}}
+ tokenInput=""
+ setTokenInput={() => {}}
+ quoteAmount=""
+ setQuoteAmount={() => {}}
+ activeMintUrl={null}
+ onSend={() => {
+ handleBitcoinSend(
+ bitcoinAmount,
+ pendingBitcoinRecipient,
+ setBitcoinAmount,
+ setBitcoinRecipient,
+ setPendingBitcoinRecipient,
+ setShowSendModal
+ );
+ }}
+ onReceive={() => {}}
+ isResolvingAddress={false}
+ isLoading={isBitcoinBalanceLoading}
+ bitcoinAddress={bitcoinAddress || ''}
+ bitcoinAmount={bitcoinAmount}
+ setBitcoinAmount={setBitcoinAmount}
+ bitcoinRecipient={bitcoinRecipient}
+ setBitcoinRecipient={setBitcoinRecipient}
+ pendingBitcoinRecipient={pendingBitcoinRecipient}
+ setPendingBitcoinRecipient={setPendingBitcoinRecipient}
+ hasNsecAccess={hasNsecAccess}
+ bitcoinMaxAmount={bitcoinMaxAmount}
+ onSendMax={() => handleSendMax(setBitcoinAmount)}
+ />
+
+
+
+
+
+
+
+ Receive
+
+
+ Receive Bitcoin on-chain
+
+
+
+
+ {}}
+ lightningInvoice=""
+ setLightningInvoice={() => {}}
+ lightningAddressInput=""
+ setLightningAddressInput={() => {}}
+ lightningAddressAmount=""
+ setLightningAddressAmount={() => {}}
+ pendingLightningAddress={null}
+ setPendingLightningAddress={() => {}}
+ decodedInvoiceAmount={null}
+ setDecodedInvoiceAmount={() => {}}
+ pendingInvoice={null}
+ setPendingInvoice={() => {}}
+ tokenInput=""
+ setTokenInput={() => {}}
+ quoteAmount=""
+ setQuoteAmount={() => {}}
+ activeMintUrl={null}
+ onSend={() => {}}
+ onReceive={() => {
+ handleBitcoinReceive(setBitcoinAddressQRCode, setShowBitcoinAddressQR);
+ setShowReceiveModal(false);
+ }}
+ isResolvingAddress={false}
+ isLoading={isBitcoinBalanceLoading}
+ bitcoinAddress={bitcoinAddress || ''}
+ bitcoinAmount=""
+ setBitcoinAmount={() => {}}
+ bitcoinRecipient=""
+ setBitcoinRecipient={() => {}}
+ pendingBitcoinRecipient={null}
+ setPendingBitcoinRecipient={() => {}}
+ hasNsecAccess={hasNsecAccess}
+ />
+
+
+
+
+
+
+
+ Transactions
+
+
+ View your Bitcoin transaction history
+
+
+
+
+
+
+
+
+ >
+ >
+ );
+}
+
+
diff --git a/src/components/wallet/CashuWallet.tsx b/src/components/wallet/CashuWallet.tsx
new file mode 100644
index 0000000..66a7518
--- /dev/null
+++ b/src/components/wallet/CashuWallet.tsx
@@ -0,0 +1,914 @@
+import { useState, useEffect, useRef } from 'react';
+import { nip19 } from 'nostr-tools';
+import { useCashu } from '@/hooks/wallet/useCashu';
+import { useLightningAddress } from '@/hooks/wallet/useLightningAddress';
+import { useNpubCash, type NpubCashUserInfo } from '@/hooks/wallet/useNpubCash';
+import { useLocalStorage } from '@/hooks/useLocalStorage';
+import type { QRScanResult } from '@/hooks/wallet/useQRCode';
+import { useMintManager } from '@/hooks/wallet/useMintManager';
+import { useTokenOperations } from '@/hooks/wallet/useTokenOperations';
+import { useLightningOperations } from '@/hooks/wallet/useLightningOperations';
+import { useReverseSwapOperations } from '@/hooks/wallet/useReverseSwapOperations';
+import { useSeedPhraseRestore } from '@/hooks/wallet/useSeedPhraseRestore';
+import { useHistoryManager } from '@/hooks/wallet/useHistoryManager';
+import { decodeBolt11Amount } from '@/lib/bolt11Decoder';
+import { QRModal } from '@/components/ui/qr-modal';
+import { TransactionCard } from './PaymentCard';
+import { ProofBreakdownModal } from './ProofBreakdownModal';
+import { RemoveMintModal } from './RemoveMintModal';
+import { SeedPhraseModal } from './SeedPhraseModal';
+import { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerTitle } from '@/components/ui/drawer';
+import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
+import { TransactionHistory } from './TransactionHistory';
+import { ScrollArea } from '@/components/ui/scroll-area';
+import { ChevronUp, Send, Download, ScanLine } from 'lucide-react';
+import { Button } from '@/components/ui/button';
+
+interface CashuWalletProps {
+ mode: 'tokens' | 'lightning';
+ toast: ReturnType['toast'];
+ generateQRCode: (text: string) => Promise;
+ copyToClipboard: (text: string) => Promise;
+ user?: { pubkey: string };
+ onRequestQRScanner: () => void;
+ onWalletHeaderPropsChange?: (props: any) => void;
+}
+
+export function CashuWallet({
+ mode,
+ toast,
+ generateQRCode,
+ copyToClipboard,
+ user,
+ onRequestQRScanner,
+ onWalletHeaderPropsChange,
+}: CashuWalletProps) {
+ // ============================================================================
+ // CORE HOOKS
+ // ============================================================================
+
+ const {
+ coco,
+ repositories,
+ isInitialized,
+ isLoading,
+ error,
+ balances,
+ mints,
+ mnemonic,
+ getEncodedToken,
+ refreshMints,
+ } = useCashu();
+
+ const { getInvoice: getLightningInvoice, isLoading: isResolvingAddress } = useLightningAddress();
+
+ const {
+ setMint: setNpubCashMint,
+ getUserInfo: getNpubCashUserInfo,
+ syncQuotesWithWallet,
+ isLoggedIn: isNpubCashLoggedIn,
+ isLoading: isNpubCashLoading,
+ error: npubCashError,
+ clearError: clearNpubCashError
+ } = useNpubCash();
+
+ // Wrapper to handle return type mismatch
+ const handleSetNpubCashMint = (mintUrl: string): Promise => {
+ return setNpubCashMint(mintUrl);
+ };
+
+ // State to track npub.cash user info
+ const [npubCashUserInfo, setNpubCashUserInfo] = useState(null);
+
+ // Ref to track if we've fetched user info (only fetch once)
+ const hasFetchedUserInfoRef = useRef(false);
+
+ // Ref to track if we've set a mint from user info (to prevent overwriting with stored mint)
+ const hasSetMintFromUserInfoRef = useRef(false);
+
+ // Persist active mint URL to localStorage
+ const [storedActiveMintUrl, setStoredActiveMintUrl] = useLocalStorage('cashu-active-mint-url', null);
+
+ // ============================================================================
+ // DOMAIN HOOKS
+ // ============================================================================
+
+ const {
+ activeMintUrl,
+ setActiveMintUrl,
+ mintUrl,
+ setMintUrl,
+ mintDropdownOpen,
+ setMintDropdownOpen,
+ handleAddMint,
+ handleRemoveMintClick,
+ handleConfirmRemoveMint,
+ mintToRemove,
+ showRemoveMintModal,
+ setShowRemoveMintModal,
+ getCleanMintLabel,
+ handleShowDenominations,
+ } = useMintManager({
+ coco,
+ mints,
+ repositories,
+ isNpubCashLoggedIn,
+ setNpubCashMint: handleSetNpubCashMint,
+ refreshMints,
+ });
+
+ // Wrapper for setActiveMintUrl to handle the async nature
+ const handleSetActiveMintSync = (url: string | null) => {
+ setActiveMintUrl(url);
+ };
+
+ // Transaction operation hooks
+ const tokenOps = useTokenOperations({
+ coco,
+ activeMintUrl,
+ generateQRCode,
+ getEncodedToken,
+ });
+
+ const lightningOps = useLightningOperations({
+ coco,
+ activeMintUrl,
+ generateQRCode,
+ getLightningInvoice,
+ });
+
+ const reverseSwapOps = useReverseSwapOperations({
+ coco,
+ activeMintUrl,
+ });
+
+ const restore = useSeedPhraseRestore({ coco });
+
+ // Extract all needed values
+ const {
+ tokenInput,
+ setTokenInput,
+ sendAmount,
+ setSendAmount,
+ sentToken,
+ setSentToken,
+ sentTokenQRCode,
+ } = tokenOps;
+
+ const {
+ quoteAmount,
+ setQuoteAmount,
+ lightningInvoice,
+ setLightningInvoice,
+ lightningAddressInput,
+ setLightningAddressInput,
+ lightningAddressAmount,
+ setLightningAddressAmount,
+ pendingLightningAddress,
+ setPendingLightningAddress,
+ decodedInvoiceAmount,
+ setDecodedInvoiceAmount,
+ pendingInvoice,
+ setPendingInvoice,
+ showInvoiceModal,
+ setShowInvoiceModal,
+ currentInvoice,
+ handleConfirmInvoicePayment,
+ mintQuoteUnsubscribeRef,
+ } = lightningOps;
+
+ const {
+ pendingBitcoinSwapAddress,
+ setPendingBitcoinSwapAddress,
+ bitcoinSwapAmount,
+ setBitcoinSwapAmount,
+ swapStatus,
+ } = reverseSwapOps;
+
+ const {
+ handleRestoreFromSeedPhrase,
+ isRestoring,
+ } = restore;
+
+ // Combined receive handler that routes to appropriate operation
+ const handleReceive = async () => {
+ if (tokenInput) {
+ return tokenOps.handleTokenReceive();
+ } else if (quoteAmount) {
+ return lightningOps.handleLightningReceive();
+ }
+ };
+
+ // Combined send handler that routes to appropriate operation
+ const handleSend = async () => {
+ // Check for token send first
+ if (sendAmount && activeMintUrl) {
+ return tokenOps.handleTokenSend();
+ }
+
+ // Check for reverse swap
+ if (pendingBitcoinSwapAddress && bitcoinSwapAmount) {
+ return reverseSwapOps.handleReverseSwap();
+ }
+
+ // Check for Lightning address payment
+ if (pendingLightningAddress) {
+ return lightningOps.handleLightningAddressPayment();
+ }
+
+ // Handle Lightning invoice/address input detection
+ const input = lightningInvoice.trim() || lightningAddressInput.trim();
+ if (!input) return;
+
+ // First check if it's a Bitcoin address for reverse swap
+ if (reverseSwapOps.detectBitcoinAddress(input)) {
+ setLightningInvoice('');
+ setLightningAddressInput('');
+ return;
+ }
+
+ // Then check for Lightning address or invoice
+ lightningOps.detectAndHandleLightningInput(input);
+ };
+
+ const {
+ historyEntries,
+ isLoadingHistory,
+ } = useHistoryManager({
+ coco,
+ isInitialized,
+ });
+
+ // ============================================================================
+ // UI STATE
+ // ============================================================================
+
+ const [showSats, setShowSats] = useState(true);
+ const [showProofBreakdown, setShowProofBreakdown] = useState(false);
+ const [proofBreakdown, setProofBreakdown] = useState<{
+ mintUrl: string;
+ denominations: { [key: number]: number };
+ totalBalance: number;
+ } | null>(null);
+ const [showLightningAddressQR, setShowLightningAddressQR] = useState(false);
+ const [lightningAddressQRCode, setLightningAddressQRCode] = useState('');
+ const [showSendModal, setShowSendModal] = useState(false);
+ const [showReceiveModal, setShowReceiveModal] = useState(false);
+ const [showHistoryModal, setShowHistoryModal] = useState(false);
+ const [showSeedPhraseInfo, setShowSeedPhraseInfo] = useState(false);
+
+
+ // Handle drawer close with state reset
+ const handleSendDrawerClose = (open: boolean) => {
+ setShowSendModal(open);
+ if (!open) {
+ // Reset all send-related state when drawer closes
+ setSendAmount('');
+ setLightningInvoice('');
+ setLightningAddressInput('');
+ setLightningAddressAmount('');
+ setPendingLightningAddress(null);
+ setDecodedInvoiceAmount(null);
+ setPendingInvoice(null);
+ // Reset reverse swap state
+ setPendingBitcoinSwapAddress(null);
+ setBitcoinSwapAmount('');
+ }
+ };
+
+ const handleReceiveDrawerClose = (open: boolean) => {
+ setShowReceiveModal(open);
+ if (!open) {
+ // Reset all receive-related state when drawer closes
+ setTokenInput('');
+ setQuoteAmount('');
+ }
+ };
+
+ // ============================================================================
+ // COMPUTED VALUES
+ // ============================================================================
+
+ const totalBalance: number = (Object.values(balances) as number[]).reduce((sum: number, balance: number) => sum + balance, 0);
+
+ // ============================================================================
+ // EFFECTS - Error Handling
+ // ============================================================================
+
+ useEffect(() => {
+ if (error) {
+ toast({
+ variant: "destructive",
+ title: "Wallet Error",
+ description: error.message,
+ });
+ }
+ }, [error, toast]);
+
+ useEffect(() => {
+ if (npubCashError) {
+ toast({
+ variant: "destructive",
+ title: "Npub.cash Error",
+ description: npubCashError,
+ });
+ clearNpubCashError();
+ }
+ }, [npubCashError, clearNpubCashError, toast]);
+
+ // ============================================================================
+ // EFFECTS - NPub.cash Integration
+ // ============================================================================
+
+ // Track previous login state to detect logout
+ const prevLoggedInRef = useRef(isNpubCashLoggedIn);
+
+ // Fetch npub.cash user info once and set mint if available
+ useEffect(() => {
+ // Detect logout: was logged in, now not logged in
+ if (prevLoggedInRef.current && !isNpubCashLoggedIn) {
+ setNpubCashUserInfo(null);
+ hasFetchedUserInfoRef.current = false; // Reset so we can fetch again if they log back in
+ hasSetMintFromUserInfoRef.current = false;
+ hasAttemptedRestoreRef.current = false; // Reset restore so it can run again
+ }
+ prevLoggedInRef.current = isNpubCashLoggedIn;
+
+ // Only fetch if logged in, initialized, not loading, and we haven't fetched yet
+ if (!isNpubCashLoggedIn || !isInitialized || isNpubCashLoading || hasFetchedUserInfoRef.current) {
+ // If not logged in, mark as "fetched" (skipped) so restore logic can run
+ if (!isNpubCashLoggedIn && isInitialized && !hasFetchedUserInfoRef.current) {
+ hasFetchedUserInfoRef.current = true;
+ }
+ return;
+ }
+
+ // Mark as fetched to prevent duplicate requests
+ hasFetchedUserInfoRef.current = true;
+
+ const fetchUserInfo = async () => {
+ console.log('[CashuWallet] Fetching npub.cash user info...');
+ try {
+ const userInfo = await getNpubCashUserInfo();
+ console.log('[CashuWallet] npub.cash user info received:', userInfo);
+
+ if (userInfo && userInfo.mintUrl) {
+ setNpubCashUserInfo(userInfo);
+ console.log('[CashuWallet] Setting mint from npub.cash:', userInfo.mintUrl);
+
+ if (!coco) {
+ console.warn('[CashuWallet] coco not available, cannot add/set mint');
+ return;
+ }
+
+ // Check if mint exists (known) by checking all mints
+ const allMints = await coco.mint.getAllMints();
+ const isKnown = allMints.some(m => m.mintUrl.toLowerCase() === userInfo.mintUrl.toLowerCase());
+
+ if (isKnown) {
+ // Mint exists but may not be trusted, ensure it's trusted
+ const isTrusted = await coco.mint.isTrustedMint(userInfo.mintUrl);
+ if (!isTrusted) {
+ console.log('[CashuWallet] Trusting existing mint:', userInfo.mintUrl);
+ await coco.mint.trustMint(userInfo.mintUrl);
+ }
+ } else {
+ // Add mint from npub.cash and automatically trust it
+ console.log('[CashuWallet] Adding new mint from npub.cash:', userInfo.mintUrl);
+ await coco.mint.addMint(userInfo.mintUrl, { trusted: true });
+ }
+
+ // Set as active mint immediately
+ console.log('[CashuWallet] Setting active mint:', userInfo.mintUrl);
+ setActiveMintUrl(userInfo.mintUrl, false);
+ hasSetMintFromUserInfoRef.current = true;
+ } else {
+ console.log('[CashuWallet] No mintUrl in user info:', userInfo);
+ setNpubCashUserInfo(null);
+ }
+ } catch (err) {
+ console.error('[CashuWallet] Failed to get npub.cash user info:', err);
+ setNpubCashUserInfo(null);
+ hasFetchedUserInfoRef.current = false; // Allow retry on error
+ }
+ };
+
+ fetchUserInfo();
+ }, [isNpubCashLoggedIn, isInitialized, isNpubCashLoading, getNpubCashUserInfo, coco, setActiveMintUrl]);
+
+ // Ref to track if we've attempted restore/default mint logic
+ const hasAttemptedRestoreRef = useRef(false);
+
+ // Restore previous mint or add default mint if no user info mint was set
+ useEffect(() => {
+ // Only run after wallet is initialized
+ if (!isInitialized || !coco || hasAttemptedRestoreRef.current) return;
+
+ // If logged in, wait for user info check to complete
+ if (isNpubCashLoggedIn && !hasFetchedUserInfoRef.current) return;
+
+ // If we already set a mint from user info, don't override it
+ if (hasSetMintFromUserInfoRef.current) {
+ hasAttemptedRestoreRef.current = true;
+ return;
+ }
+
+ // If there's already an active mint, don't do anything
+ if (activeMintUrl) {
+ hasAttemptedRestoreRef.current = true;
+ return;
+ }
+
+ // Mark as attempted to prevent multiple runs
+ hasAttemptedRestoreRef.current = true;
+
+ const restoreOrAddDefaultMint = async () => {
+ // First, try to restore from stored mint if it exists and is valid
+ if (storedActiveMintUrl) {
+ const allMints = await coco.mint.getAllMints();
+ const storedMintExists = allMints.some(m => m.mintUrl.toLowerCase() === storedActiveMintUrl.toLowerCase());
+
+ if (storedMintExists) {
+ const isTrusted = await coco.mint.isTrustedMint(storedActiveMintUrl);
+ if (isTrusted) {
+ console.log('[CashuWallet] Restoring previous mint:', storedActiveMintUrl);
+ setActiveMintUrl(storedActiveMintUrl, false);
+ return;
+ }
+ }
+ }
+
+ // If no stored mint to restore, check if we need to add default mint
+ const trustedMints = await coco.mint.getAllTrustedMints();
+
+ // Only add default mint if no mints exist at all
+ if (trustedMints.length === 0) {
+ const defaultMintUrl = 'https://mint.minibits.cash/Bitcoin';
+ console.log('[CashuWallet] No mints found, adding default mint:', defaultMintUrl);
+
+ try {
+ await coco.mint.addMint(defaultMintUrl, { trusted: true });
+ // Wait a bit for mint to be added, then set as active
+ setTimeout(() => {
+ setActiveMintUrl(defaultMintUrl, false);
+ }, 500);
+ } catch (err) {
+ console.error('[CashuWallet] Failed to add default mint:', err);
+ }
+ }
+ };
+
+ restoreOrAddDefaultMint();
+ }, [isInitialized, coco, activeMintUrl, storedActiveMintUrl, setActiveMintUrl, isNpubCashLoggedIn]);
+
+ // Save active mint URL to localStorage when it changes
+ useEffect(() => {
+ // Save active mint URL to localStorage whenever it changes
+ // This includes user info mint, restored mint, default mint, and manual selections
+ if (activeMintUrl && storedActiveMintUrl !== activeMintUrl) {
+ console.log('[CashuWallet] Saving active mint to localStorage:', activeMintUrl);
+ setStoredActiveMintUrl(activeMintUrl);
+ }
+ }, [activeMintUrl, storedActiveMintUrl, setStoredActiveMintUrl]);
+
+ // Set up automatic quote sync subscription when logged into npub.cash
+ useEffect(() => {
+ if (!isNpubCashLoggedIn || !coco || !isInitialized) return;
+
+ let unsubscribe: (() => void) | null = null;
+
+ const setupSync = async () => {
+ unsubscribe = await syncQuotesWithWallet(coco);
+ };
+
+ setupSync();
+
+ return () => {
+ if (unsubscribe) {
+ unsubscribe();
+ }
+ };
+ }, [isNpubCashLoggedIn, coco, isInitialized, syncQuotesWithWallet, toast]);
+
+
+ // Handle focus management when drawers open to prevent aria-hidden warnings
+ useEffect(() => {
+ if (showSendModal || showReceiveModal || showHistoryModal) {
+ // Blur any currently focused element to allow drawer's focus trap to work
+ const activeElement = document.activeElement as HTMLElement;
+ if (activeElement && activeElement.blur) {
+ activeElement.blur();
+ }
+ }
+ }, [showSendModal, showReceiveModal, showHistoryModal]);
+
+ // ============================================================================
+ // EFFECTS - Cleanup
+ // ============================================================================
+
+ useEffect(() => {
+ return () => {
+ if (mintQuoteUnsubscribeRef.current) {
+ mintQuoteUnsubscribeRef.current();
+ mintQuoteUnsubscribeRef.current = null;
+ }
+ };
+ }, [mintQuoteUnsubscribeRef]);
+
+ // Handle QR scan results (called from parent WalletContainer)
+ const handleQRResult = (result: QRScanResult) => {
+ switch (result.type) {
+ case 'lightning_invoice': {
+ setLightningInvoice(result.value);
+ setPendingInvoice(result.value);
+ // Decode invoice amount
+ const amount = decodeBolt11Amount(result.value);
+ setDecodedInvoiceAmount(amount);
+ setShowSendModal(true);
+ toast({
+ title: "Lightning Invoice Scanned",
+ description: amount ? `${amount} sats` : "Invoice ready to pay",
+ });
+ break;
+ }
+ case 'lightning_address': {
+ setLightningAddressInput(result.value);
+ setPendingLightningAddress(result.value);
+ setShowSendModal(true);
+ toast({
+ title: "Lightning Address Scanned",
+ description: "Enter amount to send",
+ });
+ break;
+ }
+ case 'cashu_token': {
+ setTokenInput(result.value);
+ setShowReceiveModal(true);
+ toast({
+ title: "Cashu Token Scanned",
+ description: "Token ready to redeem",
+ });
+ break;
+ }
+ default: {
+ // Bitcoin addresses and npubs are handled by BitcoinWallet
+ break;
+ }
+ }
+ };
+
+ // Expose handler to parent via window (temporary, will be improved)
+ useEffect(() => {
+ (window as any).__cashuWalletQRHandler = handleQRResult;
+ return () => {
+ delete (window as any).__cashuWalletQRHandler;
+ };
+ }, [mode, setLightningInvoice, setPendingInvoice, setDecodedInvoiceAmount, setShowSendModal, setLightningAddressInput, setPendingLightningAddress, setTokenInput, setShowReceiveModal, toast]); // Re-setup when mode changes
+
+ // ============================================================================
+ // RENDER
+ // ============================================================================
+
+ // Expose WalletHeader props to parent WalletContainer
+ // Use ref to track previous values and prevent infinite loops
+ const prevPropsRef = useRef<{
+ activeMintUrl?: string | null;
+ mintsLength?: number;
+ firstMintUrl?: string;
+ mintUrl?: string;
+ mintDropdownOpen?: boolean;
+ npubCashUsername?: string;
+ }>({});
+
+ useEffect(() => {
+ if (!onWalletHeaderPropsChange) return;
+
+ const npubCashUsername = user?.pubkey ? (npubCashUserInfo?.name || nip19.npubEncode(user.pubkey)) : undefined;
+
+ // Check if values actually changed
+ const currentProps = {
+ activeMintUrl,
+ mintsLength: mints?.length,
+ firstMintUrl: mints?.[0]?.url,
+ mintUrl,
+ mintDropdownOpen,
+ npubCashUsername,
+ };
+
+ const prevProps = prevPropsRef.current;
+ const hasChanged =
+ prevProps.activeMintUrl !== currentProps.activeMintUrl ||
+ prevProps.mintsLength !== currentProps.mintsLength ||
+ prevProps.firstMintUrl !== currentProps.firstMintUrl ||
+ prevProps.mintUrl !== currentProps.mintUrl ||
+ prevProps.mintDropdownOpen !== currentProps.mintDropdownOpen ||
+ prevProps.npubCashUsername !== currentProps.npubCashUsername;
+
+ if (!hasChanged && Object.keys(prevProps).length > 0) {
+ // Values haven't changed, skip update
+ return;
+ }
+
+ // Update ref
+ prevPropsRef.current = currentProps;
+
+ // Send updated props
+ onWalletHeaderPropsChange({
+ activeMintUrl,
+ setActiveMintUrl: handleSetActiveMintSync,
+ mints,
+ mintUrl,
+ setMintUrl,
+ onAddMint: handleAddMint,
+ onRemoveMint: handleRemoveMintClick,
+ onShowDenominations: (mintUrl: string) => handleShowDenominations(mintUrl, setShowProofBreakdown, setProofBreakdown),
+ getCleanMintLabel,
+ mintDropdownOpen,
+ setMintDropdownOpen,
+ npubCashUsername,
+ onShowLightningAddressQR: async (qr: string) => {
+ setLightningAddressQRCode(qr);
+ setShowLightningAddressQR(true);
+ },
+ onShowSeedPhraseInfo: () => setShowSeedPhraseInfo(true),
+ });
+ }, [
+ onWalletHeaderPropsChange,
+ activeMintUrl,
+ mints?.length,
+ mints?.[0]?.url,
+ mintUrl,
+ mintDropdownOpen,
+ npubCashUserInfo?.name,
+ user?.pubkey,
+ // Note: Functions (handleSetActiveMintSync, handleAddMint, etc.) are not in deps
+ // because they're stable from hooks or we accept they may change
+ // The ref-based change detection ensures we only update when primitives change
+ ]);
+
+ return (
+ <>
+
+
+ {/* Action Buttons and Transaction History Container */}
+
+ {/* Action Buttons */}
+
+ setShowReceiveModal(true)}
+ disabled={isLoading || isNpubCashLoading}
+ className="h-20 w-20 rounded-full bg-muted transition-all duration-200 hover:scale-105 [&_svg]:size-6"
+ >
+
+
+
+
+
+
+
+ setShowSendModal(true)}
+ disabled={isLoading || isNpubCashLoading}
+ className="h-20 w-20 rounded-full bg-muted transition-all duration-200 hover:scale-105 [&_svg]:size-6"
+ >
+
+
+
+
+ {/* Transaction History Button */}
+
+ setShowHistoryModal(true)}
+ className="w-full py-2 px-4 flex flex-col items-center gap-1 border-t border-muted hover:bg-muted/30 transition-colors"
+ >
+
+ History
+
+
+
+
+ {/* Modals */}
+ <>
+ {/* Proof Breakdown Modal */}
+ setShowProofBreakdown(false)}
+ proofBreakdown={proofBreakdown}
+ />
+
+ {/* Remove Mint Modal */}
+ setShowRemoveMintModal(false)}
+ mintToRemove={mintToRemove}
+ onConfirm={handleConfirmRemoveMint}
+ isLoading={isLoading || isNpubCashLoading}
+ />
+
+
+ {/* QR Modals */}
+ setShowLightningAddressQR(false)}
+ title="Lightning Address"
+ description="Scan this QR code to send payments to your Lightning address"
+ qrCodeUrl={lightningAddressQRCode}
+ content={user?.pubkey ? (npubCashUserInfo?.name || nip19.npubEncode(user.pubkey)) + '@npubx.cash' : ''}
+ icon="zap"
+ />
+
+ {currentInvoice && (
+ {
+ if (mintQuoteUnsubscribeRef.current) {
+ mintQuoteUnsubscribeRef.current();
+ mintQuoteUnsubscribeRef.current = null;
+ }
+ setShowInvoiceModal(false);
+ }}
+ onExpiry={() => {
+ if (mintQuoteUnsubscribeRef.current) {
+ mintQuoteUnsubscribeRef.current();
+ mintQuoteUnsubscribeRef.current = null;
+ }
+ toast({
+ variant: "destructive",
+ title: "Invoice Expired",
+ description: "The Lightning invoice has expired. Please create a new one.",
+ });
+ }}
+ title="Lightning Invoice"
+ description={`Pay this invoice to receive ${currentInvoice.amount} sats`}
+ qrCodeUrl={currentInvoice.qrCodeUrl}
+ content={currentInvoice.invoice}
+ icon="zap"
+ expiryTimestamp={currentInvoice.expiry}
+ />
+ )}
+
+ {/* Sent Token Modal */}
+ {sentToken && (
+ setSentToken(null)}
+ title="Cashu Token"
+ description="Share this token with the recipient to send them your sats"
+ qrCodeUrl={sentTokenQRCode}
+ content={sentToken}
+ icon="qr"
+ />
+ )}
+
+ {/* Seed Phrase Restore Modal */}
+ setShowSeedPhraseInfo(false)}
+ onRestoreFromSeedPhrase={handleRestoreFromSeedPhrase}
+ isRestoring={isRestoring}
+ mints={mints}
+ activeMintUrl={activeMintUrl}
+ />
+
+
+ {/* Bottom Drawer Modals */}
+
+
+
+ Send
+
+
+ Send tokens or Lightning payments
+
+
+
+
+ {}}
+ quoteAmount=""
+ setQuoteAmount={() => {}}
+ activeMintUrl={activeMintUrl}
+ onSend={() => {
+ const wasPendingBefore = pendingLightningAddress !== null && pendingLightningAddress !== '';
+ handleSend();
+ if (mode === 'tokens' || wasPendingBefore) {
+ setShowSendModal(false);
+ }
+ }}
+ onReceive={() => {}}
+ onConfirmInvoice={() => {
+ handleConfirmInvoicePayment();
+ setShowSendModal(false);
+ }}
+ isResolvingAddress={isResolvingAddress}
+ isLoading={isLoading || isNpubCashLoading}
+ // Reverse swap props
+ pendingBitcoinSwapAddress={pendingBitcoinSwapAddress}
+ setPendingBitcoinSwapAddress={setPendingBitcoinSwapAddress}
+ bitcoinSwapAmount={bitcoinSwapAmount}
+ setBitcoinSwapAmount={setBitcoinSwapAmount}
+ swapStatus={swapStatus}
+ />
+
+
+
+
+
+
+
+ Receive
+
+
+ Receive tokens or Lightning invoices
+
+
+
+
+ {}}
+ lightningInvoice=""
+ setLightningInvoice={() => {}}
+ lightningAddressInput=""
+ setLightningAddressInput={() => {}}
+ lightningAddressAmount=""
+ setLightningAddressAmount={() => {}}
+ pendingLightningAddress={null}
+ setPendingLightningAddress={() => {}}
+ decodedInvoiceAmount={null}
+ setDecodedInvoiceAmount={() => {}}
+ pendingInvoice={null}
+ setPendingInvoice={() => {}}
+ tokenInput={tokenInput}
+ setTokenInput={setTokenInput}
+ quoteAmount={quoteAmount}
+ setQuoteAmount={setQuoteAmount}
+ activeMintUrl={activeMintUrl}
+ onSend={() => {}}
+ onReceive={() => {
+ handleReceive();
+ setShowReceiveModal(false);
+ }}
+ isResolvingAddress={false}
+ isLoading={isLoading || isNpubCashLoading}
+ />
+
+
+
+
+
+
+
+ Transactions
+
+
+ View your transaction history
+
+
+
+
+
+
+
+
+
+ >
+ >
+ );
+}
+
diff --git a/src/components/wallet/ConsolidationModal.tsx b/src/components/wallet/ConsolidationModal.tsx
new file mode 100644
index 0000000..80f9b92
--- /dev/null
+++ b/src/components/wallet/ConsolidationModal.tsx
@@ -0,0 +1,92 @@
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
+import { X, ArrowRightLeft, RefreshCw } from 'lucide-react';
+import { UTXO } from '@/lib/bitcoin';
+
+interface ConsolidationModalProps {
+ isOpen: boolean;
+ onClose: () => void;
+ utxos: UTXO[];
+ onConfirm: () => void;
+ isConsolidating: boolean;
+}
+
+export function ConsolidationModal({
+ isOpen,
+ onClose,
+ utxos,
+ onConfirm,
+ isConsolidating,
+}: ConsolidationModalProps) {
+ if (!isOpen) return null;
+
+ return (
+
+
e.stopPropagation()}
+ >
+
+
+
+
+
+
+ Consolidate UTXOs
+
+
+ Combine multiple UTXOs into a single transaction
+
+
+
+
+
+
+ {utxos.length} UTXO{utxos.length !== 1 ? 's' : ''}
+
+
+ Total Value: {utxos.reduce((sum, utxo) => sum + utxo.value, 0).toLocaleString()} sats
+
+
+
+
+
+
🔄 What this does: Combines all your UTXOs into a single transaction, sending the total amount (minus fees) back to your own address.
+
💰 Benefits: Reduces transaction fees for future payments and simplifies your UTXO management.
+
⚠️ Note: This will create a new transaction on the Bitcoin network and may take some time to confirm.
+
+
+
+
{
+ onConfirm();
+ onClose();
+ }}
+ disabled={isConsolidating || utxos.length <= 1}
+ >
+ {isConsolidating ? (
+ <>
+
+ Consolidating...
+ >
+ ) : (
+ <>
+
+ Consolidate UTXOs
+ >
+ )}
+
+
+
+
+
+ );
+}
diff --git a/src/components/wallet/MintSelector.tsx b/src/components/wallet/MintSelector.tsx
new file mode 100644
index 0000000..c5722b8
--- /dev/null
+++ b/src/components/wallet/MintSelector.tsx
@@ -0,0 +1,192 @@
+import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import { Plus, X, Check, ChevronDown, Landmark } from 'lucide-react';
+import { useState, useEffect } from 'react';
+import { exchangeRateService } from '@/lib/exchangeRateService';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+ DropdownMenuSeparator,
+} from '@/components/ui/dropdown-menu';
+
+interface CashuMint {
+ url: string;
+ name?: string;
+}
+
+interface MintSelectorProps {
+ balances: { [key: string]: number };
+ showSats: boolean;
+ activeMintUrl: string | null;
+ setActiveMintUrl: (url: string | null) => void;
+ mints: CashuMint[];
+ mintUrl: string;
+ setMintUrl: (url: string) => void;
+ onAddMint: () => void;
+ onRemoveMint: (mint: CashuMint) => void;
+ onShowDenominations: (mintUrl: string) => void;
+ getCleanMintLabel: (mint: { name?: string; url: string }) => string;
+ dropdownOpen: boolean;
+ setDropdownOpen: (open: boolean) => void;
+}
+
+export function MintSelector({
+ balances,
+ showSats,
+ activeMintUrl,
+ setActiveMintUrl,
+ mints,
+ mintUrl,
+ setMintUrl,
+ onAddMint,
+ onRemoveMint,
+ onShowDenominations,
+ getCleanMintLabel,
+ dropdownOpen,
+ setDropdownOpen,
+}: MintSelectorProps) {
+ const [btcUsdRate, setBtcUsdRate] = useState(null);
+
+ useEffect(() => {
+ exchangeRateService.getBtcUsdRate()
+ .then(rate => setBtcUsdRate(rate))
+ .catch(() => setBtcUsdRate(null));
+ }, []);
+
+ const formatBalance = (sats: number): string => {
+ if (showSats) {
+ return `₿${sats.toLocaleString()}`;
+ } else if (btcUsdRate) {
+ const btcAmount = sats / 100000000;
+ const usd = btcAmount * btcUsdRate;
+ return `$${usd.toFixed(2)}`;
+ } else {
+ return `₿${sats.toLocaleString()}`;
+ }
+ };
+
+ const activeMint = mints.find(mint => mint.url === activeMintUrl);
+ const activeBalance = activeMint ? balances[activeMint.url] || 0 : 0;
+
+ return (
+
+
+
+
+
+ {activeMint ? (
+ <>
+
+
+ {getCleanMintLabel(activeMint)}
+
+
+ {formatBalance(activeBalance)}
+
+ >
+ ) : (
+
Select a mint
+ )}
+
+
+
+
+
+
+ {mints
+ .filter((mint) => mint.url)
+ .map((mint, index) => {
+ const isActive = activeMintUrl === mint.url;
+ const balance = balances[mint.url] || 0;
+
+ return (
+
setActiveMintUrl(mint.url)}
+ className="flex items-center justify-between p-3 text-base"
+ >
+
+ {isActive && (
+
+
+
+ )}
+
+
+ {getCleanMintLabel(mint)}
+
+
+
+
+
+ {formatBalance(balance)}
+
+ {
+ e.stopPropagation();
+ onRemoveMint(mint);
+ }}
+ className="p-1 rounded hover:bg-destructive hover:text-destructive-foreground transition-colors"
+ title="Remove mint"
+ >
+
+
+
+
+ );
+ })}
+
+ {mints.length > 0 && }
+
+
+
setMintUrl(e.target.value)}
+ className="flex-1"
+ onClick={(e) => e.stopPropagation()}
+ onKeyDown={(e) => {
+ e.stopPropagation();
+ if (e.key === 'Escape') {
+ setDropdownOpen(false);
+ } else if (e.key === 'Enter') {
+ e.preventDefault();
+ if (mintUrl.trim()) {
+ onAddMint();
+ }
+ }
+ }}
+ onKeyUp={(e) => e.stopPropagation()}
+ />
+
{
+ e.stopPropagation();
+ onAddMint();
+ }}
+ disabled={!mintUrl.trim()}
+ size="sm"
+ >
+
+ Add
+
+
+
+
+
+
+ {activeMint && (
+
+ onShowDenominations(activeMint.url)}
+ className="flex items-center justify-center px-2 py-1.5 hover:bg-muted rounded-md transition-colors h-[40px] w-[42px] flex-shrink-0"
+ title="View token breakdown"
+ >
+
+
+
+ )}
+
+ );
+}
diff --git a/src/components/wallet/PaymentCard.tsx b/src/components/wallet/PaymentCard.tsx
new file mode 100644
index 0000000..88fc5d4
--- /dev/null
+++ b/src/components/wallet/PaymentCard.tsx
@@ -0,0 +1,568 @@
+import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import { Send, Download, ArrowRight, Zap, X } from 'lucide-react';
+import { useState, useEffect } from 'react';
+
+// Helper function to prevent complex inline ternary operators
+const getOperationMessage = (operation: string, mode: string): string => {
+ if (operation === 'send') {
+ return mode === 'tokens'
+ ? 'Select a mint to send tokens'
+ : 'Select a mint to pay Lightning invoices';
+ } else {
+ return mode === 'tokens'
+ ? 'Select a mint to receive tokens'
+ : 'Select a mint to create Lightning invoice';
+ }
+};
+
+// Helper function to truncate long addresses (show first 12, last 12 with ellipsis in middle)
+const truncateAddress = (address: string): string => {
+ if (address.length <= 26) return address; // "first 12" + "..." + "last 12" = 26
+ return address.slice(0, 12) + '...' + address.slice(-12);
+};
+
+interface TransactionCardProps {
+ mode: 'tokens' | 'lightning' | 'bitcoin';
+ operation: 'send' | 'receive';
+ // Send props
+ sendAmount: string;
+ setSendAmount: (value: string) => void;
+ lightningInvoice: string;
+ setLightningInvoice: (value: string) => void;
+ lightningAddressInput: string;
+ setLightningAddressInput: (value: string) => void;
+ lightningAddressAmount: string;
+ setLightningAddressAmount: (value: string) => void;
+ pendingLightningAddress: string | null;
+ setPendingLightningAddress: (value: string | null) => void;
+ decodedInvoiceAmount: number | null;
+ setDecodedInvoiceAmount: (value: number | null) => void;
+ pendingInvoice: string | null;
+ setPendingInvoice: (value: string | null) => void;
+ // Receive props
+ tokenInput: string;
+ setTokenInput: (value: string) => void;
+ quoteAmount: string;
+ setQuoteAmount: (value: string) => void;
+ // Common props
+ activeMintUrl: string | null;
+ onSend: () => void;
+ onReceive: () => void;
+ onConfirmInvoice?: () => void;
+ isResolvingAddress: boolean;
+ isLoading: boolean;
+ // Bitcoin props
+ bitcoinAddress?: string;
+ bitcoinAmount?: string;
+ setBitcoinAmount?: (value: string) => void;
+ bitcoinRecipient?: string;
+ setBitcoinRecipient?: (value: string) => void;
+ pendingBitcoinRecipient?: string | null;
+ setPendingBitcoinRecipient?: (value: string | null) => void;
+ hasNsecAccess?: boolean;
+ bitcoinMaxAmount?: number;
+ onSendMax?: () => void;
+ // Reverse swap props (Lightning mode)
+ pendingBitcoinSwapAddress?: string | null;
+ setPendingBitcoinSwapAddress?: (value: string | null) => void;
+ bitcoinSwapAmount?: string;
+ setBitcoinSwapAmount?: (value: string) => void;
+ swapStatus?: string | null;
+}
+
+export function TransactionCard({
+ mode,
+ operation,
+ sendAmount,
+ setSendAmount,
+ lightningInvoice,
+ setLightningInvoice,
+ lightningAddressInput,
+ setLightningAddressInput,
+ lightningAddressAmount,
+ setLightningAddressAmount,
+ pendingLightningAddress,
+ setPendingLightningAddress,
+ decodedInvoiceAmount,
+ setDecodedInvoiceAmount,
+ pendingInvoice,
+ setPendingInvoice,
+ tokenInput,
+ setTokenInput,
+ quoteAmount,
+ setQuoteAmount,
+ activeMintUrl,
+ onSend,
+ onReceive,
+ onConfirmInvoice,
+ isResolvingAddress,
+ isLoading,
+ bitcoinAddress,
+ bitcoinAmount,
+ setBitcoinAmount,
+ bitcoinRecipient,
+ setBitcoinRecipient,
+ pendingBitcoinRecipient,
+ setPendingBitcoinRecipient,
+ hasNsecAccess,
+ bitcoinMaxAmount,
+ onSendMax,
+ pendingBitcoinSwapAddress,
+ setPendingBitcoinSwapAddress,
+ bitcoinSwapAmount,
+ setBitcoinSwapAmount,
+ swapStatus,
+}: TransactionCardProps) {
+ const [sendMaxEnabled, setSendMaxEnabled] = useState(false);
+ const [swapAmountError, setSwapAmountError] = useState(null);
+
+ const handleSendMaxToggle = () => {
+ const newState = !sendMaxEnabled;
+ setSendMaxEnabled(newState);
+ if (newState && onSendMax) {
+ onSendMax();
+ }
+ };
+
+ // Reset send max toggle when bitcoin recipient changes
+ useEffect(() => {
+ if (!pendingBitcoinRecipient) {
+ setSendMaxEnabled(false);
+ }
+ }, [pendingBitcoinRecipient]);
+
+ // Reset swap amount error when swap address changes
+ useEffect(() => {
+ if (!pendingBitcoinSwapAddress) {
+ setSwapAmountError(null);
+ }
+ }, [pendingBitcoinSwapAddress]);
+
+ // Validate swap amount when it changes
+ useEffect(() => {
+ if (pendingBitcoinSwapAddress && bitcoinSwapAmount) {
+ const amount = parseInt(bitcoinSwapAmount);
+ if (isNaN(amount) || amount <= 0) {
+ setSwapAmountError('Please enter a valid amount');
+ } else if (amount < 25_000) {
+ setSwapAmountError('Minimum amount is 25,000 sats');
+ } else if (amount > 25_000_000) {
+ setSwapAmountError('Maximum amount is 25,000,000 sats');
+ } else {
+ setSwapAmountError(null);
+ }
+ } else {
+ setSwapAmountError(null);
+ }
+ }, [bitcoinSwapAmount, pendingBitcoinSwapAddress]);
+
+ return (
+
+ {/* Title */}
+
+
+ {operation === 'send' ? (
+ mode === 'tokens'
+ ? 'Generate Cashu token to send'
+ : mode === 'bitcoin' && !pendingBitcoinRecipient
+ ? 'Send Bitcoin on-chain'
+ : mode === 'bitcoin' && pendingBitcoinRecipient
+ ? (
+
+
+ Sending to: {' '}
+ {truncateAddress(pendingBitcoinRecipient)}
+
+ {
+ setPendingBitcoinRecipient?.(null);
+ setBitcoinAmount?.('');
+ }}
+ className="p-1.5 rounded-full hover:bg-muted transition-colors"
+ title="Cancel"
+ >
+
+
+
+ )
+ : pendingInvoice && decodedInvoiceAmount ? (
+
+
+ Sending: {' '}
+ {decodedInvoiceAmount} sats
+
+ {
+ setPendingInvoice(null);
+ setDecodedInvoiceAmount(null);
+ }}
+ className="p-1.5 rounded-full hover:bg-muted transition-colors"
+ title="Cancel"
+ >
+
+
+
+ ) : pendingLightningAddress ? (
+
+
+ Sending: {' '}
+ {truncateAddress(pendingLightningAddress)}
+
+ {
+ setPendingLightningAddress(null);
+ setLightningAddressAmount('');
+ }}
+ className="p-1.5 rounded-full hover:bg-muted transition-colors"
+ title="Cancel"
+ >
+
+
+
+ ) : pendingBitcoinSwapAddress ? (
+
+
+ Reverse Swap to: {' '}
+ {truncateAddress(pendingBitcoinSwapAddress)}
+
+ {
+ setPendingBitcoinSwapAddress?.(null);
+ setBitcoinSwapAmount?.('');
+ }}
+ className="p-1.5 rounded-full hover:bg-muted transition-colors"
+ title="Cancel"
+ >
+
+
+
+ ) : 'Pay invoices, addresses, or Bitcoin addresses'
+ ) : (
+ mode === 'tokens'
+ ? 'Enter Cashu token to redeem'
+ : mode === 'bitcoin'
+ ? 'Receive Bitcoin on-chain'
+ : 'Deposit funds with Lightning'
+ )}
+
+
+
+ {/* Content */}
+
+ {!activeMintUrl && mode !== 'bitcoin' && (
+
+ {getOperationMessage(operation, mode)}
+
+ )}
+
+ {operation === 'send' ? (
+ // Send Mode
+ mode === 'bitcoin' ? (
+ // Bitcoin Send
+
+ {!hasNsecAccess ? (
+
+
+ ⚠️ Login with nsec required to send Bitcoin
+
+
+ ) : pendingBitcoinRecipient ? (
+ // Step 2: Amount Input
+
+
+ setBitcoinAmount?.(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && (bitcoinAmount || sendMaxEnabled) && pendingBitcoinRecipient && !isLoading) {
+ onSend();
+ }
+ }}
+ disabled={sendMaxEnabled}
+ className="flex-1 h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield]"
+ />
+
+ Send Max
+
+
+
+
+
+
+
+
+ ) : (
+ // Step 1: Recipient Input
+
+
setBitcoinRecipient?.(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && bitcoinRecipient && !isLoading) {
+ setPendingBitcoinRecipient?.(bitcoinRecipient);
+ }
+ }}
+ className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2"
+ />
+
+
{
+ if (bitcoinRecipient) {
+ setPendingBitcoinRecipient?.(bitcoinRecipient);
+ }
+ }}
+ disabled={!bitcoinRecipient || isLoading}
+ className="h-12 px-12 rounded-full"
+ size="lg"
+ >
+
+
+
+
+ )}
+
+ ) : mode === 'tokens' ? (
+ // Cashu Token Send
+
+
setSendAmount(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && sendAmount && activeMintUrl && !isLoading) {
+ onSend();
+ }
+ }}
+ disabled={!activeMintUrl}
+ className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield]"
+ />
+
+
+
+
+
+
+ ) : pendingInvoice && decodedInvoiceAmount ? (
+ // Lightning Invoice Confirmation
+
+ ) : pendingBitcoinSwapAddress ? (
+ // Reverse Swap Amount Input
+
+
+
{
+ setBitcoinSwapAmount?.(e.target.value);
+ }}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && bitcoinSwapAmount && !swapAmountError && activeMintUrl && !isLoading) {
+ onSend();
+ }
+ }}
+ disabled={!activeMintUrl || isLoading}
+ className={`w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield] ${
+ swapAmountError ? 'border-destructive' : ''
+ }`}
+ />
+ {swapAmountError && (
+
{swapAmountError}
+ )}
+ {!swapAmountError && bitcoinSwapAmount && (
+
+ Amount must be between 25,000 and 25,000,000 sats
+
+ )}
+ {swapStatus && (
+
{swapStatus}
+ )}
+
+
+
+
+
+
+
+ ) : pendingLightningAddress ? (
+ // Lightning Address Amount Input
+
+
setLightningAddressAmount(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && lightningAddressAmount && activeMintUrl && !isResolvingAddress && !isLoading) {
+ onSend();
+ }
+ }}
+ disabled={!activeMintUrl}
+ className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield]"
+ />
+
+
+
+
+
+
+ ) : (
+ // Lightning Invoice/Address/Bitcoin Address Input
+
+
{
+ const value = e.target.value;
+ if (value.includes('@')) {
+ setLightningAddressInput(value);
+ setLightningInvoice('');
+ } else {
+ setLightningInvoice(value);
+ setLightningAddressInput('');
+ }
+ }}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && (lightningInvoice.trim() || lightningAddressInput.trim()) && activeMintUrl && !isLoading) {
+ onSend();
+ }
+ }}
+ disabled={!activeMintUrl}
+ className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2"
+ />
+
+
+ )
+ ) : (
+ // Receive Mode
+ mode === 'bitcoin' ? (
+ // Bitcoin Receive
+
+ ) : mode === 'tokens' ? (
+ // Cashu Token Receive
+
+
setTokenInput(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && tokenInput.trim() && activeMintUrl && !isLoading) {
+ onReceive();
+ }
+ }}
+ disabled={!activeMintUrl}
+ className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2"
+ />
+
+
+
+
+
+
+ ) : (
+ // Lightning Invoice Receive
+
+
setQuoteAmount(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter' && quoteAmount && activeMintUrl && !isLoading) {
+ onReceive();
+ }
+ }}
+ disabled={!activeMintUrl}
+ className="w-full h-16 !text-base text-center border bg-background focus:ring-2 focus:ring-ring focus:ring-offset-2 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none [-moz-appearance:textfield]"
+ />
+
+
+
+
+
+
+ )
+ )}
+
+
+ );
+}
diff --git a/src/components/wallet/ProofBreakdownModal.tsx b/src/components/wallet/ProofBreakdownModal.tsx
new file mode 100644
index 0000000..25d53e4
--- /dev/null
+++ b/src/components/wallet/ProofBreakdownModal.tsx
@@ -0,0 +1,83 @@
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
+import { Badge } from '@/components/ui/badge';
+import { X, Coins } from 'lucide-react';
+
+export interface ProofBreakdown {
+ mintUrl: string;
+ denominations: { [key: number]: number };
+ totalBalance: number;
+}
+
+interface ProofBreakdownModalProps {
+ isOpen: boolean;
+ onClose: () => void;
+ proofBreakdown: ProofBreakdown | null;
+}
+
+export function ProofBreakdownModal({
+ isOpen,
+ onClose,
+ proofBreakdown,
+}: ProofBreakdownModalProps) {
+ if (!isOpen || !proofBreakdown) return null;
+
+ return (
+
+
e.stopPropagation()}
+ >
+
+
+
+
+
+
+ Token Breakdown
+
+
+ {new URL(proofBreakdown.mintUrl).hostname}
+
+
+
+
+
+ {proofBreakdown.totalBalance.toLocaleString()} sats
+
+
Total Balance
+
+
+
+
Denominations:
+ {Object.entries(proofBreakdown.denominations)
+ .sort(([a], [b]) => parseInt(a) - parseInt(b))
+ .map(([amount, count]) => (
+
+
+
+ {parseInt(amount).toLocaleString()} sats
+
+
+ × {count}
+
+
+ ))}
+
+
+
+ 💡 Tip: If you can't pay an invoice, try sending tokens to yourself to get different denominations.
+
+
+
+
+ );
+}
diff --git a/src/components/wallet/QRScanner.tsx b/src/components/wallet/QRScanner.tsx
new file mode 100644
index 0000000..0462968
--- /dev/null
+++ b/src/components/wallet/QRScanner.tsx
@@ -0,0 +1,112 @@
+import { useEffect } from 'react';
+import { Button } from '@/components/ui/button';
+import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog';
+import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
+import { useToast } from '@/hooks/useToast';
+import type { QRScanResult } from '@/hooks/wallet/useQRCode';
+
+interface QRScannerProps {
+ isOpen: boolean;
+ onClose: () => Promise;
+ onResult: (result: QRScanResult) => void;
+ classifyQRCode: (text: string) => QRScanResult;
+ startScanning: (onResult: (result: QRScanResult) => void) => Promise;
+ stopScanning: () => Promise;
+ setModalOpen?: (isOpen: boolean) => void;
+ qrError: string | null;
+}
+
+export function QRScanner({
+ isOpen,
+ onClose,
+ onResult,
+ classifyQRCode,
+ startScanning,
+ stopScanning,
+ setModalOpen,
+ qrError,
+}: QRScannerProps) {
+ const { toast } = useToast();
+
+ // Handle paste from clipboard
+ const handlePasteQRCode = async () => {
+ try {
+ const text = await navigator.clipboard.readText();
+ if (!text || !text.trim()) {
+ toast({
+ variant: "destructive",
+ title: "Clipboard Empty",
+ description: "No text found in clipboard",
+ });
+ return;
+ }
+
+ const result = classifyQRCode(text.trim());
+ onResult(result);
+ await stopScanning();
+ await onClose();
+ } catch (err) {
+ toast({
+ variant: "destructive",
+ title: "Paste Failed",
+ description: "Could not read from clipboard",
+ });
+ console.error('Error pasting from clipboard:', err);
+ }
+ };
+
+ // Start/stop scanning based on isOpen
+ useEffect(() => {
+ if (isOpen) {
+ setModalOpen?.(true);
+ startScanning(onResult);
+ } else {
+ setModalOpen?.(false);
+ stopScanning();
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [isOpen, startScanning, stopScanning, setModalOpen]);
+
+ return (
+ {
+ if (!open) {
+ await onClose();
+ }
+ }}>
+
+
+ Scan QR Code
+
+
+ Position the QR code within the camera view to scan
+
+
+
+
+
+
+
+ {qrError && (
+
+ {qrError}
+
+ )}
+
+
+
+
+ Paste
+
+
+
+
+ );
+}
+
diff --git a/src/components/wallet/RemoveMintModal.tsx b/src/components/wallet/RemoveMintModal.tsx
new file mode 100644
index 0000000..79c5ada
--- /dev/null
+++ b/src/components/wallet/RemoveMintModal.tsx
@@ -0,0 +1,86 @@
+import { Button } from '@/components/ui/button';
+import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
+import { X, AlertTriangle, RefreshCw } from 'lucide-react';
+
+export interface MintToRemove {
+ url: string;
+ name?: string;
+}
+
+interface RemoveMintModalProps {
+ isOpen: boolean;
+ onClose: () => void;
+ mintToRemove: MintToRemove | null;
+ onConfirm: () => void;
+ isLoading: boolean;
+}
+
+export function RemoveMintModal({
+ isOpen,
+ onClose,
+ mintToRemove,
+ onConfirm,
+ isLoading,
+}: RemoveMintModalProps) {
+ if (!isOpen || !mintToRemove) return null;
+
+ return (
+
+
+
+
+
+
+
+
+ Remove Mint
+
+
+ Are you sure you want to remove this mint from your wallet?
+
+
+
+
+
{mintToRemove.name || new URL(mintToRemove.url).hostname}
+
+
+
+
⚠️ This will remove the mint and all associated data. Any tokens from this mint will no longer be accessible.
+
💡 You can always add this mint back later if needed.
+
+
+
+
+ Cancel
+
+
+ {isLoading ? (
+ <>
+
+ Removing...
+ >
+ ) : (
+ <>
+
+ Remove Mint
+ >
+ )}
+
+
+
+
+
+ );
+}
diff --git a/src/components/wallet/SeedPhraseModal.tsx b/src/components/wallet/SeedPhraseModal.tsx
new file mode 100644
index 0000000..e3628ab
--- /dev/null
+++ b/src/components/wallet/SeedPhraseModal.tsx
@@ -0,0 +1,136 @@
+import { useState } from 'react';
+import { Button } from '@/components/ui/button';
+import { Input } from '@/components/ui/input';
+import { Label } from '@/components/ui/label';
+import { X, Key, Loader2 } from 'lucide-react';
+import { useToast } from '@/hooks/useToast';
+
+interface SeedPhraseModalProps {
+ isOpen: boolean;
+ onClose: () => void;
+ onRestoreFromSeedPhrase: (seedPhrase: string, mintUrl: string) => Promise;
+ isRestoring: boolean;
+ mints: Array<{ url: string; name?: string }>;
+ activeMintUrl: string | null;
+}
+
+export function SeedPhraseModal({
+ isOpen,
+ onClose,
+ onRestoreFromSeedPhrase,
+ isRestoring,
+ mints,
+ activeMintUrl,
+}: SeedPhraseModalProps) {
+ const { toast } = useToast();
+ const [seedPhraseInput, setSeedPhraseInput] = useState('');
+
+ if (!isOpen) return null;
+
+ const handleRestore = async () => {
+ if (!seedPhraseInput.trim()) {
+ toast({
+ variant: "destructive",
+ title: "Missing Information",
+ description: "Please enter your seed phrase.",
+ });
+ return;
+ }
+
+ if (!activeMintUrl) {
+ toast({
+ variant: "destructive",
+ title: "No Active Mint",
+ description: "Please select a mint first.",
+ });
+ return;
+ }
+
+ try {
+ await onRestoreFromSeedPhrase(seedPhraseInput.trim(), activeMintUrl);
+ setSeedPhraseInput('');
+ onClose();
+ } catch (error) {
+ toast({
+ variant: "destructive",
+ title: "Restore Failed",
+ description: error instanceof Error ? error.message : "Failed to restore from seed phrase",
+ });
+ }
+ };
+
+ return (
+
+
e.stopPropagation()}
+ >
+
+
+
+
+
+
+
+
Restore from Seed Phrase
+
+
+
+ Enter your seed phrase to restore tokens from the active mint.
+
+
+ {activeMintUrl && (
+
+
+ Active Mint: {mints.find(m => m.url === activeMintUrl)?.name || new URL(activeMintUrl).hostname}
+
+
+ )}
+
+
+
+ Seed Phrase
+ setSeedPhraseInput(e.target.value)}
+ className="mt-1"
+ />
+
+
+
+
+ Note: This will restore tokens from the provided seed phrase and add them to your current wallet balance.
+
+
+
+
+
+
+ {isRestoring ? (
+ <>
+
+ Restoring...
+ >
+ ) : (
+ 'Restore Tokens'
+ )}
+
+
+
+
+
+ );
+}
diff --git a/src/components/wallet/TransactionHistory.tsx b/src/components/wallet/TransactionHistory.tsx
new file mode 100644
index 0000000..5adce08
--- /dev/null
+++ b/src/components/wallet/TransactionHistory.tsx
@@ -0,0 +1,226 @@
+import { Loader2, History, ArrowUpRight, ArrowDownLeft, ArrowLeftRight, Zap, Coins, Link } from 'lucide-react';
+import type { HistoryEntry } from 'coco-cashu-core';
+
+export interface BitcoinTransaction {
+ id: string;
+ txid: string;
+ type: 'sent' | 'received' | 'consolidate';
+ amount: number; // in satoshis
+ fee?: number; // in satoshis, only for sent transactions
+ address: string;
+ confirmations: number;
+ blockHeight?: number;
+ timestamp: number;
+ status: 'confirmed' | 'unconfirmed' | 'pending';
+}
+
+interface TransactionHistoryProps {
+ entries: HistoryEntry[];
+ isLoading: boolean;
+ // Bitcoin transaction props
+ bitcoinTransactions?: BitcoinTransaction[];
+ isBitcoinLoading?: boolean;
+ showSats?: boolean;
+}
+
+export function TransactionHistory({
+ entries,
+ isLoading,
+ bitcoinTransactions = [],
+ isBitcoinLoading = false,
+ showSats = true
+}: TransactionHistoryProps) {
+ // Icon indicating transaction type (Lightning vs Cashu)
+ const getTransactionTypeIcon = (type: string) => {
+ switch (type) {
+ case 'mint':
+ case 'melt':
+ return ;
+ case 'send':
+ case 'receive':
+ return ;
+ default:
+ return ;
+ }
+ };
+
+ // Arrow indicating direction (next to amount)
+ const getDirectionIcon = (type: string) => {
+ switch (type) {
+ case 'mint':
+ case 'receive':
+ return ;
+ case 'melt':
+ case 'send':
+ return ;
+ default:
+ return null;
+ }
+ };
+
+ const getHistoryLabel = (type: string) => {
+ switch (type) {
+ case 'mint':
+ case 'receive':
+ return 'Received';
+ case 'melt':
+ case 'send':
+ return 'Sent';
+ default:
+ return type;
+ }
+ };
+
+ // Bitcoin transaction formatting functions
+ const formatBitcoinAmount = (sats: number): string => {
+ if (showSats) {
+ return `${sats.toLocaleString()} sats`;
+ } else {
+ const btc = sats / 100000000;
+ return `₿${btc.toFixed(8)}`;
+ }
+ };
+
+ const formatBitcoinAddress = (address: string): string => {
+ return `${address.slice(0, 8)}...${address.slice(-8)}`;
+ };
+
+ const getBitcoinStatusColor = (status: string): string => {
+ switch (status) {
+ case 'confirmed':
+ return 'text-green-500';
+ case 'unconfirmed':
+ return 'text-yellow-500';
+ case 'pending':
+ return 'text-blue-500';
+ default:
+ return 'text-muted-foreground';
+ }
+ };
+
+ return (
+
+ {isLoading || isBitcoinLoading ? (
+
+
+ Loading transactions...
+
+ ) : entries.length === 0 && bitcoinTransactions.length === 0 ? (
+
+ No transactions yet
+
+ ) : (
+ <>
+ {/* Cashu/Lightning Transactions */}
+ {entries.map((entry) => (
+
+
+
+
+ {getTransactionTypeIcon(entry.type)}
+
+
+
+
+ {getHistoryLabel(entry.type)}
+
+
+
+ {new URL(entry.mintUrl).hostname}
+
+
+ {new Date(entry.createdAt).toLocaleString()}
+
+
+
+
+
+
+ {entry.type === 'send' || entry.type === 'melt' ? '-' : '+'}
+ {entry.amount.toLocaleString()} {entry.unit}
+
+ {entry.type === 'melt' && (
+
+ + fees
+
+ )}
+
+
+ {getDirectionIcon(entry.type)}
+
+
+
+
+ ))}
+
+ {/* Bitcoin Transactions */}
+ {bitcoinTransactions.map((tx) => (
+
+
+
+
+
+
+
+
+
+ {tx.type === 'received' ? 'Received' : tx.type === 'consolidate' ? 'Consolidate' : 'Sent'}
+
+
+ {tx.status}
+
+
+
+ {formatBitcoinAddress(tx.address)}
+
+
+ {new Date(tx.timestamp).toLocaleString()}
+ {tx.confirmations > 0 && (
+
+ • {tx.confirmations} confirmation{tx.confirmations !== 1 ? 's' : ''}
+
+ )}
+
+ {tx.blockHeight && (
+
+ Block #{tx.blockHeight}
+
+ )}
+
+
+
+
+
+ {tx.type === 'sent' ? '-' : tx.type === 'consolidate' ? '' : '+'}
+ {formatBitcoinAmount(tx.amount)}
+
+ {tx.fee !== undefined && tx.fee > 0 && (tx.type === 'sent' || tx.type === 'consolidate') && (
+
+ Fee: {formatBitcoinAmount(tx.fee)}
+
+ )}
+
+
+ {tx.type === 'received' ? (
+
+ ) : tx.type === 'consolidate' ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ ))}
+ >
+ )}
+
+ );
+}
diff --git a/src/components/wallet/UTXOSelector.tsx b/src/components/wallet/UTXOSelector.tsx
new file mode 100644
index 0000000..f8419e0
--- /dev/null
+++ b/src/components/wallet/UTXOSelector.tsx
@@ -0,0 +1,127 @@
+import { Button } from '@/components/ui/button';
+import { ChevronDown, Merge } from 'lucide-react';
+import { useState, useEffect } from 'react';
+import { exchangeRateService } from '@/lib/exchangeRateService';
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from '@/components/ui/dropdown-menu';
+import { UTXO } from '@/lib/bitcoin';
+
+interface UTXOSelectorProps {
+ utxos: UTXO[];
+ showSats: boolean;
+ bitcoinAddress: string;
+ dropdownOpen: boolean;
+ setDropdownOpen: (open: boolean) => void;
+ onShowConsolidationModal?: () => void;
+ isConsolidating?: boolean;
+}
+
+export function UTXOSelector({
+ utxos,
+ showSats,
+ dropdownOpen,
+ setDropdownOpen,
+ onShowConsolidationModal,
+ isConsolidating,
+}: UTXOSelectorProps) {
+ const [btcUsdRate, setBtcUsdRate] = useState(null);
+
+ useEffect(() => {
+ exchangeRateService.getBtcUsdRate()
+ .then(rate => setBtcUsdRate(rate))
+ .catch(() => setBtcUsdRate(null));
+ }, []);
+
+
+ const formatBalance = (sats: number): string => {
+ if (showSats) {
+ return `₿${sats.toLocaleString()}`;
+ } else if (btcUsdRate) {
+ const btcAmount = sats / 100000000;
+ const usd = btcAmount * btcUsdRate;
+ return `$${usd.toFixed(2)}`;
+ } else {
+ return `₿${sats.toLocaleString()}`;
+ }
+ };
+
+ const totalBalance = utxos.reduce((sum, utxo) => sum + utxo.value, 0);
+
+ const formatUTXOBlock = (utxo: UTXO): string => {
+ if (utxo.status.block_height) {
+ return `Block #${utxo.status.block_height}`;
+ } else {
+ return 'Unconfirmed';
+ }
+ };
+
+ return (
+
+
+
+
+
+
+
+ {utxos.length === 0 ? 'No UTXOs' : `${utxos.length} UTXO${utxos.length !== 1 ? 's' : ''}`}
+
+
+
+ {formatBalance(totalBalance)}
+
+
+
+
+
+
+
+ {utxos.length === 0 ? (
+
+ No UTXOs available
+
+ ) : (
+ utxos.map((utxo) => (
+
+
+
+
+ {formatUTXOBlock(utxo)}
+
+
+
+
+
+ {formatBalance(utxo.value)}
+
+
+
+ ))
+ )}
+
+
+
+
+ {onShowConsolidationModal && (
+
+
+
+ )}
+
+ );
+}
diff --git a/src/components/wallet/WalletContainer.tsx b/src/components/wallet/WalletContainer.tsx
new file mode 100644
index 0000000..13286cd
--- /dev/null
+++ b/src/components/wallet/WalletContainer.tsx
@@ -0,0 +1,232 @@
+import { useState, useEffect, useRef, useCallback } from 'react';
+import { nip19 } from 'nostr-tools';
+import { useCurrentUser } from '@/hooks/useCurrentUser';
+import { useToast } from '@/hooks/useToast';
+import { useQRCode, type QRScanResult } from '@/hooks/wallet/useQRCode';
+import { useCopyToClipboard } from '@/hooks/useCopyToClipboard';
+import { useCashu } from '@/hooks/wallet/useCashu';
+import { useBitcoinBalance } from '@/hooks/wallet/useBitcoin';
+import { nostrPubkeyToBitcoinAddress } from '@/lib/bitcoin';
+import { WalletHeader } from './WalletHeader';
+import { CashuWallet } from './CashuWallet';
+import { BitcoinWallet } from './BitcoinWallet';
+import { QRScanner } from './QRScanner';
+import { decodeBolt11Amount } from '@/lib/bolt11Decoder';
+
+export function WalletContainer() {
+ const [mode, setMode] = useState<'tokens' | 'lightning' | 'bitcoin'>('lightning');
+ const [showSats, setShowSats] = useState(true);
+ const [showQRScanner, setShowQRScanner] = useState(false);
+
+ // Shared hooks
+ const { user } = useCurrentUser();
+ const { toast } = useToast();
+ const { generateQRCode, classifyQRCode, startScanning, stopScanning, setModalOpen, error: qrError } = useQRCode();
+ const { copy: copyToClipboard } = useCopyToClipboard();
+
+ // Get balance data for WalletHeader
+ const { balances, mnemonic } = useCashu();
+ const bitcoinAddress = user?.pubkey ? nostrPubkeyToBitcoinAddress(user.pubkey) : null;
+ const { data: bitcoinBalanceData } = useBitcoinBalance(bitcoinAddress);
+
+ // Calculate total balance based on mode
+ const totalBalance: number = mode === 'bitcoin'
+ ? (bitcoinBalanceData?.balance || 0)
+ : (Object.values(balances) as number[]).reduce((sum: number, balance: number) => sum + balance, 0);
+
+ // Refs to call wallet QR handlers
+ const cashuWalletQRHandlerRef = useRef<((result: QRScanResult) => void) | null>(null);
+ const bitcoinWalletQRHandlerRef = useRef<((result: QRScanResult) => void) | null>(null);
+
+ // Handle QR scanner results and route to appropriate wallet
+ const handleQRScanResult = async (result: QRScanResult) => {
+ try {
+ await stopScanning();
+ setShowQRScanner(false);
+
+ switch (result.type) {
+ case 'cashu_token': {
+ setMode('tokens');
+ // Call CashuWallet handler if available
+ if (cashuWalletQRHandlerRef.current) {
+ cashuWalletQRHandlerRef.current(result);
+ }
+ break;
+ }
+ case 'lightning_invoice': {
+ setMode('lightning');
+ // Call CashuWallet handler if available
+ if (cashuWalletQRHandlerRef.current) {
+ cashuWalletQRHandlerRef.current(result);
+ }
+ break;
+ }
+ case 'lightning_address': {
+ setMode('lightning');
+ // Call CashuWallet handler if available
+ if (cashuWalletQRHandlerRef.current) {
+ cashuWalletQRHandlerRef.current(result);
+ }
+ break;
+ }
+ case 'bitcoin_address': {
+ setMode('bitcoin');
+ // Call BitcoinWallet handler if available
+ if (bitcoinWalletQRHandlerRef.current) {
+ bitcoinWalletQRHandlerRef.current(result);
+ }
+ break;
+ }
+ case 'npub': {
+ setMode('bitcoin');
+ // Call BitcoinWallet handler if available
+ if (bitcoinWalletQRHandlerRef.current) {
+ bitcoinWalletQRHandlerRef.current(result);
+ }
+ break;
+ }
+ default: {
+ toast({
+ variant: "destructive",
+ title: "Unknown QR Code",
+ description: result.value,
+ });
+ }
+ }
+ } catch (err) {
+ console.error('Error handling QR scan:', err);
+ }
+ };
+
+ // Set up refs to wallet QR handlers
+ useEffect(() => {
+ const checkHandlers = () => {
+ if ((window as any).__cashuWalletQRHandler) {
+ cashuWalletQRHandlerRef.current = (window as any).__cashuWalletQRHandler;
+ }
+ if ((window as any).__bitcoinWalletQRHandler) {
+ bitcoinWalletQRHandlerRef.current = (window as any).__bitcoinWalletQRHandler;
+ }
+ };
+
+ // Check periodically for handlers (wallets set them up asynchronously)
+ const interval = setInterval(checkHandlers, 100);
+ checkHandlers(); // Initial check
+
+ return () => clearInterval(interval);
+ }, []);
+
+ // WalletHeader props - these will be passed from wallets via callbacks
+ const [walletHeaderProps, setWalletHeaderProps] = useState<{
+ activeMintUrl?: string | null;
+ mints?: Array<{ url: string; name?: string }>;
+ mintUrl?: string;
+ setMintUrl?: (url: string) => void;
+ onAddMint?: () => void;
+ onRemoveMint?: (mint: { url: string; name?: string }) => void;
+ onShowDenominations?: (mintUrl: string) => void;
+ getCleanMintLabel?: (mint: { name?: string; url: string }) => string;
+ mintDropdownOpen?: boolean;
+ setMintDropdownOpen?: (open: boolean) => void;
+ npubCashUsername?: string;
+ utxos?: Array;
+ utxoDropdownOpen?: boolean;
+ setUtxoDropdownOpen?: (open: boolean) => void;
+ onShowConsolidationModal?: () => void;
+ isConsolidating?: boolean;
+ onShowLightningAddressQR?: (qr: string) => void;
+ onShowBitcoinAddressQR?: (qr: string) => void;
+ onShowSeedPhraseInfo?: () => void;
+ setActiveMintUrl?: (url: string | null) => void;
+ }>({});
+
+ // Memoize the callback to prevent infinite loops
+ const handleWalletHeaderPropsChange = useCallback((props: typeof walletHeaderProps) => {
+ setWalletHeaderProps(props);
+ }, []);
+
+ return (
+ <>
+
+ {/* Wallet Header */}
+ {})}
+ onShowBitcoinAddressQR={walletHeaderProps.onShowBitcoinAddressQR || (() => {})}
+ onShowSeedPhraseInfo={walletHeaderProps.onShowSeedPhraseInfo || (() => {})}
+ generateQRCode={generateQRCode}
+ // MintSelector props (only for tokens/lightning)
+ activeMintUrl={mode !== 'bitcoin' ? (walletHeaderProps.activeMintUrl ?? null) : null}
+ setActiveMintUrl={walletHeaderProps.setActiveMintUrl || (() => {})}
+ mints={mode !== 'bitcoin' ? (walletHeaderProps.mints || []) : []}
+ mintUrl={walletHeaderProps.mintUrl || ''}
+ setMintUrl={walletHeaderProps.setMintUrl || (() => {})}
+ onAddMint={walletHeaderProps.onAddMint || (() => {})}
+ onRemoveMint={walletHeaderProps.onRemoveMint || (() => {})}
+ onShowDenominations={walletHeaderProps.onShowDenominations || (() => {})}
+ getCleanMintLabel={walletHeaderProps.getCleanMintLabel || (() => '')}
+ dropdownOpen={walletHeaderProps.mintDropdownOpen || false}
+ setDropdownOpen={walletHeaderProps.setMintDropdownOpen || (() => {})}
+ // UTXOSelector props (only for bitcoin)
+ utxos={mode === 'bitcoin' ? (walletHeaderProps.utxos || []) : []}
+ utxoDropdownOpen={walletHeaderProps.utxoDropdownOpen || false}
+ setUtxoDropdownOpen={walletHeaderProps.setUtxoDropdownOpen || (() => {})}
+ onShowConsolidationModal={walletHeaderProps.onShowConsolidationModal}
+ isConsolidating={walletHeaderProps.isConsolidating}
+ />
+
+ {/* Render appropriate wallet based on mode */}
+ {mode === 'tokens' || mode === 'lightning' ? (
+ setShowQRScanner(true)}
+ onWalletHeaderPropsChange={handleWalletHeaderPropsChange}
+ />
+ ) : (
+ setShowQRScanner(true)}
+ onQRResult={(result) => {
+ if (bitcoinWalletQRHandlerRef.current) {
+ bitcoinWalletQRHandlerRef.current(result);
+ }
+ }}
+ onWalletHeaderPropsChange={handleWalletHeaderPropsChange}
+ />
+ )}
+
+
+ {/* Shared QR Scanner */}
+ {
+ await stopScanning();
+ setShowQRScanner(false);
+ }}
+ onResult={handleQRScanResult}
+ classifyQRCode={classifyQRCode}
+ startScanning={startScanning}
+ stopScanning={stopScanning}
+ setModalOpen={setModalOpen}
+ qrError={qrError}
+ />
+ >
+ );
+}
+
diff --git a/src/components/wallet/WalletHeader.tsx b/src/components/wallet/WalletHeader.tsx
new file mode 100644
index 0000000..d49732b
--- /dev/null
+++ b/src/components/wallet/WalletHeader.tsx
@@ -0,0 +1,352 @@
+import { useState, useEffect } from 'react';
+import { Zap, Coins, Copy, Check, QrCode, Link, Key } from 'lucide-react';
+import { exchangeRateService } from '@/lib/exchangeRateService';
+import { LoginIcon } from '@/components/auth/LoginIcon';
+import { MintSelector } from './MintSelector';
+import { UTXOSelector } from './UTXOSelector';
+import { nostrPubkeyToBitcoinAddress } from '@/lib/bitcoin';
+import { UTXO } from '@/lib/bitcoin';
+
+interface CashuMint {
+ url: string;
+ name?: string;
+}
+
+interface WalletHeaderProps {
+ totalBalance: number;
+ balances: { [key: string]: number };
+ showSats: boolean;
+ setShowSats: (showSats: boolean) => void;
+ mode: 'tokens' | 'lightning' | 'bitcoin';
+ setMode: (mode: 'tokens' | 'lightning' | 'bitcoin') => void;
+ userPubkey?: string;
+ npubCashUsername?: string;
+ mnemonic?: string | null;
+ onCopyToClipboard: (text: string) => Promise;
+ onShowLightningAddressQR: (qrCode: string) => void;
+ onShowBitcoinAddressQR: (qrCode: string) => void;
+ onShowSeedPhraseInfo: () => void;
+ generateQRCode: (text: string) => Promise;
+ // MintSelector props
+ activeMintUrl: string | null;
+ setActiveMintUrl: (url: string | null) => void;
+ mints: CashuMint[];
+ mintUrl: string;
+ setMintUrl: (url: string) => void;
+ onAddMint: () => void;
+ onRemoveMint: (mint: CashuMint) => void;
+ onShowDenominations: (mintUrl: string) => void;
+ getCleanMintLabel: (mint: { name?: string; url: string }) => string;
+ dropdownOpen: boolean;
+ setDropdownOpen: (open: boolean) => void;
+ // UTXOSelector props
+ utxos: UTXO[];
+ utxoDropdownOpen: boolean;
+ setUtxoDropdownOpen: (open: boolean) => void;
+ onShowConsolidationModal?: () => void;
+ isConsolidating?: boolean;
+}
+
+// Helper functions to prevent syntax errors in complex expressions
+// These functions break down complex inline logic to make the code more maintainable
+// and less prone to syntax errors when AI agents edit this file
+const formatBalance = (balance: number, showSats: boolean, btcUsdRate?: number | null): string => {
+ if (showSats) {
+ return balance.toLocaleString();
+ }
+
+ if (btcUsdRate) {
+ const usdAmount = (balance / 100000000 * btcUsdRate).toFixed(2);
+ return usdAmount;
+ }
+
+ return balance.toLocaleString();
+};
+
+const getBalanceSymbol = (showSats: boolean): JSX.Element => {
+ return showSats ? (
+ ₿
+ ) : (
+ $
+ );
+};
+
+const getToggleTitle = (showSats: boolean): string => {
+ return `Click to show in ${showSats ? 'USD' : 'sats'}`;
+};
+
+const getButtonTitle = (mode: string): string => {
+ switch (mode) {
+ case 'tokens': return 'Switch to On-Chain';
+ case 'lightning': return 'Switch to Cashu';
+ case 'bitcoin': return 'Switch to Lightning';
+ default: return 'Switch Mode';
+ }
+};
+
+export function WalletHeader({
+ totalBalance,
+ balances,
+ showSats,
+ setShowSats,
+ mode,
+ setMode,
+ userPubkey,
+ npubCashUsername,
+ mnemonic,
+ onCopyToClipboard,
+ onShowLightningAddressQR,
+ onShowBitcoinAddressQR,
+ onShowSeedPhraseInfo,
+ generateQRCode,
+ // MintSelector props
+ activeMintUrl,
+ setActiveMintUrl,
+ mints,
+ mintUrl,
+ setMintUrl,
+ onAddMint,
+ onRemoveMint,
+ onShowDenominations,
+ getCleanMintLabel,
+ dropdownOpen,
+ setDropdownOpen,
+ // UTXOSelector props
+ utxos,
+ utxoDropdownOpen,
+ setUtxoDropdownOpen,
+ onShowConsolidationModal,
+ isConsolidating,
+}: WalletHeaderProps) {
+ const [lightningAddressCopied, setLightningAddressCopied] = useState(false);
+ const [bitcoinAddressCopied, setBitcoinAddressCopied] = useState(false);
+ const [mnemonicCopied, setMnemonicCopied] = useState(false);
+ const [btcUsdRate, setBtcUsdRate] = useState(null);
+
+ useEffect(() => {
+ exchangeRateService.getBtcUsdRate()
+ .then(rate => setBtcUsdRate(rate))
+ .catch(() => setBtcUsdRate(null));
+ }, []);
+
+ const toggleMode = () => {
+ let newMode: 'tokens' | 'lightning' | 'bitcoin';
+ if (mode === 'lightning') {
+ newMode = 'tokens';
+ } else if (mode === 'tokens') {
+ newMode = 'bitcoin';
+ } else {
+ newMode = 'lightning';
+ }
+
+ setMode(newMode);
+ };
+
+
+ return (
+
+ {/* Mode Toggle */}
+
+
+ {mode === 'tokens' ? (
+
+ ) : mode === 'lightning' ? (
+
+ ) : (
+
+ )}
+
+
+
+ {/* Login Icon */}
+
+
+
+
+ {/* Balance Display */}
+
+
+ setShowSats(!showSats)}
+ className="text-6xl font-bold tabular-nums hover:opacity-80 transition-opacity cursor-pointer"
+ title={getToggleTitle(showSats)}
+ >
+
+ {getBalanceSymbol(showSats)}
+
+ {formatBalance(totalBalance, showSats, btcUsdRate)}
+
+
+ {/* Custody Badge */}
+
+ {mode === 'bitcoin' ? 'Self-Custody' : 'Mint-Custody'}
+
+
+
+ {/* Lightning Address and Mint Selector Grid */}
+
+
+
+ {/* Lightning Address Row */}
+ {userPubkey && mode === 'lightning' && (
+
+
{
+ const lightningAddress = `${npubCashUsername}@npubx.cash`;
+ await onCopyToClipboard(lightningAddress);
+ setLightningAddressCopied(true);
+ setTimeout(() => setLightningAddressCopied(false), 2000);
+ }}
+ className="flex items-center gap-2 px-3 py-1.5 bg-muted hover:bg-muted/80 rounded-md border text-base font-mono transition-colors flex-1 h-[40px] min-w-0"
+ title="Click to copy Lightning address"
+ >
+
+
+ {npubCashUsername || ''}
+
+
+ @npubx.cash
+
+
+ {lightningAddressCopied ? (
+
+ ) : (
+
+ )}
+
+
{
+ const lightningAddress = `${npubCashUsername}@npubx.cash`;
+ const qr = await generateQRCode(lightningAddress);
+ onShowLightningAddressQR(qr);
+ }}
+ className="flex items-center justify-center px-2 py-1.5 hover:bg-muted rounded-md transition-colors h-[40px] w-[42px] flex-shrink-0"
+ title="Show QR Code"
+ >
+
+
+
+ )}
+
+ {/* Mnemonic Seed Phrase Row */}
+ {mode === 'tokens' && mnemonic && (
+
+
{
+ await onCopyToClipboard(mnemonic);
+ setMnemonicCopied(true);
+ setTimeout(() => setMnemonicCopied(false), 2000);
+ }}
+ className="flex items-center gap-2 px-3 py-1.5 bg-muted hover:bg-muted/80 rounded-md border text-base font-mono transition-colors flex-1 h-[40px] min-w-0"
+ title="Click to copy seed phrase"
+ >
+
+
+ {mnemonic.split(' ').map(() => '****').join(' ')}
+
+
+ {mnemonicCopied ? (
+
+ ) : (
+
+ )}
+
+
+
+
+
+ )}
+
+ {/* Bitcoin Address Row */}
+ {userPubkey && mode === 'bitcoin' && (() => {
+ const bitcoinAddress = nostrPubkeyToBitcoinAddress(userPubkey);
+ return bitcoinAddress ? (
+
+
{
+ await onCopyToClipboard(bitcoinAddress);
+ setBitcoinAddressCopied(true);
+ setTimeout(() => setBitcoinAddressCopied(false), 2000);
+ }}
+ className="flex items-center gap-2 px-3 py-1.5 bg-muted hover:bg-muted/80 rounded-md border text-base font-mono transition-colors flex-1 h-[40px] min-w-0"
+ title="Click to copy Bitcoin address"
+ >
+
+
+ {bitcoinAddress}
+
+
+ {bitcoinAddressCopied ? (
+
+ ) : (
+
+ )}
+
+
{
+ const qr = await generateQRCode(bitcoinAddress);
+ onShowBitcoinAddressQR(qr);
+ }}
+ className="flex items-center justify-center px-2 py-1.5 hover:bg-muted rounded-md transition-colors h-[40px] w-[42px] flex-shrink-0"
+ title="Show QR Code"
+ >
+
+
+
+ ) : null;
+ })()}
+
+ {/* UTXO Selector Row */}
+ {mode === 'bitcoin' && (
+
+
+
+ )}
+
+ {/* Mint Selector Row */}
+ {mode !== 'bitcoin' && (
+
+
+
+ )}
+
+
+
+
+
+ );
+}
diff --git a/src/contexts/CashuContext.tsx b/src/contexts/CashuContext.tsx
new file mode 100644
index 0000000..7b4d410
--- /dev/null
+++ b/src/contexts/CashuContext.tsx
@@ -0,0 +1,24 @@
+import { createContext, useContext, ReactNode } from 'react';
+import { useCashu as useCashuHook, type UseCashuReturn } from '@/hooks/wallet/useCashu';
+
+const CashuContext = createContext(null);
+
+export function CashuProvider({ children }: { children: ReactNode }) {
+ const cashu = useCashuHook();
+
+ return (
+
+ {children}
+
+ );
+}
+
+export function useCashuContext(): UseCashuReturn {
+ const context = useContext(CashuContext);
+
+ if (!context) {
+ throw new Error('useCashuContext must be used within a CashuProvider');
+ }
+
+ return context;
+}
\ No newline at end of file
diff --git a/src/hooks/useCopyToClipboard.ts b/src/hooks/useCopyToClipboard.ts
new file mode 100644
index 0000000..4ffa3f8
--- /dev/null
+++ b/src/hooks/useCopyToClipboard.ts
@@ -0,0 +1,52 @@
+import { useState, useCallback } from 'react';
+import { useToast } from './useToast';
+
+interface UseCopyToClipboardReturn {
+ copy: (text: string) => Promise;
+ copied: boolean;
+ copyError: string | null;
+}
+
+/**
+ * Hook for copying text to clipboard with feedback
+ *
+ * @example
+ * ```tsx
+ * const { copy, copied, copyError } = useCopyToClipboard();
+ *
+ * await copy('cashuBo2Ft...');
+ * // copied will be true for 2 seconds
+ * ```
+ */
+export function useCopyToClipboard(): UseCopyToClipboardReturn {
+ const [copied, setCopied] = useState(false);
+ const [copyError, setCopyError] = useState(null);
+ const { toast } = useToast();
+
+ const copy = useCallback(async (text: string): Promise => {
+ try {
+ await navigator.clipboard.writeText(text);
+ setCopied(true);
+ setCopyError(null);
+
+ // Auto-reset copied state after 2 seconds
+ setTimeout(() => setCopied(false), 2000);
+ } catch (err) {
+ const errorMessage = 'Failed to copy to clipboard';
+ console.error(errorMessage, err);
+ setCopyError(errorMessage);
+
+ toast({
+ variant: "destructive",
+ title: "Copy Failed",
+ description: errorMessage,
+ });
+ }
+ }, [toast]);
+
+ return {
+ copy,
+ copied,
+ copyError,
+ };
+}
diff --git a/src/hooks/useNIP98.ts b/src/hooks/useNIP98.ts
new file mode 100644
index 0000000..15773df
--- /dev/null
+++ b/src/hooks/useNIP98.ts
@@ -0,0 +1,74 @@
+import { useCallback } from 'react';
+import { useCurrentUser } from './useCurrentUser';
+import type { NostrEvent } from '@nostrify/nostrify';
+
+export interface NIP98Options {
+ url: string;
+ method: string;
+ body?: unknown;
+}
+
+/**
+ * Hook for creating NIP-98 HTTP Authentication headers
+ * Based on https://github.com/nostr-protocol/nips/blob/master/98.md
+ */
+export function useNIP98() {
+ const { user } = useCurrentUser();
+
+ /**
+ * Create a NIP-98 authorization header for HTTP requests
+ * @param options - The request details (url, method, optional body)
+ * @returns Promise - The "Nostr base64..." authorization header value
+ */
+ const createAuthHeader = useCallback(async (options: NIP98Options): Promise => {
+ if (!user) {
+ throw new Error('User must be logged in to create NIP-98 auth header');
+ }
+
+ const { url, method, body } = options;
+
+ // Parse URL to remove query parameters (per NIP-98 spec)
+ const urlObj = new URL(url);
+ const urlWithoutQuery = `${urlObj.protocol}//${urlObj.host}${urlObj.pathname}`;
+
+ const tags: string[][] = [
+ ['u', urlWithoutQuery],
+ ['method', method.toUpperCase()],
+ ];
+
+ // If there's a request body (POST, PUT, PATCH), add payload hash
+ if (body && (method === 'POST' || method === 'PUT' || method === 'PATCH')) {
+ const bodyString = JSON.stringify(body);
+ const encoder = new TextEncoder();
+ const data = encoder.encode(bodyString);
+ const hashBuffer = await crypto.subtle.digest('SHA-256', data);
+ const payloadHash = Array.from(new Uint8Array(hashBuffer))
+ .map(b => b.toString(16).padStart(2, '0'))
+ .join('');
+
+ tags.push(['payload', payloadHash]);
+ }
+
+ // Create and sign the NIP-98 event (kind 27235)
+ const event = await user.signer.signEvent({
+ kind: 27235,
+ content: '',
+ tags,
+ created_at: Math.floor(Date.now() / 1000),
+ }) as NostrEvent;
+
+ // Encode the event as base64
+ const eventJson = JSON.stringify(event);
+ const base64Event = btoa(eventJson);
+
+ return `Nostr ${base64Event}`;
+ }, [user]);
+
+ return {
+ createAuthHeader,
+ isLoggedIn: !!user,
+ pubkey: user?.pubkey,
+ signer: user?.signer,
+ };
+}
+
diff --git a/src/hooks/useNsecAccess.ts b/src/hooks/useNsecAccess.ts
new file mode 100644
index 0000000..45407da
--- /dev/null
+++ b/src/hooks/useNsecAccess.ts
@@ -0,0 +1,51 @@
+import { useNostrLogin } from '@nostrify/react/login';
+import { nip19 } from 'nostr-tools';
+
+/**
+ * Hook to check if the current user is logged in with nsec and get the private key.
+ * Only works when user is logged in with nsec (not extension or bunker).
+ */
+export function useNsecAccess() {
+ const { logins } = useNostrLogin();
+
+ const currentLogin = logins[0];
+
+ // Check if user is logged in with nsec
+ const hasNsecAccess = currentLogin?.type === 'nsec';
+
+ // Get the private key in hex format (only if nsec login)
+ const getPrivateKey = (): string | null => {
+ if (!hasNsecAccess || !currentLogin) return null;
+
+ try {
+ // The nsec is stored in the login data as 'data.nsec' property
+ const loginData = currentLogin as { data?: { nsec: string } };
+ const nsec = loginData.data?.nsec;
+
+ if (!nsec) {
+ console.error('No nsec found in login data');
+ return null;
+ }
+
+ const decoded: { type: string; data: Uint8Array | string | object } = nip19.decode(nsec) as { type: string; data: Uint8Array | string | object };
+
+ // Type guard to ensure we have an nsec
+ if (decoded.type !== 'nsec') {
+ console.error('Invalid nsec format, got type:', decoded.type);
+ return null;
+ }
+
+ // Convert Uint8Array to hex string
+ return Buffer.from(decoded.data as Uint8Array).toString('hex');
+ } catch (error) {
+ console.error('Failed to decode nsec:', error);
+ return null;
+ }
+ };
+
+ return {
+ hasNsecAccess,
+ getPrivateKey,
+ loginType: currentLogin?.type,
+ };
+}
diff --git a/src/hooks/useToast.ts b/src/hooks/useToast.ts
index 62cc2e2..52fd993 100644
--- a/src/hooks/useToast.ts
+++ b/src/hooks/useToast.ts
@@ -6,7 +6,7 @@ import type {
} from "@/components/ui/toast"
const TOAST_LIMIT = 1
-const TOAST_REMOVE_DELAY = 1000000
+const TOAST_REMOVE_DELAY = 1000
type ToasterToast = ToastProps & {
id: string
diff --git a/src/hooks/useWallet.ts b/src/hooks/useWallet.ts
index 0cf9e88..8d521da 100644
--- a/src/hooks/useWallet.ts
+++ b/src/hooks/useWallet.ts
@@ -1,16 +1,22 @@
import { useMemo } from 'react';
import { useNWC } from '@/hooks/useNWCContext';
+import { useCashu } from '@/hooks/wallet/useCashu';
import type { WebLNProvider } from '@webbtc/webln-types';
export interface WalletStatus {
hasNWC: boolean;
webln: WebLNProvider | null;
activeNWC: ReturnType['getActiveConnection'] extends () => infer T ? T : null;
- preferredMethod: 'nwc' | 'webln' | 'manual';
+ preferredMethod: 'cashu' | 'nwc' | 'webln' | 'manual';
+ // Cashu integration
+ hasCashu: boolean;
+ cashuBalance: number;
+ isCashuInitialized: boolean;
}
export function useWallet() {
const { connections, getActiveConnection } = useNWC();
+ const { balances, mints, isInitialized: isCashuInitialized } = useCashu();
// Get the active connection directly - no memoization to avoid stale state
const activeNWC = getActiveConnection();
@@ -18,13 +24,24 @@ export function useWallet() {
// Access WebLN directly from browser global scope
const webln = (globalThis as { webln?: WebLNProvider }).webln || null;
- // Calculate status values reactively
+ // Calculate Cashu status
+ const hasCashu = useMemo(() => {
+ return isCashuInitialized && mints.some(mint => (balances[mint.url] || 0) > 0);
+ }, [isCashuInitialized, mints, balances]);
+
+ const cashuBalance = useMemo(() => {
+ return Object.values(balances).reduce((sum, balance) => sum + balance, 0);
+ }, [balances]);
+
+ // Calculate Lightning status values reactively
const hasNWC = useMemo(() => {
return connections.length > 0 && connections.some(c => c.isConnected);
}, [connections]);
- // Determine preferred payment method
- const preferredMethod: WalletStatus['preferredMethod'] = activeNWC
+ // Determine preferred payment method - Cashu first, then Lightning fallbacks
+ const preferredMethod: WalletStatus['preferredMethod'] = hasCashu
+ ? 'cashu'
+ : activeNWC
? 'nwc'
: webln
? 'webln'
@@ -35,6 +52,9 @@ export function useWallet() {
webln,
activeNWC,
preferredMethod,
+ hasCashu,
+ cashuBalance,
+ isCashuInitialized,
};
return status;
diff --git a/src/hooks/useZaps.ts b/src/hooks/useZaps.ts
index 1bfeb2b..cd3ff33 100644
--- a/src/hooks/useZaps.ts
+++ b/src/hooks/useZaps.ts
@@ -4,6 +4,7 @@ import { useAuthor } from '@/hooks/useAuthor';
import { useAppContext } from '@/hooks/useAppContext';
import { useToast } from '@/hooks/useToast';
import { useNWC } from '@/hooks/useNWCContext';
+import { useCashu } from '@/hooks/wallet/useCashu';
import type { NWCConnection } from '@/hooks/useNWC';
import { nip57 } from 'nostr-tools';
import type { Event } from 'nostr-tools';
@@ -29,6 +30,7 @@ export function useZaps(
const author = useAuthor(actualTarget?.pubkey);
const { sendPayment, getActiveConnection } = useNWC();
+ const { coco, balances, mints, isInitialized: isCashuInitialized } = useCashu();
const [isZapping, setIsZapping] = useState(false);
const [invoice, setInvoice] = useState(null);
@@ -131,7 +133,13 @@ export function useZaps(
}, [zapEvents, actualTarget]);
const zap = async (amount: number, comment: string) => {
- if (amount <= 0) {
+ if (amount <= 0 || isNaN(amount)) {
+ toast({
+ title: 'Invalid amount',
+ description: 'Please enter a valid amount greater than 0.',
+ variant: 'destructive',
+ });
+ setIsZapping(false);
return;
}
@@ -158,6 +166,17 @@ export function useZaps(
return;
}
+ // Additional validation to ensure actualTarget has required properties
+ if (!actualTarget.pubkey || !actualTarget.id) {
+ toast({
+ title: 'Invalid event',
+ description: 'The event is missing required properties.',
+ variant: 'destructive',
+ });
+ setIsZapping(false);
+ return;
+ }
+
try {
if (!author.data || !author.data?.metadata || !author.data?.event ) {
toast({
@@ -192,18 +211,18 @@ export function useZaps(
return;
}
- // Create zap request - use appropriate event format based on kind
- // For addressable events (30000-39999), pass the object to get 'a' tag
- // For all other events, pass the ID string to get 'e' tag
- const event = (actualTarget.kind >= 30000 && actualTarget.kind < 40000)
- ? actualTarget
- : actualTarget.id;
-
const zapAmount = amount * 1000; // convert to millisats
+ // Validate zapAmount is a valid number
+ if (isNaN(zapAmount) || zapAmount <= 0) {
+ throw new Error('Invalid zap amount');
+ }
+
+ // Create zap request - always pass the full event object
+ // The nip57.makeZapRequest function will handle proper tag generation
+ // ('e' tag for regular events, 'a' tag for addressable events)
const zapRequest = nip57.makeZapRequest({
- profile: actualTarget.pubkey,
- event: event,
+ event: actualTarget,
amount: zapAmount,
relays: [config.relayUrl],
comment
@@ -228,10 +247,57 @@ export function useZaps(
throw new Error('Lightning service did not return a valid invoice');
}
+ // Check if Cashu wallet is available and has sufficient balance
+ const canPayWithCashu = isCashuInitialized && mints.some(mint => (balances[mint.url] || 0) >= amount);
+
+ if (canPayWithCashu) {
+ try {
+ // Find a mint with sufficient balance
+ const mintWithBalance = mints.find(mint => {
+ const balance = balances[mint.url] || 0;
+ return balance >= amount;
+ });
+
+ if (mintWithBalance && coco) {
+ // Create melt quote to convert Cashu tokens to Lightning payment
+ const meltQuote = await coco.quotes.createMeltQuote(mintWithBalance.url, newInvoice);
+
+ // Pay the melt quote (this burns the Cashu tokens and pays the Lightning invoice)
+ await coco.quotes.payMeltQuote(mintWithBalance.url, meltQuote.quote);
+
+ // Clear states immediately on success
+ setIsZapping(false);
+ setInvoice(null);
+
+ toast({
+ title: 'Zap successful!',
+ description: `You sent ${amount} sats from your Cashu wallet to the author.`,
+ });
+
+ // Invalidate zap queries to refresh counts
+ queryClient.invalidateQueries({ queryKey: ['zaps'] });
+
+ // Close dialog last to ensure clean state
+ onZapSuccess?.();
+ return;
+ }
+ } catch (cashuError) {
+ console.error('Cashu payment failed, falling back:', cashuError);
+
+ // Show specific Cashu error to user for debugging
+ const errorMessage = cashuError instanceof Error ? cashuError.message : 'Unknown Cashu error';
+ toast({
+ title: 'Cashu payment failed',
+ description: `${errorMessage}. Falling back to other payment methods...`,
+ variant: 'destructive',
+ });
+ }
+ }
+
// Get the current active NWC connection dynamically
const currentNWCConnection = getActiveConnection();
- // Try NWC first if available and properly connected
+ // Try NWC if Cashu failed or unavailable
if (currentNWCConnection && currentNWCConnection.connectionString && currentNWCConnection.isConnected) {
try {
await sendPayment(currentNWCConnection, newInvoice);
diff --git a/src/hooks/wallet/useBitcoin.ts b/src/hooks/wallet/useBitcoin.ts
new file mode 100644
index 0000000..12b16d0
--- /dev/null
+++ b/src/hooks/wallet/useBitcoin.ts
@@ -0,0 +1,462 @@
+import { useQuery } from '@tanstack/react-query';
+import { useState, useCallback, useEffect } from 'react';
+import { fetchUTXOs, getFeeRates, createBitcoinTransaction, broadcastTransaction, calculateMaxSendAmount, npubToBitcoinAddress, nostrPubkeyToBitcoinAddress, type UTXO } from '@/lib/bitcoin';
+import type { BitcoinTransaction } from '@/components/wallet/TransactionHistory';
+import { useToast, toast } from '@/hooks/useToast';
+import { useQRCode } from '@/hooks/wallet/useQRCode';
+import { useNsecAccess } from '@/hooks/useNsecAccess';
+
+// Blockstream API response types
+interface BlockstreamTransactionStatus {
+ confirmed: boolean;
+ block_height?: number;
+ block_hash?: string;
+ block_time?: number;
+}
+
+interface BlockstreamTransactionInput {
+ prevout?: {
+ scriptpubkey_address?: string;
+ value: number;
+ };
+}
+
+interface BlockstreamTransactionOutput {
+ scriptpubkey_address?: string;
+ value: number;
+}
+
+// Transaction list item (from /address/:address/txs) - minimal data
+interface BlockstreamTransactionListItem {
+ txid: string;
+ fee?: number;
+ status: BlockstreamTransactionStatus;
+ vin: BlockstreamTransactionInput[];
+ vout: BlockstreamTransactionOutput[];
+}
+
+// Full transaction details (from /tx/:txid) - includes complete prevout data
+interface BlockstreamFullTransaction {
+ txid: string;
+ fee?: number;
+ status: BlockstreamTransactionStatus;
+ vin: Array<{
+ txid: string;
+ vout: number;
+ prevout: {
+ scriptpubkey_address?: string;
+ value: number;
+ };
+ [key: string]: unknown; // Other fields we don't need
+ }>;
+ vout: Array<{
+ scriptpubkey_address?: string;
+ value: number;
+ [key: string]: unknown; // Other fields we don't need
+ }>;
+}
+
+/**
+ * Fetch Bitcoin transaction history for an address from Blockstream API
+ * Fetches full transaction details to get complete prevout data for accurate sent/received detection
+ */
+async function fetchBitcoinTransactions(address: string): Promise {
+ // First, fetch the transaction list
+ const listResponse = await fetch(`https://blockstream.info/api/address/${address}/txs`);
+
+ if (!listResponse.ok) {
+ throw new Error('Failed to fetch Bitcoin transactions');
+ }
+
+ const txList: BlockstreamTransactionListItem[] = await listResponse.json();
+
+ // Fetch full transaction details for each transaction in parallel
+ // This gives us complete prevout data needed to detect sent transactions
+ const fullTxPromises = txList.map(async (txItem) => {
+ const txResponse = await fetch(`https://blockstream.info/api/tx/${txItem.txid}`);
+
+ if (!txResponse.ok) {
+ console.warn(`Failed to fetch full details for transaction ${txItem.txid}`);
+ // Fallback to list item data if full fetch fails
+ return null;
+ }
+
+ return await txResponse.json() as BlockstreamFullTransaction;
+ });
+
+ const fullTxs = await Promise.all(fullTxPromises);
+
+ // Transform to our BitcoinTransaction format
+ return fullTxs.map((tx, index) => {
+ // If we couldn't fetch full details, use list item data
+ const txItem = txList[index];
+ const txData = tx || {
+ txid: txItem.txid,
+ fee: txItem.fee,
+ status: txItem.status,
+ vin: txItem.vin.map(vin => ({
+ prevout: vin.prevout || undefined
+ })),
+ vout: txItem.vout
+ } as BlockstreamFullTransaction;
+
+ // Determine if this is a sent or received transaction
+ // Check if address appears in outputs (received)
+ const isReceived = txData.vout.some((output) =>
+ output.scriptpubkey_address === address
+ );
+
+ // Check if address appears in input prevouts (sent)
+ const isSent = txData.vin.some((input) =>
+ input.prevout?.scriptpubkey_address === address
+ );
+
+ // Calculate amount for this address
+ let amount = 0;
+ let fee: number | undefined = undefined;
+
+ // Calculate inputs and outputs for this address
+ const inputsFromAddress = txData.vin
+ .filter((input) => input.prevout?.scriptpubkey_address === address)
+ .reduce((sum, input) => sum + (input.prevout?.value || 0), 0);
+
+ const outputsToAddress = txData.vout
+ .filter((output) => output.scriptpubkey_address === address)
+ .reduce((sum, output) => sum + output.value, 0);
+
+ // Get the transaction fee
+ fee = txData.fee || 0;
+
+ // Determine transaction type and amount
+ let type: 'sent' | 'received' | 'consolidate';
+
+ if (isReceived && !isSent) {
+ // Pure received transaction - sum all outputs to this address
+ type = 'received';
+ amount = outputsToAddress;
+ } else if (isSent) {
+ // Sent transaction (may also have change output)
+ // Amount sent to others = inputs - change - fee
+ const amountSentToOthers = inputsFromAddress - outputsToAddress - fee;
+
+ // Check if this is a consolidation (self-send where all outputs go back to same address)
+ // A consolidation happens when amount sent to others is 0 or very small (dust threshold)
+ const dustThreshold = 546; // Standard Bitcoin dust limit
+ const isConsolidation = amountSentToOthers <= dustThreshold && outputsToAddress > 0;
+
+ if (isConsolidation) {
+ // For consolidation, show the output amount (the consolidated amount)
+ type = 'consolidate';
+ amount = outputsToAddress;
+ } else {
+ // Regular send transaction - show amount sent to others
+ type = 'sent';
+ amount = amountSentToOthers;
+ }
+ } else {
+ // Fallback (shouldn't happen, but TypeScript requires it)
+ type = 'received';
+ amount = outputsToAddress;
+ }
+
+ return {
+ id: `${txData.txid}-${index}`,
+ txid: txData.txid,
+ type,
+ amount: Math.abs(amount),
+ fee: fee,
+ address: address,
+ confirmations: txData.status.confirmed ? (txData.status.block_height ? 1 : 0) : 0, // Simplified
+ blockHeight: txData.status.block_height,
+ timestamp: (txData.status.block_time ?? 0) * 1000, // Convert to milliseconds
+ status: txData.status.confirmed ? 'confirmed' : 'unconfirmed'
+ } as BitcoinTransaction;
+ });
+}
+
+/**
+ * Hook to fetch and manage Bitcoin balance from UTXOs
+ */
+export function useBitcoinBalance(address: string | null) {
+ return useQuery({
+ queryKey: ['bitcoin-balance', address],
+ queryFn: async (): Promise<{ balance: number; utxos: UTXO[] }> => {
+ if (!address) {
+ return { balance: 0, utxos: [] };
+ }
+
+ const utxos = await fetchUTXOs(address);
+ const balance = utxos.reduce((sum, utxo) => sum + utxo.value, 0);
+
+ return { balance, utxos };
+ },
+ enabled: !!address,
+ refetchInterval: 30000, // Refetch every 30 seconds
+ staleTime: 10000, // Consider data stale after 10 seconds
+ });
+}
+
+/**
+ * Hook to fetch and manage Bitcoin transaction history
+ */
+export function useBitcoinTransactionHistory(address: string | null) {
+ return useQuery({
+ queryKey: ['bitcoin-transactions', address],
+ queryFn: async (): Promise => {
+ if (!address) {
+ return [];
+ }
+
+ return fetchBitcoinTransactions(address);
+ },
+ enabled: !!address,
+ refetchInterval: 30000, // Refetch every 30 seconds
+ staleTime: 10000, // Consider data stale after 10 seconds
+ });
+}
+
+/**
+ * Hook for Bitcoin operations (send, receive, consolidate, etc.)
+ */
+export function useBitcoinOperations(bitcoinAddress: string | null) {
+ const { toast } = useToast();
+ const { generateQRCode } = useQRCode();
+ const { hasNsecAccess, getPrivateKey } = useNsecAccess();
+ const { data: bitcoinBalanceData, isLoading: isBitcoinBalanceLoading, refetch: refetchBitcoinBalance } = useBitcoinBalance(bitcoinAddress);
+
+ // Use UTXOs from useBitcoinBalance which auto-updates every 30 seconds
+ const utxos = bitcoinBalanceData?.utxos || [];
+ const isLoadingUtxos = isBitcoinBalanceLoading;
+
+ // State for Bitcoin operations
+ const [feeRate, setFeeRate] = useState(1);
+ const [isConsolidating, setIsConsolidating] = useState(false);
+
+ // Fetch fee rates on mount and when UTXOs change
+ useEffect(() => {
+ getFeeRates()
+ .then(feeRates => setFeeRate(feeRates.fastestFee))
+ .catch(() => {
+ // Fee rate fetch failure is not critical, keep existing rate
+ });
+ }, [utxos.length]); // Re-fetch when UTXO count changes
+
+ // Calculate max send amount
+ const bitcoinMaxAmount = utxos.length > 0 ? calculateMaxSendAmount(utxos, feeRate) : 0;
+
+ // Fetch UTXOs manually (for immediate refresh after transactions)
+ // This will trigger React Query to refetch, which will update the utxos automatically
+ const fetchBitcoinUtxos = useCallback(async () => {
+ if (!bitcoinAddress) return;
+
+ try {
+ // Refetch balance which includes UTXOs
+ await refetchBitcoinBalance();
+
+ // Also update fee rates
+ const feeRates = await getFeeRates();
+ setFeeRate(feeRates.fastestFee);
+ } catch (error) {
+ console.error('Error fetching UTXOs:', error);
+ toast({
+ variant: "destructive",
+ title: "UTXO Error",
+ description: "Failed to fetch Bitcoin UTXOs",
+ });
+ }
+ }, [bitcoinAddress, refetchBitcoinBalance, toast]);
+
+ // Handle Send Max
+ const handleSendMax = (setBitcoinAmount: (amount: string) => void) => {
+ if (bitcoinMaxAmount > 0) {
+ setBitcoinAmount(bitcoinMaxAmount.toString());
+ }
+ };
+
+ // Handle Bitcoin Send
+ const handleBitcoinSend = async (
+ bitcoinAmount: string,
+ pendingBitcoinRecipient: string | null,
+ setBitcoinAmount: (amount: string) => void,
+ setBitcoinRecipient: (recipient: string) => void,
+ setPendingBitcoinRecipient: (recipient: string | null) => void,
+ setShowSendModal: (show: boolean) => void
+ ) => {
+ if (!hasNsecAccess || !bitcoinAmount || !pendingBitcoinRecipient || !bitcoinAddress) {
+ toast({
+ variant: "destructive",
+ title: "Bitcoin Send Error",
+ description: "Missing required information for Bitcoin transaction",
+ });
+ return;
+ }
+
+ try {
+ const privateKey = getPrivateKey();
+ if (!privateKey) {
+ throw new Error('Unable to access private key');
+ }
+
+ const amountSats = parseInt(bitcoinAmount);
+ if (isNaN(amountSats) || amountSats <= 0) {
+ throw new Error('Invalid amount');
+ }
+
+ // Determine if the recipient is a Bitcoin address or npub
+ let recipientAddress: string;
+ if (pendingBitcoinRecipient.startsWith('bc1') || pendingBitcoinRecipient.startsWith('1') || pendingBitcoinRecipient.startsWith('3')) {
+ // It's already a Bitcoin address
+ recipientAddress = pendingBitcoinRecipient;
+ } else if (pendingBitcoinRecipient.startsWith('npub')) {
+ // It's an npub, convert to Bitcoin address
+ recipientAddress = npubToBitcoinAddress(pendingBitcoinRecipient);
+ } else {
+ // Assume it's a hex pubkey
+ recipientAddress = nostrPubkeyToBitcoinAddress(pendingBitcoinRecipient);
+ }
+
+ // Fetch UTXOs and fee rates
+ const [utxos, feeRates] = await Promise.all([
+ fetchUTXOs(bitcoinAddress),
+ getFeeRates()
+ ]);
+
+ // Check if this is a Send Max transaction
+ const isSendMax = amountSats === bitcoinMaxAmount && bitcoinMaxAmount > 0;
+
+ // Create and sign transaction
+ const { txHex, fee } = await createBitcoinTransaction(
+ privateKey,
+ recipientAddress,
+ amountSats,
+ utxos,
+ feeRates.fastestFee,
+ isSendMax
+ );
+
+ // Broadcast transaction
+ const txId = await broadcastTransaction(txHex);
+
+ toast({
+ title: "Bitcoin Sent!",
+ description: `Transaction ${txId.slice(0, 8)}... confirmed (Fee: ${fee} sats)`,
+ });
+
+ // Reset form and refresh balance
+ setBitcoinAmount('');
+ setBitcoinRecipient('');
+ setPendingBitcoinRecipient(null);
+ refetchBitcoinBalance();
+ setShowSendModal(false);
+
+ } catch (error) {
+ console.error('Bitcoin send error:', error);
+ toast({
+ variant: "destructive",
+ title: "Bitcoin Send Failed",
+ description: error instanceof Error ? error.message : 'Unknown error occurred',
+ });
+ }
+ };
+
+ // Handle Bitcoin Receive
+ const handleBitcoinReceive = async (
+ setBitcoinAddressQRCode: (qr: string) => void,
+ setShowBitcoinAddressQR: (show: boolean) => void
+ ) => {
+ if (!bitcoinAddress) return;
+
+ try {
+ const qr = await generateQRCode(bitcoinAddress);
+ setBitcoinAddressQRCode(qr);
+ setShowBitcoinAddressQR(true);
+ } catch (error) {
+ console.error('QR generation error:', error);
+ toast({
+ variant: "destructive",
+ title: "QR Code Error",
+ description: "Failed to generate QR code",
+ });
+ }
+ };
+
+ // Handle UTXO Consolidation
+ const handleConsolidateUtxos = async () => {
+ if (!hasNsecAccess || !bitcoinAddress || utxos.length <= 1) {
+ toast({
+ variant: "destructive",
+ title: "Consolidation Error",
+ description: "Cannot consolidate UTXOs",
+ });
+ return;
+ }
+
+ setIsConsolidating(true);
+ try {
+ const privateKey = getPrivateKey();
+ if (!privateKey) {
+ throw new Error('Unable to access private key');
+ }
+
+ // For consolidation, we send all UTXOs to our own address (self-send)
+ const consolidationAmount = calculateMaxSendAmount(utxos, feeRate);
+
+ if (consolidationAmount <= 0) {
+ throw new Error('Insufficient funds for consolidation');
+ }
+
+ // Fetch current UTXOs and fee rates
+ const [fetchedUtxos, feeRates] = await Promise.all([
+ fetchUTXOs(bitcoinAddress),
+ getFeeRates()
+ ]);
+
+ // Create consolidation transaction (self-send with all UTXOs)
+ const { txHex, fee } = await createBitcoinTransaction(
+ privateKey,
+ bitcoinAddress, // Send to our own address
+ consolidationAmount,
+ fetchedUtxos,
+ feeRates.fastestFee,
+ true // sendMax = true
+ );
+
+ // Broadcast transaction
+ const txId = await broadcastTransaction(txHex);
+
+ toast({
+ title: "UTXOs Consolidated!",
+ description: `Transaction ${txId.slice(0, 8)}... confirmed (Fee: ${fee} sats)`,
+ });
+
+ // Refresh UTXOs and balance (refetchBitcoinBalance updates UTXOs automatically)
+ refetchBitcoinBalance();
+
+ } catch (error) {
+ console.error('UTXO consolidation error:', error);
+ toast({
+ variant: "destructive",
+ title: "Consolidation Failed",
+ description: error instanceof Error ? error.message : 'Unknown error occurred',
+ });
+ } finally {
+ setIsConsolidating(false);
+ }
+ };
+
+ return {
+ // State
+ utxos,
+ isLoadingUtxos,
+ feeRate,
+ isConsolidating,
+ bitcoinMaxAmount,
+
+ // Functions
+ fetchBitcoinUtxos,
+ handleSendMax,
+ handleBitcoinSend,
+ handleBitcoinReceive,
+ handleConsolidateUtxos,
+ };
+}
diff --git a/src/hooks/wallet/useCashu.ts b/src/hooks/wallet/useCashu.ts
new file mode 100644
index 0000000..a1c1fcb
--- /dev/null
+++ b/src/hooks/wallet/useCashu.ts
@@ -0,0 +1,252 @@
+import { useState, useEffect, useCallback, useRef } from 'react';
+import { useLocalStorage } from '../useLocalStorage';
+import * as bip39 from '@scure/bip39';
+import { wordlist } from '@scure/bip39/wordlists/english.js';
+import { initializeCoco, ConsoleLogger, getEncodedToken, type Repositories } from 'coco-cashu-core';
+import { IndexedDbRepositories } from 'coco-cashu-indexeddb';
+import type { Mint } from 'coco-cashu-core';
+
+// Types from coco-cashu-core
+type CocoManager = Awaited>;
+
+// Singleton pattern to prevent multiple initializations
+let globalCocoInstance: CocoManager | null = null;
+let globalRepositories: Repositories | null = null;
+let globalInitializationPromise: Promise<{ coco: CocoManager; repositories: Repositories }> | null = null;
+
+export interface UseCashuReturn {
+ // The typed coco manager (direct library access)
+ coco: CocoManager | null;
+
+ // Repositories for direct access to proof data
+ repositories: Repositories | null;
+
+ // React state (for reactivity)
+ balances: { [mintUrl: string]: number };
+ mints: Array<{ url: string; name?: string; info?: unknown }>;
+ totalBalance: number;
+
+ // Status
+ isInitialized: boolean;
+ isLoading: boolean;
+ error: Error | null;
+
+ // Mnemonic management
+ mnemonic: string | null;
+ setMnemonic: (mnemonic: string) => void;
+ generateMnemonic: () => string;
+
+ // Utility functions
+ clearError: () => void;
+ getEncodedToken: typeof getEncodedToken;
+ refreshMints: () => Promise;
+}
+
+export function useCashu(): UseCashuReturn {
+ const [isInitialized, setIsInitialized] = useState(false);
+ const [isLoading, setIsLoading] = useState(false);
+ const [error, setError] = useState(null);
+
+ // Mnemonic management with localStorage
+ const [mnemonic, setMnemonicState] = useLocalStorage('cashu-mnemonic', null);
+
+ // Manager instance ref
+ const cocoRef = useRef(null);
+ const repositoriesRef = useRef(null);
+
+ // React state for UI reactivity
+ const [balances, setBalances] = useState<{ [mintUrl: string]: number }>({});
+ const [mints, setMints] = useState>([]);
+
+ const clearError = useCallback(() => {
+ setError(null);
+ }, []);
+
+ const generateMnemonic = useCallback(() => {
+ return bip39.generateMnemonic(wordlist);
+ }, []);
+
+ const refreshMints = useCallback(async () => {
+ const coco = cocoRef.current;
+ if (!coco) return;
+
+ try {
+ // Only show trusted mints in the UI
+ const mintList = await coco.mint.getAllTrustedMints();
+ setMints(mintList.map((m: Mint) => ({
+ url: m.mintUrl,
+ name: m.name,
+ info: m.mintInfo
+ })));
+ } catch (err) {
+ console.error('Failed to refresh mints:', err);
+ }
+ }, []);
+
+ const setMnemonic = useCallback((newMnemonic: string) => {
+ if (!bip39.validateMnemonic(newMnemonic, wordlist)) {
+ throw new Error('Invalid mnemonic');
+ }
+ setMnemonicState(newMnemonic);
+ // Reinitialize manager with new mnemonic
+ setIsInitialized(false);
+ }, [setMnemonicState]);
+
+ // Initialize the coco manager
+ const initializeCocoManager = useCallback(async () => {
+ if (isInitialized || isLoading) return;
+
+ setIsLoading(true);
+ setError(null);
+
+ try {
+ // Use singleton pattern to prevent multiple initializations
+ if (globalCocoInstance && globalRepositories) {
+ cocoRef.current = globalCocoInstance;
+ repositoriesRef.current = globalRepositories;
+ setIsInitialized(true);
+ setIsLoading(false);
+ return;
+ }
+
+ // If there's already an initialization in progress, wait for it
+ if (globalInitializationPromise) {
+ console.log('Waiting for existing initialization...');
+ const { coco, repositories } = await globalInitializationPromise;
+ cocoRef.current = coco;
+ repositoriesRef.current = repositories;
+ setIsInitialized(true);
+ setIsLoading(false);
+ return;
+ }
+
+ // Generate or retrieve mnemonic
+ let currentMnemonic = mnemonic;
+ if (!currentMnemonic) {
+ currentMnemonic = bip39.generateMnemonic(wordlist);
+ setMnemonicState(currentMnemonic);
+ }
+
+ // Create seed from mnemonic
+ const seed = bip39.mnemonicToSeedSync(currentMnemonic);
+
+ // Initialize repositories with proper initialization
+ const repo = new IndexedDbRepositories({ name: "cashu-wallet" });
+ await repo.init(); // Ensure repository is properly initialized
+
+ // Create initialization promise
+ globalInitializationPromise = (async () => {
+ const coco = await initializeCoco({
+ repo,
+ seedGetter: async () => seed,
+ logger: new ConsoleLogger("coco", { level: "debug" }) // Use debug level for better logging
+ });
+ return { coco, repositories: repo };
+ })();
+
+ // Initialize coco manager using the new API
+ const { coco, repositories } = await globalInitializationPromise;
+
+ // Store as singleton
+ console.log('Storing new coco instance as singleton');
+ globalCocoInstance = coco;
+ globalRepositories = repositories;
+ globalInitializationPromise = null;
+ cocoRef.current = coco;
+ repositoriesRef.current = repositories;
+
+ // Enable built-in services for automatic quote processing and state watching
+ try {
+ console.log('Enabling coco services...');
+ await coco.enableMintQuoteWatcher({ watchExistingPendingOnStart: false });
+ console.log('Mint quote watcher enabled');
+
+ await coco.enableMintQuoteProcessor();
+ console.log('Mint quote processor enabled');
+
+ await coco.enableProofStateWatcher();
+ console.log('Proof state watcher enabled');
+
+ console.log('All coco services enabled successfully');
+ } catch (err) {
+ // Don't fail initialization if watchers can't be enabled
+ console.warn('Failed to enable some coco services:', err);
+ }
+
+ setIsInitialized(true);
+ } catch (err) {
+ const errorMessage = err instanceof Error ? err.message : 'Failed to initialize Cashu wallet';
+ setError(new Error(errorMessage));
+ globalInitializationPromise = null; // Reset on error
+ } finally {
+ setIsLoading(false);
+ }
+ }, [isInitialized, isLoading, mnemonic, setMnemonicState]);
+
+ // Initialize on mount and when mnemonic changes
+ useEffect(() => {
+ initializeCocoManager();
+ }, [initializeCocoManager]);
+
+ // Auto-refresh balances and mints on manager events
+ useEffect(() => {
+ const coco = cocoRef.current;
+ if (!coco) return;
+
+ const refreshBalances = async () => {
+ try {
+ const newBalances = await coco.wallet.getBalances();
+ setBalances(newBalances);
+ } catch (err) {
+ console.log('Failed to refresh balances:', err);
+ }
+ };
+
+ // Initial load
+ refreshBalances();
+ refreshMints();
+
+ // Listen to events
+ const unsubs = [
+ coco.on('proofs:saved', refreshBalances),
+ coco.on('proofs:state-changed', refreshBalances),
+ coco.on('send:created', refreshBalances),
+ coco.on('receive:created', refreshBalances),
+ coco.on('mint:added', refreshMints),
+ coco.on('mint:updated', refreshMints),
+ ];
+
+ return () => unsubs.forEach(unsub => unsub());
+ }, [isInitialized, refreshMints]);
+
+ // Calculate total balance
+ const totalBalance = Object.values(balances).reduce((sum, balance) => sum + balance, 0);
+
+ return {
+ // The typed coco manager (direct library access)
+ coco: cocoRef.current,
+
+ // Repositories for direct access to proof data
+ repositories: repositoriesRef.current,
+
+ // React state (for reactivity)
+ balances,
+ mints,
+ totalBalance,
+
+ // Status
+ isInitialized,
+ isLoading,
+ error,
+
+ // Mnemonic management
+ mnemonic,
+ setMnemonic,
+ generateMnemonic,
+
+ // Utility functions
+ clearError,
+ getEncodedToken,
+ refreshMints,
+ };
+}
\ No newline at end of file
diff --git a/src/hooks/wallet/useHistoryManager.ts b/src/hooks/wallet/useHistoryManager.ts
new file mode 100644
index 0000000..55f8296
--- /dev/null
+++ b/src/hooks/wallet/useHistoryManager.ts
@@ -0,0 +1,95 @@
+import { useState, useCallback, useEffect } from 'react';
+import type { HistoryEntry, Manager } from 'coco-cashu-core';
+
+interface UseHistoryManagerProps {
+ coco: Manager | null;
+ isInitialized: boolean;
+}
+
+export function useHistoryManager({
+ coco,
+ isInitialized,
+}: UseHistoryManagerProps) {
+ const [historyEntries, setHistoryEntries] = useState([]);
+ const [isLoadingHistory, setIsLoadingHistory] = useState(false);
+ const [isHistoryExpanded, setIsHistoryExpanded] = useState(false);
+
+ // Load history from wallet
+ const loadHistory = useCallback(async () => {
+ if (!coco) return;
+
+ try {
+ setIsLoadingHistory(true);
+ const entries = await coco.history.getPaginatedHistory(0, 50); // TODO: show entire history
+
+ // Filter out unpaid quotes: only show completed transactions
+ // - Mint quotes: only show 'ISSUED' (completed)
+ // - Melt quotes: only show 'PAID' (completed)
+ // - Send/Receive: show all (no state field)
+ const filteredEntries = entries.filter((entry) => {
+ if (entry.type === 'mint') {
+ return entry.state === 'ISSUED';
+ }
+ if (entry.type === 'melt') {
+ return entry.state === 'PAID';
+ }
+ // Send and receive entries don't have a state field, show all
+ return true;
+ });
+
+ setHistoryEntries(filteredEntries);
+ } catch (err) {
+ console.error('Failed to load history:', err);
+ } finally {
+ setIsLoadingHistory(false);
+ }
+ }, [coco]);
+
+ // Load history on wallet initialization
+ useEffect(() => {
+ if (isInitialized && historyEntries.length === 0) {
+ loadHistory();
+ }
+ }, [isInitialized, historyEntries.length, loadHistory]);
+
+ // Auto-refresh on wallet events
+ useEffect(() => {
+ if (!isInitialized || !coco) return;
+
+ // Listen for history updates (fires on send, receive transactions)
+ const unsubscribeHistoryUpdated = coco.on('history:updated', () => {
+ loadHistory();
+ });
+
+ // Listen for melt quote creation (coco-cashu bug: doesn't emit history:updated)
+ const unsubscribeMeltCreated = coco.on('melt-quote:created', () => {
+ loadHistory();
+ });
+
+ // Listen for melt quote paid (backup, in case creation event missed)
+ const unsubscribeMeltPaid = coco.on('melt-quote:paid', () => {
+ loadHistory();
+ });
+
+ // Listen for mint quote REDEEMED (only after invoice is paid, not created)
+ const unsubscribeMintRedeemed = coco.on('mint-quote:redeemed', () => {
+ loadHistory();
+ });
+
+ return () => {
+ unsubscribeHistoryUpdated();
+ unsubscribeMeltCreated();
+ unsubscribeMeltPaid();
+ unsubscribeMintRedeemed();
+ };
+ }, [isInitialized, coco, loadHistory]);
+
+ return {
+ historyEntries,
+ setHistoryEntries,
+ isLoadingHistory,
+ isHistoryExpanded,
+ setIsHistoryExpanded,
+ loadHistory,
+ };
+}
diff --git a/src/hooks/wallet/useLightningAddress.ts b/src/hooks/wallet/useLightningAddress.ts
new file mode 100644
index 0000000..14198b0
--- /dev/null
+++ b/src/hooks/wallet/useLightningAddress.ts
@@ -0,0 +1,250 @@
+import { useState, useCallback } from 'react';
+
+// LNURL Protocol Types
+interface LNURLPayResponse {
+ status: 'OK' | 'ERROR';
+ tag: 'payRequest';
+ commentAllowed?: number;
+ minSendable: number; // millisats
+ maxSendable: number; // millisats
+ metadata: string;
+ callback: string;
+}
+
+interface LNURLInvoiceResponse {
+ status: 'OK' | 'ERROR';
+ reason?: string;
+ pr?: string; // BOLT11 invoice
+}
+
+interface GetInvoiceParams {
+ lightningAddress: string;
+ amountSats: number;
+ comment?: string;
+}
+
+interface UseLightningAddressReturn {
+ getInvoice: (params: GetInvoiceParams) => Promise;
+ isLoading: boolean;
+ error: string | null;
+}
+
+/**
+ * Hook for resolving Lightning addresses to invoices
+ *
+ * @example
+ * ```tsx
+ * const { getInvoice, isLoading, error } = useLightningAddress();
+ *
+ * const invoice = await getInvoice({
+ * lightningAddress: 'alice@strike.me',
+ * amountSats: 1000,
+ * comment: 'Thanks for the coffee!'
+ * });
+ * ```
+ */
+export function useLightningAddress(): UseLightningAddressReturn {
+ const [isLoading, setIsLoading] = useState(false);
+ const [error, setError] = useState(null);
+
+ /**
+ * Fetches a Lightning invoice for the given address and amount
+ *
+ * @param params - Lightning address, amount in sats, and optional comment
+ * @returns BOLT11 invoice string
+ * @throws Error if resolution fails
+ */
+ const getInvoice = useCallback(async (params: GetInvoiceParams): Promise => {
+ const { lightningAddress, amountSats, comment } = params;
+
+ setIsLoading(true);
+ setError(null);
+
+ try {
+ // Validate inputs
+ if (!lightningAddress || !lightningAddress.includes('@')) {
+ throw new Error('Invalid Lightning address format. Expected: username@domain.com');
+ }
+
+ if (amountSats <= 0) {
+ throw new Error('Amount must be greater than 0');
+ }
+
+ // Parse Lightning address
+ const [username, domain] = lightningAddress.split('@');
+ if (!username || !domain) {
+ throw new Error('Invalid Lightning address format');
+ }
+
+ // Step 1: Fetch LNURL-pay info
+ const lnurlEndpoint = `https://${domain}/.well-known/lnurlp/${username}`;
+
+ console.log('Resolving Lightning address:', {
+ lightningAddress,
+ lnurlEndpoint,
+ amountSats
+ });
+
+ const lnurlResponse = await fetch(lnurlEndpoint, {
+ headers: { 'Accept': 'application/json' },
+ });
+
+ if (!lnurlResponse.ok) {
+ console.error('LNURL Endpoint Error:', {
+ lightningAddress,
+ lnurlEndpoint,
+ status: lnurlResponse.status,
+ statusText: lnurlResponse.statusText
+ });
+ throw new Error(`Failed to resolve Lightning address: ${lnurlResponse.status} ${lnurlResponse.statusText}`);
+ }
+
+ const lnurlData: LNURLPayResponse = await lnurlResponse.json();
+
+ console.log('LNURL Response:', {
+ lightningAddress,
+ lnurlData
+ });
+
+ if (lnurlData.status && lnurlData.status !== 'OK') {
+ console.error('LNURL Status Error:', {
+ lightningAddress,
+ status: lnurlData.status,
+ response: lnurlData
+ });
+ throw new Error('LNURL endpoint returned error status');
+ }
+
+ if (lnurlData.tag !== 'payRequest') {
+ console.error('LNURL Tag Error:', {
+ lightningAddress,
+ expectedTag: 'payRequest',
+ actualTag: lnurlData.tag,
+ response: lnurlData
+ });
+ throw new Error(`Unexpected LNURL tag: ${lnurlData.tag}`);
+ }
+
+ // Validate amount against min/max bounds
+ const minSats = lnurlData.minSendable / 1000;
+ const maxSats = lnurlData.maxSendable / 1000;
+
+ console.log('Amount validation:', {
+ lightningAddress,
+ amountSats,
+ minSats,
+ maxSats,
+ minSendable: lnurlData.minSendable,
+ maxSendable: lnurlData.maxSendable
+ });
+
+ if (amountSats < minSats) {
+ console.error('Amount below minimum:', {
+ lightningAddress,
+ amountSats,
+ minSats,
+ maxSats
+ });
+ throw new Error(`Amount ${amountSats} sats is below minimum ${minSats} sats`);
+ }
+
+ if (amountSats > maxSats) {
+ console.error('Amount exceeds maximum:', {
+ lightningAddress,
+ amountSats,
+ minSats,
+ maxSats
+ });
+ throw new Error(`Amount ${amountSats} sats exceeds maximum ${maxSats} sats`);
+ }
+
+ // Step 2: Request invoice from callback URL
+ const amountMsats = amountSats * 1000;
+ const callbackUrl = new URL(lnurlData.callback);
+ callbackUrl.searchParams.set('amount', amountMsats.toString());
+
+ // Add comment if provided and allowed
+ if (comment && lnurlData.commentAllowed && comment.length <= lnurlData.commentAllowed) {
+ callbackUrl.searchParams.set('comment', comment);
+ }
+
+ console.log('Requesting invoice:', {
+ lightningAddress,
+ amountSats,
+ amountMsats,
+ callbackUrl: callbackUrl.toString(),
+ comment
+ });
+
+ const invoiceResponse = await fetch(callbackUrl.toString(), {
+ headers: { 'Accept': 'application/json' },
+ });
+
+ if (!invoiceResponse.ok) {
+ console.error('Invoice Request Error:', {
+ lightningAddress,
+ amountSats,
+ callbackUrl: callbackUrl.toString(),
+ status: invoiceResponse.status,
+ statusText: invoiceResponse.statusText
+ });
+ throw new Error(`Failed to get invoice: ${invoiceResponse.status} ${invoiceResponse.statusText}`);
+ }
+
+ const invoiceData: LNURLInvoiceResponse = await invoiceResponse.json();
+
+ console.log('Invoice Response:', {
+ lightningAddress,
+ amountSats,
+ invoiceData
+ });
+
+ // Check if we have a valid invoice (some providers return invoice directly without status field)
+ if (invoiceData.pr) {
+ console.log('Invoice generated successfully:', {
+ lightningAddress,
+ amountSats,
+ invoiceLength: invoiceData.pr.length
+ });
+ setIsLoading(false);
+ return invoiceData.pr;
+ }
+
+ // If no invoice but has status field, check for errors
+ if (invoiceData.status && invoiceData.status !== 'OK') {
+ const errorReason = invoiceData.reason || 'Invoice generation failed';
+ console.error('LNURL Invoice Error:', {
+ lightningAddress,
+ amountSats,
+ status: invoiceData.status,
+ reason: errorReason,
+ response: invoiceData
+ });
+ throw new Error(`Invoice generation failed: ${errorReason}`);
+ }
+
+ // If we get here, no invoice was provided
+ console.error('LNURL Invoice Missing PR:', {
+ lightningAddress,
+ amountSats,
+ response: invoiceData
+ });
+ throw new Error('No invoice returned from provider');
+
+ } catch (err) {
+ const errorMessage = err instanceof Error ? err.message : 'Unknown error occurred';
+ setError(errorMessage);
+ setIsLoading(false);
+ throw err;
+ }
+ }, []);
+
+ return {
+ getInvoice,
+ isLoading,
+ error,
+ };
+}
+
+export type { GetInvoiceParams };
+
diff --git a/src/hooks/wallet/useLightningOperations.ts b/src/hooks/wallet/useLightningOperations.ts
new file mode 100644
index 0000000..639f9fa
--- /dev/null
+++ b/src/hooks/wallet/useLightningOperations.ts
@@ -0,0 +1,305 @@
+import { useState, useCallback, useEffect, useRef } from 'react';
+import { decodeBolt11Amount, isValidBolt11Invoice } from '@/lib/bolt11Decoder';
+import type { Manager } from 'coco-cashu-core';
+import { useToast } from '@/hooks/useToast';
+
+interface UseLightningOperationsProps {
+ coco: Manager | null;
+ activeMintUrl: string | null;
+ generateQRCode: (text: string) => Promise;
+ getLightningInvoice: (params: {
+ lightningAddress: string;
+ amountSats: number;
+ }) => Promise;
+}
+
+export function useLightningOperations({
+ coco,
+ activeMintUrl,
+ generateQRCode,
+ getLightningInvoice,
+}: UseLightningOperationsProps) {
+ const { toast } = useToast();
+
+ // Receive state
+ const [quoteAmount, setQuoteAmount] = useState('');
+
+ // Send state
+ const [lightningInvoice, setLightningInvoice] = useState('');
+ const [lightningAddressInput, setLightningAddressInput] = useState('');
+ const [lightningAddressAmount, setLightningAddressAmount] = useState('');
+ const [pendingLightningAddress, setPendingLightningAddress] = useState(null);
+ const [decodedInvoiceAmount, setDecodedInvoiceAmount] = useState(null);
+ const [pendingInvoice, setPendingInvoice] = useState(null);
+
+ // Processing state to prevent concurrent executions
+ const [isProcessingPayment, setIsProcessingPayment] = useState(false);
+
+ // Invoice modal state
+ const [showInvoiceModal, setShowInvoiceModal] = useState(false);
+ const [currentInvoice, setCurrentInvoice] = useState<{
+ quoteId: string;
+ mintUrl: string;
+ amount: number;
+ invoice: string;
+ qrCodeUrl: string;
+ expiry: number;
+ } | null>(null);
+
+ // Ref to store the mint quote redeemed event unsubscribe function
+ const mintQuoteUnsubscribeRef = useRef<(() => void) | null>(null);
+
+ // Handle receive (Lightning quote/invoice creation)
+ const handleLightningReceive = useCallback(async () => {
+ if (!coco || !quoteAmount || !activeMintUrl) {
+ return;
+ }
+
+ try {
+ const amount = parseInt(quoteAmount);
+ if (isNaN(amount) || amount <= 0) {
+ toast({
+ variant: 'destructive',
+ title: 'Invalid Amount',
+ description: 'Please enter a valid amount',
+ });
+ return;
+ }
+
+ const quote = await coco.quotes.createMintQuote(activeMintUrl, amount);
+
+ // Generate QR code for the Lightning invoice
+ const qrCodeUrl = await generateQRCode(quote.request);
+
+ // Set the invoice data and show modal
+ setCurrentInvoice({
+ quoteId: quote.quote,
+ mintUrl: activeMintUrl,
+ amount,
+ invoice: quote.request,
+ qrCodeUrl,
+ expiry: quote.expiry,
+ });
+
+ setShowInvoiceModal(true);
+ setQuoteAmount('');
+
+ // Clean up any previous listener
+ if (mintQuoteUnsubscribeRef.current) {
+ mintQuoteUnsubscribeRef.current();
+ mintQuoteUnsubscribeRef.current = null;
+ }
+
+ // Listen for payment notification via mint-quote:redeemed event
+ const quoteId = quote.quote;
+ const invoiceAmount = amount;
+
+ const unsubscribe = coco.on('mint-quote:redeemed', (payload: unknown) => {
+ const redeemedQuote = payload as { quoteId?: string };
+
+ // Check if this is the quote we're waiting for
+ if (redeemedQuote.quoteId === quoteId) {
+ toast({
+ title: 'Payment Received',
+ description: `Successfully received ${invoiceAmount} sats! Tokens have been added to your wallet.`,
+ });
+ setShowInvoiceModal(false);
+ setCurrentInvoice(null);
+
+ // Clean up the event listener
+ mintQuoteUnsubscribeRef.current = null;
+ unsubscribe();
+ }
+ });
+
+ // Store unsubscribe function for cleanup
+ mintQuoteUnsubscribeRef.current = unsubscribe;
+ } catch (err) {
+ toast({
+ variant: 'destructive',
+ title: 'Quote Creation Failed',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ }
+ }, [coco, quoteAmount, activeMintUrl, toast, generateQRCode]);
+
+ // Detect input type and handle Lightning address/invoice parsing
+ const detectAndHandleLightningInput = useCallback((input: string): 'lightning_address' | 'invoice' | null => {
+ const trimmed = input.trim();
+ if (!trimmed) return null;
+
+ // Check if it's a Lightning address (contains @)
+ if (trimmed.includes('@')) {
+ setPendingLightningAddress(trimmed);
+ setLightningAddressInput('');
+ return 'lightning_address';
+ }
+
+ // Check if it's a Lightning invoice
+ if (isValidBolt11Invoice(trimmed)) {
+ const amount = decodeBolt11Amount(trimmed);
+ if (amount) {
+ // Show amount confirmation screen
+ setPendingInvoice(trimmed);
+ setDecodedInvoiceAmount(amount);
+ setLightningInvoice('');
+ return 'invoice';
+ } else {
+ // Failed to decode amount - show error
+ toast({
+ variant: 'destructive',
+ title: 'Invalid Invoice',
+ description: 'Unable to decode the lightning invoice amount. Please check the invoice format.',
+ });
+ setLightningInvoice('');
+ return null;
+ }
+ } else {
+ // Not a valid BOLT11 invoice - show error
+ toast({
+ variant: 'destructive',
+ title: 'Invalid Invoice',
+ description: 'This does not appear to be a valid lightning invoice. Please check the format.',
+ });
+ setLightningInvoice('');
+ return null;
+ }
+ }, [toast]);
+
+ // Handle Lightning address payment
+ const handleLightningAddressPayment = useCallback(async () => {
+ // Prevent concurrent executions
+ if (isProcessingPayment) {
+ return;
+ }
+
+ if (!coco || !pendingLightningAddress || !lightningAddressAmount || !activeMintUrl) {
+ return;
+ }
+
+ setIsProcessingPayment(true);
+
+ try {
+ const amount = parseInt(lightningAddressAmount);
+ if (isNaN(amount) || amount <= 0) {
+ toast({
+ variant: 'destructive',
+ title: 'Invalid Amount',
+ description: 'Please enter a valid amount',
+ });
+ setIsProcessingPayment(false);
+ return;
+ }
+
+ const invoice = await getLightningInvoice({
+ lightningAddress: pendingLightningAddress,
+ amountSats: amount,
+ });
+
+ const meltQuote = await coco.quotes.createMeltQuote(
+ activeMintUrl,
+ invoice
+ );
+ await coco.quotes.payMeltQuote(activeMintUrl, meltQuote.quote);
+
+ toast({
+ title: 'Payment Sent',
+ description: `Successfully sent ${amount} sats to ${pendingLightningAddress}!`,
+ });
+
+ // Reset state
+ setPendingLightningAddress(null);
+ setLightningAddressInput('');
+ setLightningAddressAmount('');
+ } catch (err) {
+ console.error('Payment error:', err);
+ toast({
+ variant: 'destructive',
+ title: 'Payment Failed',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ } finally {
+ setIsProcessingPayment(false);
+ }
+ }, [coco, pendingLightningAddress, lightningAddressAmount, activeMintUrl, getLightningInvoice, toast, isProcessingPayment]);
+
+ // Handle confirmed invoice payment
+ const handleConfirmInvoicePayment = useCallback(async () => {
+ // Prevent concurrent executions
+ if (isProcessingPayment) {
+ return;
+ }
+
+ if (!coco || !pendingInvoice || !activeMintUrl) return;
+
+ setIsProcessingPayment(true);
+
+ try {
+ const meltQuote = await coco.quotes.createMeltQuote(
+ activeMintUrl,
+ pendingInvoice
+ );
+ await coco.quotes.payMeltQuote(activeMintUrl, meltQuote.quote);
+
+ toast({
+ title: 'Invoice Paid',
+ description: `Lightning invoice paid successfully for ${decodedInvoiceAmount} sats!`,
+ });
+
+ // Reset state
+ setPendingInvoice(null);
+ setDecodedInvoiceAmount(null);
+ } catch (err) {
+ toast({
+ variant: 'destructive',
+ title: 'Invoice Payment Failed',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ } finally {
+ setIsProcessingPayment(false);
+ }
+ }, [coco, pendingInvoice, activeMintUrl, decodedInvoiceAmount, toast, isProcessingPayment]);
+
+ // Cleanup mint quote listener on component unmount
+ useEffect(() => {
+ return () => {
+ if (mintQuoteUnsubscribeRef.current) {
+ mintQuoteUnsubscribeRef.current();
+ mintQuoteUnsubscribeRef.current = null;
+ }
+ };
+ }, []);
+
+ return {
+ // Receive state
+ quoteAmount,
+ setQuoteAmount,
+ // Send state
+ lightningInvoice,
+ setLightningInvoice,
+ lightningAddressInput,
+ setLightningAddressInput,
+ lightningAddressAmount,
+ setLightningAddressAmount,
+ pendingLightningAddress,
+ setPendingLightningAddress,
+ decodedInvoiceAmount,
+ setDecodedInvoiceAmount,
+ pendingInvoice,
+ setPendingInvoice,
+ // Invoice modal state
+ showInvoiceModal,
+ setShowInvoiceModal,
+ currentInvoice,
+ setCurrentInvoice,
+ // Processing state
+ isProcessingPayment,
+ // Handlers
+ handleLightningReceive,
+ detectAndHandleLightningInput,
+ handleLightningAddressPayment,
+ handleConfirmInvoicePayment,
+ // Refs
+ mintQuoteUnsubscribeRef,
+ };
+}
diff --git a/src/hooks/wallet/useMintManager.ts b/src/hooks/wallet/useMintManager.ts
new file mode 100644
index 0000000..6cdb002
--- /dev/null
+++ b/src/hooks/wallet/useMintManager.ts
@@ -0,0 +1,249 @@
+import { useState, useCallback } from 'react';
+import type { Manager, Repositories } from 'coco-cashu-core';
+import { toast } from '@/hooks/useToast';
+
+export interface CashuMint {
+ url: string;
+ name?: string;
+}
+
+// Mint utility functions
+export const getCleanMintLabel = (mint: { name?: string; url: string }): string => {
+ if (mint.name && mint.name.trim().length > 0) {
+ return mint.name.replace(/^https?:\/\//, '');
+ }
+ try {
+ return new URL(mint.url).host;
+ } catch {
+ return mint.url.replace(/^https?:\/\//, '');
+ }
+};
+
+export const isUnknownMintError = (err: unknown): boolean => {
+ const errorMessage = err instanceof Error ? err.message : String(err);
+ const errorName = err instanceof Error ? err.constructor.name : '';
+ return errorName === 'UnknownMintError' ||
+ errorMessage.includes('UnknownMintError') ||
+ (errorMessage.includes('Mint') && errorMessage.includes('is not known'));
+};
+
+export const extractMintUrlFromError = (err: unknown): string | null => {
+ const errorMessage = err instanceof Error ? err.message : String(err);
+ const mintUrlMatch = errorMessage.match(/Mint (https?:\/\/[^\s]+)/);
+ return mintUrlMatch?.[1] || null;
+};
+
+interface UseMintManagerProps {
+ coco: Manager | null;
+ mints: CashuMint[];
+ repositories: Repositories | null;
+ isNpubCashLoggedIn: boolean;
+ setNpubCashMint: (mintUrl: string) => Promise;
+ refreshMints: () => Promise;
+}
+
+export function useMintManager({
+ coco,
+ mints,
+ repositories,
+ isNpubCashLoggedIn,
+ setNpubCashMint,
+ refreshMints,
+}: UseMintManagerProps) {
+ const [activeMintUrl, setActiveMintUrl] = useState(null);
+ const [mintDropdownOpen, setMintDropdownOpen] = useState(false);
+ const [mintUrl, setMintUrl] = useState('');
+ const [mintToRemove, setMintToRemove] = useState(null);
+ const [showRemoveMintModal, setShowRemoveMintModal] = useState(false);
+
+ // Set active mint and optionally sync to npub.cash
+ const handleSetActiveMint = useCallback(
+ async (url: string | null, syncToNpubCash = true) => {
+ setActiveMintUrl(url);
+
+ // Sync to npub.cash if user is logged in and we should sync
+ if (isNpubCashLoggedIn && url && syncToNpubCash) {
+ try {
+ await setNpubCashMint(url);
+ } catch (err) {
+ console.error('Failed to sync mint to npub.cash:', err);
+ }
+ }
+ },
+ [isNpubCashLoggedIn, setNpubCashMint]
+ );
+
+ // Add a new mint
+ const handleAddMint = useCallback(async () => {
+ if (!mintUrl.trim() || !coco) return;
+ try {
+ // Normalize URL - add https:// if not present
+ let normalizedUrl = mintUrl.trim();
+ if (
+ !normalizedUrl.startsWith('http://') &&
+ !normalizedUrl.startsWith('https://')
+ ) {
+ normalizedUrl = `https://${normalizedUrl}`;
+ }
+
+ // Check if mint with same name already exists (case insensitive)
+ const existingMint = mints.find(mint =>
+ mint.url.toLowerCase() === normalizedUrl.toLowerCase()
+ );
+
+ if (existingMint) {
+ toast({
+ variant: 'destructive',
+ title: 'Mint Already Exists',
+ description: 'A mint with this URL already exists',
+ });
+ return;
+ }
+
+ // Add mint and automatically trust it
+ await coco.mint.addMint(normalizedUrl, { trusted: true });
+ setMintUrl('');
+
+ toast({
+ title: 'Mint Added',
+ description: 'Mint added and trusted successfully!',
+ });
+ } catch (err) {
+ toast({
+ variant: 'destructive',
+ title: 'Add Mint Failed',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ }
+ }, [mintUrl, coco, mints]);
+
+ // Show remove confirmation modal
+ const handleRemoveMintClick = useCallback((mint: CashuMint) => {
+ setMintDropdownOpen(false); // Close dropdown before showing modal
+ setMintToRemove(mint);
+ setShowRemoveMintModal(true);
+ }, []);
+
+ // Confirm and remove mint
+ const handleConfirmRemoveMint = useCallback(async () => {
+ if (!mintToRemove || !repositories) return;
+
+ try {
+ // Delete the mint from the backend using the mint repository directly
+ await repositories.mintRepository.deleteMint(mintToRemove.url);
+
+ // If the removed mint was active, switch to the first available mint
+ if (activeMintUrl === mintToRemove.url) {
+ const remainingMints = mints.filter(
+ (mint) => mint.url !== mintToRemove.url
+ );
+ if (remainingMints.length > 0) {
+ handleSetActiveMint(remainingMints[0].url, false);
+ } else {
+ setActiveMintUrl(null);
+ }
+ }
+
+ toast({
+ title: 'Mint Removed',
+ description: `${mintToRemove.name || mintToRemove.url} has been permanently removed`,
+ });
+
+ // Refresh the mints list to update the dropdown immediately
+ await refreshMints();
+
+ setShowRemoveMintModal(false);
+ setMintToRemove(null);
+ } catch (err) {
+ console.error('Failed to remove mint:', err);
+ toast({
+ variant: 'destructive',
+ title: 'Remove Mint Failed',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ }
+ }, [
+ mintToRemove,
+ mints,
+ activeMintUrl,
+ handleSetActiveMint,
+ repositories,
+ refreshMints,
+ ]);
+
+ // Show denomination breakdown for a mint
+ const handleShowDenominations = useCallback(
+ async (
+ mintUrl: string,
+ setShowProofBreakdown: (show: boolean) => void,
+ setProofBreakdown: (breakdown: {
+ mintUrl: string;
+ denominations: { [key: number]: number };
+ totalBalance: number;
+ }) => void
+ ) => {
+ if (!repositories) return;
+
+ try {
+ // Access proofs directly through the proof repository
+ const proofs = await repositories.proofRepository.getReadyProofs(
+ mintUrl
+ );
+
+ if (!proofs || proofs.length === 0) {
+ toast({
+ variant: 'destructive',
+ title: 'No Tokens',
+ description: 'No tokens found for this mint',
+ });
+ return;
+ }
+
+ // Group proofs by denomination
+ const denominations: { [key: number]: number } = {};
+ proofs.forEach((proof: { amount?: number }) => {
+ const amount = proof.amount || 0;
+ denominations[amount] = (denominations[amount] || 0) + 1;
+ });
+
+ const totalBalance = Object.entries(denominations).reduce(
+ (sum, [amount, count]) => sum + parseInt(amount) * count,
+ 0
+ );
+
+ // Set the breakdown data and show the modal
+ setProofBreakdown({
+ mintUrl,
+ denominations,
+ totalBalance,
+ });
+ setShowProofBreakdown(true);
+ } catch (err) {
+ toast({
+ variant: 'destructive',
+ title: 'Failed to Get Denominations',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ }
+ },
+ [repositories]
+ );
+
+ return {
+ activeMintUrl,
+ setActiveMintUrl: handleSetActiveMint,
+ mintUrl,
+ setMintUrl,
+ mintDropdownOpen,
+ setMintDropdownOpen,
+ handleAddMint,
+ handleRemoveMintClick,
+ handleConfirmRemoveMint,
+ mintToRemove,
+ setMintToRemove,
+ showRemoveMintModal,
+ setShowRemoveMintModal,
+ getCleanMintLabel,
+ handleShowDenominations,
+ };
+}
diff --git a/src/hooks/wallet/useNpubCash.ts b/src/hooks/wallet/useNpubCash.ts
new file mode 100644
index 0000000..a75bd51
--- /dev/null
+++ b/src/hooks/wallet/useNpubCash.ts
@@ -0,0 +1,342 @@
+import { useCallback, useState, useMemo, useRef } from 'react';
+import { useNIP98 } from '../useNIP98';
+import { NPCClient, JWTAuthProvider } from 'npubcash-sdk';
+import type { Quote } from 'npubcash-types';
+import type { Manager } from 'coco-cashu-core';
+import type { EventTemplate, Event } from 'nostr-tools';
+import { useToast } from '../useToast';
+
+const NPUBCASH_BASE_URL = 'https://npubx.cash';
+
+export interface NpubCashUserInfo {
+ pubkey: string;
+ name?: string;
+ mintUrl: string; // API returns camelCase
+ lockQuote: boolean; // API returns camelCase
+}
+
+/**
+ * Hook for interacting with npub.cash API using the official SDK
+ */
+export function useNpubCash() {
+ const { createAuthHeader, signer, isLoggedIn, pubkey } = useNIP98();
+ const { toast } = useToast();
+ const [isLoading, setIsLoading] = useState(false);
+ const [error, setError] = useState(null);
+
+ // Ref to track last sync timestamp for incremental updates
+ const lastSyncRef = useRef(0);
+
+ // Create NPCClient instance using the SDK with JWTAuthProvider for proper WebSocket auth
+ const npcClient = useMemo(() => {
+ if (!isLoggedIn || !signer) return null;
+ // Adapt NostrSigner to JWTAuthProvider's expected SigningFunc signature
+ const signingFunc = async (eventTemplate: EventTemplate): Promise => {
+ return await signer.signEvent(eventTemplate);
+ };
+ const auth = new JWTAuthProvider(NPUBCASH_BASE_URL, signingFunc);
+ return new NPCClient(NPUBCASH_BASE_URL, auth);
+ }, [isLoggedIn, signer]);
+
+ // Generic wrapper for SDK calls with loading state
+ const withLoading = useCallback(async (operation: () => Promise): Promise => {
+ try {
+ setIsLoading(true);
+ setError(null);
+ return await operation();
+ } catch (err) {
+ const errorMessage = err instanceof Error ? err.message : 'Unknown error';
+ setError(errorMessage);
+ return null;
+ } finally {
+ setIsLoading(false);
+ }
+ }, []);
+
+ const setMint = useCallback(async (mintUrl: string): Promise => {
+ if (!npcClient) return false;
+ const result = await withLoading(() => npcClient.settings.setMintUrl(mintUrl));
+ return result !== null;
+ }, [npcClient, withLoading]);
+
+ const getUserInfo = useCallback(async (): Promise => {
+ if (!npcClient) return null;
+
+ // Since SDK doesn't have getUserInfo, we'll use manual implementation
+ // This could be enhanced if SDK adds this method
+ return withLoading(async () => {
+ const url = `${NPUBCASH_BASE_URL}/api/v2/user/info`;
+ const authHeader = await createAuthHeader({ url, method: 'GET' });
+
+ const response = await fetch(url, {
+ method: 'GET',
+ headers: { 'Authorization': authHeader, 'Content-Type': 'application/json' },
+ });
+
+ if (!response.ok) {
+ const errorData = await response.json().catch(() => ({}));
+ throw new Error(errorData.message || `Failed to get user info (${response.status})`);
+ }
+
+ const data = await response.json();
+ return data.data.user;
+ });
+ }, [npcClient, createAuthHeader, withLoading]);
+
+ const getAllQuotes = useCallback(async (): Promise => {
+ if (!npcClient) return [];
+ const result = await withLoading(() => npcClient.getAllQuotes());
+ return result || [];
+ }, [npcClient, withLoading]);
+
+ const getQuotesSince = useCallback(async (since: number): Promise => {
+ if (!npcClient) return [];
+ const result = await withLoading(() => npcClient.getQuotesSince(since));
+ return result || [];
+ }, [npcClient, withLoading]);
+
+ const setLockQuotes = useCallback(async (lockQuotes: boolean): Promise => {
+ if (!npcClient) return false;
+ const result = await withLoading(() => npcClient.settings.setLock(lockQuotes));
+ return result !== null;
+ }, [npcClient, withLoading]);
+
+ const subscribeToQuotes = useCallback((
+ onUpdate: (quoteId: string) => void,
+ onError?: (msg: string) => void
+ ) => {
+ if (!npcClient) return () => {};
+ return npcClient.subscribe(onUpdate, onError);
+ }, [npcClient]);
+
+ const refreshQuotes = useCallback(async (coco: Manager): Promise => {
+ if (!npcClient || !coco) return;
+
+ try {
+ // Fetch all quotes from npub.cash
+ const quotes = await getAllQuotes();
+
+ if (quotes.length === 0) {
+ toast({
+ title: "No Quotes Found",
+ description: "No pending quotes found on npub.cash",
+ });
+ return;
+ }
+
+ // Group quotes by mint URL
+ const quotesByMint = quotes.reduce((acc, quote) => {
+ if (!acc[quote.mintUrl]) {
+ acc[quote.mintUrl] = [];
+ }
+ acc[quote.mintUrl].push(quote);
+ return acc;
+ }, {} as Record);
+
+ let addedQuotes = 0;
+
+ // Process each mint's quotes
+ for (const [mintUrl, mintQuotes] of Object.entries(quotesByMint)) {
+ try {
+ // Check if mint exists (known) by checking all mints
+ const allMints = await coco.mint.getAllMints();
+ const isKnown = allMints.some(m => m.mintUrl.toLowerCase() === mintUrl.toLowerCase());
+
+ if (!isKnown) {
+ await coco.mint.addMint(mintUrl, { trusted: true });
+ } else {
+ // Mint exists, ensure it's trusted
+ const isTrusted = await coco.mint.isTrustedMint(mintUrl);
+ if (!isTrusted) {
+ await coco.mint.trustMint(mintUrl);
+ }
+ }
+
+ // Add quotes to the wallet (matching main.ts format)
+ coco.quotes.addMintQuote(
+ mintUrl,
+ mintQuotes.map((q) => ({
+ ...q,
+ expiry: q.expiresAt,
+ quote: q.quoteId,
+ state: "PAID",
+ unit: "sat",
+ })),
+ );
+
+ addedQuotes += mintQuotes.length;
+ } catch (err) {
+ console.warn(`Failed to process quotes for mint ${mintUrl}:`, err);
+ }
+ }
+
+ if (addedQuotes > 0) {
+ toast({
+ title: "Quotes Refreshed",
+ description: `Successfully added ${addedQuotes} quotes from npub.cash`,
+ });
+ } else {
+ toast({
+ title: "No New Quotes",
+ description: "All quotes from npub.cash are already processed",
+ });
+ }
+ } catch (err) {
+ toast({
+ variant: "destructive",
+ title: "Refresh Failed",
+ description: err instanceof Error ? err.message : 'Failed to refresh quotes',
+ });
+ }
+ }, [npcClient, getAllQuotes, toast]);
+
+ const clearError = useCallback(() => setError(null), []);
+
+ // Subscribe to quote updates and sync to wallet automatically
+ const syncQuotesWithWallet = useCallback(async (coco: Manager): Promise<() => void> => {
+ if (!npcClient || !coco) return () => {};
+
+ try {
+ // Fetch and sync all quotes initially
+ const quotes = await getAllQuotes();
+ if (quotes.length > 0) {
+ const quotesByMint = quotes.reduce((acc, quote) => {
+ if (!acc[quote.mintUrl]) {
+ acc[quote.mintUrl] = [];
+ }
+ acc[quote.mintUrl].push(quote);
+ return acc;
+ }, {} as Record);
+
+ let addedQuotes = 0;
+ for (const [mintUrl, mintQuotes] of Object.entries(quotesByMint)) {
+ try {
+ // Check if mint exists (known) by checking all mints
+ const allMints = await coco.mint.getAllMints();
+ const isKnown = allMints.some(m => m.mintUrl.toLowerCase() === mintUrl.toLowerCase());
+
+ if (!isKnown) {
+ await coco.mint.addMint(mintUrl, { trusted: true });
+ } else {
+ // Mint exists, ensure it's trusted
+ const isTrusted = await coco.mint.isTrustedMint(mintUrl);
+ if (!isTrusted) {
+ await coco.mint.trustMint(mintUrl);
+ }
+ }
+
+ coco.quotes.addMintQuote(
+ mintUrl,
+ mintQuotes.map((q) => ({
+ ...q,
+ expiry: q.expiresAt,
+ quote: q.quoteId,
+ state: "PAID",
+ unit: "sat",
+ })),
+ );
+ addedQuotes += mintQuotes.length;
+ } catch (err) {
+ console.warn(`Failed to sync quotes for mint ${mintUrl}:`, err);
+ }
+ }
+ }
+
+ // Subscribe to real-time updates
+ const unsubscribe = subscribeToQuotes(
+ async (quoteId: string) => {
+ try {
+ // When a quote is updated, fetch newer quotes and sync
+ const recentQuotes = await getQuotesSince(lastSyncRef.current);
+ if (recentQuotes.length > 0) {
+ const quotesByMint = recentQuotes.reduce((acc, quote) => {
+ if (!acc[quote.mintUrl]) {
+ acc[quote.mintUrl] = [];
+ }
+ acc[quote.mintUrl].push(quote);
+ return acc;
+ }, {} as Record);
+
+ for (const [mintUrl, mintQuotes] of Object.entries(quotesByMint)) {
+ try {
+ // Check if mint exists (known) by checking all mints
+ const allMints = await coco.mint.getAllMints();
+ const isKnown = allMints.some(m => m.mintUrl.toLowerCase() === mintUrl.toLowerCase());
+
+ if (!isKnown) {
+ await coco.mint.addMint(mintUrl, { trusted: true });
+ } else {
+ // Mint exists, ensure it's trusted
+ const isTrusted = await coco.mint.isTrustedMint(mintUrl);
+ if (!isTrusted) {
+ await coco.mint.trustMint(mintUrl);
+ }
+ }
+
+ coco.quotes.addMintQuote(
+ mintUrl,
+ mintQuotes.map((q) => ({
+ ...q,
+ expiry: q.expiresAt,
+ quote: q.quoteId,
+ state: "PAID",
+ unit: "sat",
+ })),
+ );
+ } catch (err) {
+ console.warn(`Failed to sync quote ${quoteId} for mint ${mintUrl}:`, err);
+ }
+ }
+ lastSyncRef.current = Math.floor(Date.now() / 1000);
+ }
+ } catch (err) {
+ console.error('Failed to sync quote update:', err);
+ }
+ },
+ (err: string) => {
+ console.error('Quote subscription error:', err);
+ toast({
+ variant: "destructive",
+ title: "Sync Error",
+ description: "Failed to sync quotes from npub.cash",
+ });
+ }
+ );
+
+ return unsubscribe;
+ } catch (err) {
+ console.error('Failed to set up quote sync:', err);
+ toast({
+ variant: "destructive",
+ title: "Sync Failed",
+ description: err instanceof Error ? err.message : 'Failed to set up quote sync',
+ });
+ return () => {};
+ }
+ }, [npcClient, getAllQuotes, getQuotesSince, subscribeToQuotes, toast]);
+
+ return {
+ // Core methods
+ setMint,
+ getUserInfo,
+
+ // Quote management methods
+ getAllQuotes,
+ getQuotesSince,
+ setLockQuotes,
+ subscribeToQuotes,
+ refreshQuotes,
+ syncQuotesWithWallet,
+
+ // Status
+ isLoading,
+ error,
+ isLoggedIn,
+ pubkey,
+ clearError,
+
+ // SDK instance for advanced usage
+ npcClient,
+ };
+}
+
diff --git a/src/hooks/wallet/useQRCode.ts b/src/hooks/wallet/useQRCode.ts
new file mode 100644
index 0000000..9dce57f
--- /dev/null
+++ b/src/hooks/wallet/useQRCode.ts
@@ -0,0 +1,265 @@
+import { useState, useCallback, useRef } from 'react';
+import QRCode from 'qrcode';
+import { Html5Qrcode } from 'html5-qrcode';
+import { useToast } from '@/hooks/useToast';
+
+export type QRScanResult =
+ | { type: 'lightning_invoice'; value: string }
+ | { type: 'lightning_address'; value: string }
+ | { type: 'cashu_token'; value: string }
+ | { type: 'bitcoin_address'; value: string }
+ | { type: 'npub'; value: string }
+ | { type: 'unknown'; value: string };
+
+interface UseQRCodeReturn {
+ generateQRCode: (text: string) => Promise;
+ isGenerating: boolean;
+ error: string | null;
+ // Scanner functions
+ isScanning: boolean;
+ startScanning: (onResult: (result: QRScanResult) => void) => Promise;
+ stopScanning: () => Promise;
+ classifyQRCode: (text: string) => QRScanResult;
+ setModalOpen?: (isOpen: boolean) => void;
+}
+
+/**
+ * Hook for generating QR codes
+ *
+ * @example
+ * ```tsx
+ * const { generateQRCode, isGenerating, error } = useQRCode();
+ *
+ * const qrCodeUrl = await generateQRCode('cashuBo2Ft...');
+ * ```
+ */
+export function useQRCode(): UseQRCodeReturn {
+ const [isGenerating, setIsGenerating] = useState(false);
+ const [error, setError] = useState(null);
+ const [isScanning, setIsScanning] = useState(false);
+ const [scanError, setScanError] = useState(null);
+ const scannerRef = useRef(null);
+ const isStartingRef = useRef(false);
+ const shouldCancelRef = useRef(false);
+ const modalOpenRef = useRef(true);
+ const { toast } = useToast();
+
+ const setModalOpen = useCallback((isOpen: boolean) => {
+ modalOpenRef.current = isOpen;
+ }, []);
+
+ const generateQRCode = useCallback(async (text: string): Promise => {
+ setIsGenerating(true);
+ setError(null);
+
+ try {
+ const qrCodeUrl = await QRCode.toDataURL(text, {
+ width: 256,
+ margin: 2,
+ color: {
+ dark: '#000000',
+ light: '#FFFFFF',
+ },
+ });
+ setIsGenerating(false);
+ return qrCodeUrl;
+ } catch (err) {
+ const errorMessage = 'Failed to generate QR code';
+ console.error(errorMessage, err);
+ setError(errorMessage);
+ setIsGenerating(false);
+
+ toast({
+ variant: "destructive",
+ title: "QR Code Failed",
+ description: errorMessage,
+ });
+
+ return '';
+ }
+ }, [toast]);
+
+ const classifyQRCode = useCallback((decodedText: string): QRScanResult => {
+ // Lightning invoice: lnbc... or lightning:lnbc... (case insensitive)
+ const lightningInvoiceMatch = decodedText.match(/^(?:lightning:)?(lnbc[a-z0-9]+)$/i);
+ if (lightningInvoiceMatch) {
+ return { type: 'lightning_invoice', value: lightningInvoiceMatch[1] };
+ }
+
+ // Lightning address: name@domain.tld or lightning:name@domain.tld
+ const lightningAddressMatch = decodedText.match(/^(?:lightning:)?([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})$/);
+ if (lightningAddressMatch) {
+ return { type: 'lightning_address', value: lightningAddressMatch[1] };
+ }
+
+ // Cashu token: cashu...
+ if (/^cashu[A-Za-z0-9+/=_-]+$/.test(decodedText)) {
+ return { type: 'cashu_token', value: decodedText };
+ }
+
+ // Bitcoin address: bc1... or legacy (1..., 3...)
+ if (/^(bc1|3|1)[a-zA-Z0-9]{25,62}$/.test(decodedText)) {
+ return { type: 'bitcoin_address', value: decodedText };
+ }
+
+ // Nostr npub: npub1... or nostr:npub1...
+ const npubMatch = decodedText.match(/^(?:nostr:)?(npub1[a-z0-9]{58})$/);
+ if (npubMatch) {
+ return { type: 'npub', value: npubMatch[1] };
+ }
+
+ return { type: 'unknown', value: decodedText };
+ }, []);
+
+ const startScanning = useCallback(async (onResult: (result: QRScanResult) => void): Promise => {
+ try {
+ isStartingRef.current = true;
+ shouldCancelRef.current = false;
+ setScanError(null);
+
+ // Find available cameras
+ const devices = await Html5Qrcode.getCameras();
+ if (devices.length === 0) {
+ throw new Error('No cameras found');
+ }
+
+ // Check if we should cancel before proceeding
+ if (shouldCancelRef.current) {
+ isStartingRef.current = false;
+ return;
+ }
+
+ // Use the rear camera by default, or first available
+ const cameraId = devices.length > 1
+ ? devices.find(d => d.label.toLowerCase().includes('back') || d.label.toLowerCase().includes('rear'))?.id || devices[0].id
+ : devices[0].id;
+
+ // Initialize scanner
+ const scanner = new Html5Qrcode('qr-reader');
+ scannerRef.current = scanner;
+
+ // Start scanning
+ await scanner.start(
+ cameraId,
+ {
+ fps: 10,
+ aspectRatio: 1,
+ qrbox: 250
+ },
+ (decodedText) => {
+ const result = classifyQRCode(decodedText);
+ onResult(result);
+ },
+ (errorMessage) => {
+ // Ignore decoding errors, camera is still running
+ // Only log if it's not a "QR code not found" type error
+ if (!errorMessage.includes('qr')) {
+ console.debug('QR scan error:', errorMessage);
+ }
+ }
+ );
+
+ isStartingRef.current = false;
+
+ // Check if we should immediately stop after starting (cancel was requested during init)
+ if (shouldCancelRef.current || !modalOpenRef.current) {
+ try {
+ await scanner.stop();
+ await scanner.clear();
+ scannerRef.current = null;
+ } catch (err) {
+ console.error('Error stopping scanner after cancelled init:', err);
+ }
+ return;
+ }
+
+ setIsScanning(true);
+ } catch (err) {
+ isStartingRef.current = false;
+ shouldCancelRef.current = false;
+ let errorMessage = 'Failed to start camera';
+ if (err instanceof Error) {
+ errorMessage = err.message;
+ } else if (typeof err === 'string') {
+ errorMessage = err;
+ }
+
+ // Provide more helpful error messages
+ if (errorMessage.includes('NotAllowedError') || errorMessage.includes('Permission denied')) {
+ errorMessage = 'Camera permission denied. Please allow camera access.';
+ } else if (errorMessage.includes('NotFoundError') || errorMessage.includes('No device')) {
+ errorMessage = 'No camera found. Please connect a camera.';
+ }
+
+ setScanError(errorMessage);
+ setIsScanning(false);
+ console.error('Camera error:', err);
+ }
+ }, [classifyQRCode]);
+
+ const stopScanning = useCallback(async (): Promise => {
+ try {
+ // If scanner is starting up, set cancel flag
+ if (isStartingRef.current) {
+ shouldCancelRef.current = true;
+ // Wait for startup to complete and auto-stop
+ let attempts = 0;
+ while (isStartingRef.current && attempts < 50) { // Wait up to 5 seconds
+ await new Promise(resolve => setTimeout(resolve, 100));
+ attempts++;
+ }
+ }
+
+ if (scannerRef.current) {
+ // Check if scanner is actually running before trying to stop
+ const scanner = scannerRef.current;
+ try {
+ // Html5Qrcode has a getState() method to check if it's scanning
+ const state = scanner.getState();
+ if (state === 2) { // State 2 = SCANNING
+ await scanner.stop();
+ } else if (state === 1) { // State 1 = STARTING
+ // Wait a bit more and try again
+ await new Promise(resolve => setTimeout(resolve, 200));
+ const newState = scanner.getState();
+ if (newState === 2) {
+ await scanner.stop();
+ }
+ }
+ } catch (stopErr) {
+ // If stop fails, try to clear anyway
+ console.warn('Error stopping scanner, attempting to clear:', stopErr);
+ }
+
+ try {
+ await scanner.clear();
+ } catch (clearErr) {
+ console.warn('Error clearing scanner:', clearErr);
+ }
+
+ scannerRef.current = null;
+ }
+ shouldCancelRef.current = false;
+ isStartingRef.current = false;
+ setIsScanning(false);
+ setScanError(null);
+ } catch (err) {
+ console.error('Error stopping scanner:', err);
+ shouldCancelRef.current = false;
+ isStartingRef.current = false;
+ setIsScanning(false);
+ scannerRef.current = null;
+ }
+ }, []);
+
+ return {
+ generateQRCode,
+ isGenerating,
+ error: scanError,
+ isScanning,
+ startScanning,
+ stopScanning,
+ classifyQRCode,
+ setModalOpen,
+ };
+}
diff --git a/src/hooks/wallet/useReverseSwap.ts b/src/hooks/wallet/useReverseSwap.ts
new file mode 100644
index 0000000..2623920
--- /dev/null
+++ b/src/hooks/wallet/useReverseSwap.ts
@@ -0,0 +1,444 @@
+import zkpInit from '@vulpemventures/secp256k1-zkp';
+import {
+ Transaction,
+ address,
+ initEccLib,
+ networks,
+} from 'bitcoinjs-lib';
+import {
+ Musig,
+ OutputType,
+ SwapTreeSerializer,
+ TaprootUtils,
+ constructClaimTransaction,
+ detectSwap,
+ targetFee,
+} from 'boltz-core';
+import { ECPairFactory, type ECPairAPI, type ECPairInterface } from 'ecpair';
+import * as ecc from '@bitcoinerlab/secp256k1';
+import { Buffer } from 'buffer';
+
+// Initialize ECC library
+initEccLib(ecc);
+
+// Boltz API endpoints
+const API_ENDPOINT = 'https://api.boltz.exchange';
+const WS_ENDPOINT = 'wss://api.boltz.exchange/v2/ws';
+
+// Use mainnet by default
+const network = networks.bitcoin;
+
+// Lazy initialization of ECPair factory
+let ECPair: ECPairAPI | null = null;
+
+function getECPair(): ECPairAPI {
+ if (!ECPair) {
+ ECPair = ECPairFactory(ecc);
+ }
+ return ECPair;
+}
+
+/**
+ * Generate random bytes using browser crypto API
+ */
+function randomBytes(length: number): Buffer {
+ const array = new Uint8Array(length);
+ if (typeof window !== 'undefined' && window.crypto && window.crypto.getRandomValues) {
+ window.crypto.getRandomValues(array);
+ } else {
+ // Fallback for Node.js environments (shouldn't happen in browser, but just in case)
+ for (let i = 0; i < length; i++) {
+ array[i] = Math.floor(Math.random() * 256);
+ }
+ }
+ return Buffer.from(array);
+}
+
+/**
+ * SHA256 hash using browser SubtleCrypto API
+ *
+ * Note: window.crypto.subtle requires a secure context (HTTPS or localhost).
+ * It will be undefined if the page is served over HTTP.
+ */
+async function sha256(data: Buffer): Promise {
+ if (typeof window !== 'undefined' && window.crypto && window.crypto.subtle) {
+ // Convert Buffer to Uint8Array for SubtleCrypto
+ const uint8Array = new Uint8Array(data);
+ const hashBuffer = await window.crypto.subtle.digest('SHA-256', uint8Array);
+ return Buffer.from(hashBuffer);
+ }
+ // window.crypto.subtle unavailable - likely due to:
+ // 1. Page served over HTTP (not HTTPS/localhost)
+ // 2. Very old browser without support
+ // 3. Test environment without crypto API
+ throw new Error(
+ 'SHA256 not available: window.crypto.subtle requires HTTPS or localhost. ' +
+ 'Please serve the application over HTTPS or use localhost for development.'
+ );
+}
+
+/**
+ * Swap status update from WebSocket
+ */
+export interface SwapStatusUpdate {
+ status: 'swap.created' | 'transaction.mempool' | 'invoice.settled' | 'transaction.confirmed';
+ transaction?: {
+ hex: string;
+ };
+}
+
+/**
+ * Reverse swap result
+ */
+export interface ReverseSwapResult {
+ /** Lightning invoice to pay */
+ invoice: string;
+ /** Swap ID for tracking */
+ swapId: string;
+ /** Function to close WebSocket connection */
+ close: () => void;
+}
+
+/**
+ * Options for creating a reverse swap
+ */
+export interface ReverseSwapOptions {
+ /** Amount in satoshis for the Lightning invoice */
+ invoiceAmount: number;
+ /** Bitcoin address to receive the on-chain funds */
+ destinationAddress: string;
+ /** Callback for swap status updates */
+ onStatusUpdate?: (update: SwapStatusUpdate) => void;
+ /** Callback when swap is successfully completed */
+ onSuccess?: () => void;
+ /** Callback for errors */
+ onError?: (error: Error) => void;
+ /** Network to use (defaults to mainnet) */
+ network?: typeof networks.bitcoin | typeof networks.regtest | typeof networks.testnet;
+}
+
+/**
+ * Create a reverse swap (Lightning to on-chain Bitcoin)
+ *
+ * This function creates a reverse swap where the user pays a Lightning invoice,
+ * and receives Bitcoin on-chain at the specified address.
+ *
+ * @param options - Reverse swap configuration options
+ * @returns Promise resolving to swap result with invoice and tracking functions
+ *
+ * @example
+ * ```typescript
+ * const { invoice, swapId, close } = await createReverseSwap({
+ * invoiceAmount: 100_000,
+ * destinationAddress: 'bc1q...',
+ * onStatusUpdate: (update) => {
+ * console.log('Swap status:', update.status);
+ * },
+ * onSuccess: () => {
+ * console.log('Swap completed!');
+ * }
+ * });
+ *
+ * // Display invoice to user for payment
+ * console.log('Pay this invoice:', invoice);
+ *
+ * // Later, close the connection when done
+ * close();
+ * ```
+ */
+export async function createReverseSwap(
+ options: ReverseSwapOptions
+): Promise {
+ const {
+ invoiceAmount,
+ destinationAddress,
+ onStatusUpdate,
+ onSuccess,
+ onError,
+ network: swapNetwork = network,
+ } = options;
+
+ // Create a random preimage for the swap (must be 32 bytes)
+ const preimage = randomBytes(32);
+ const keys = getECPair().makeRandom();
+
+ // Hash the preimage
+ const preimageHash = await sha256(preimage);
+
+ // Get public key as hex - match original code exactly
+ // keys.publicKey is a Buffer (or Uint8Array in browser), convert to hex string
+ // This should be a compressed public key (33 bytes = 66 hex chars)
+ const claimPublicKeyHex = Buffer.from(keys.publicKey).toString('hex');
+
+ // Validate length (compressed public key should be 33 bytes = 66 hex chars)
+ if (claimPublicKeyHex.length !== 66) {
+ throw new Error(`Invalid public key hex length: expected 66 chars (33 bytes), got ${claimPublicKeyHex.length}`);
+ }
+
+ const requestBody = {
+ invoiceAmount,
+ to: 'BTC',
+ from: 'BTC',
+ claimPublicKey: claimPublicKeyHex,
+ preimageHash: preimageHash.toString('hex'),
+ };
+
+ console.log('[createReverseSwap] Request body:', {
+ ...requestBody,
+ claimPublicKeyLength: claimPublicKeyHex.length / 2, // Divide by 2 because hex is 2 chars per byte
+ preimageHashLength: requestBody.preimageHash.length / 2,
+ });
+
+ // Create the reverse swap via API
+ const createResponse = await fetch(`${API_ENDPOINT}/v2/swap/reverse`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify(requestBody),
+ });
+
+ if (!createResponse.ok) {
+ const errorText = await createResponse.text();
+ console.error('[createReverseSwap] API error response:', errorText);
+ throw new Error(`Failed to create reverse swap: ${errorText}`);
+ }
+
+ const createdResponse = await createResponse.json();
+
+ // Set up WebSocket connection for tracking swap progress
+ const webSocket = new WebSocket(WS_ENDPOINT);
+
+ const close = () => {
+ if (webSocket.readyState === WebSocket.OPEN) {
+ webSocket.close();
+ }
+ };
+
+ webSocket.onopen = () => {
+ webSocket.send(
+ JSON.stringify({
+ op: 'subscribe',
+ channel: 'swap.update',
+ args: [createdResponse.id],
+ })
+ );
+ };
+
+ webSocket.onmessage = async (event) => {
+ try {
+ const msg = JSON.parse(event.data);
+
+ if (msg.event !== 'update') {
+ return;
+ }
+
+ const statusUpdate: SwapStatusUpdate = {
+ status: msg.args[0].status,
+ transaction: msg.args[0].transaction,
+ };
+
+ onStatusUpdate?.(statusUpdate);
+
+ switch (msg.args[0].status) {
+ case 'swap.created': {
+ // Boltz is waiting for the invoice to be paid
+ break;
+ }
+
+ case 'transaction.mempool': {
+ // Boltz sent an on-chain transaction, now we need to claim it
+ try {
+ await claimSwapTransaction(
+ createdResponse,
+ keys,
+ preimage,
+ destinationAddress,
+ msg.args[0].transaction.hex,
+ swapNetwork
+ );
+ } catch (error) {
+ const err = error instanceof Error ? error : new Error(String(error));
+ onError?.(err);
+ close();
+ throw err;
+ }
+ break;
+ }
+
+ case 'invoice.settled':
+ case 'transaction.confirmed': {
+ // Swap successful
+ onSuccess?.();
+ close();
+ break;
+ }
+ }
+ } catch (error) {
+ const err = error instanceof Error ? error : new Error(String(error));
+ onError?.(err);
+ close();
+ }
+ };
+
+ webSocket.onerror = (error) => {
+ onError?.(new Error('WebSocket error occurred'));
+ };
+
+ webSocket.onclose = () => {
+ // Connection closed
+ };
+
+ return {
+ invoice: createdResponse.invoice,
+ swapId: createdResponse.id,
+ close,
+ };
+}
+
+/**
+ * Claim the swap transaction after Boltz sends it to the mempool
+ */
+async function claimSwapTransaction(
+ createdResponse: {
+ id: string;
+ refundPublicKey: string;
+ swapTree: string;
+ },
+ keys: ECPairInterface,
+ preimage: Buffer,
+ destinationAddress: string,
+ lockupTxHex: string,
+ swapNetwork: typeof networks.bitcoin | typeof networks.regtest | typeof networks.testnet
+): Promise {
+ const boltzPublicKey = Buffer.from(createdResponse.refundPublicKey, 'hex');
+
+ // Create a musig signing session and tweak it with the Taptree of the swap scripts
+ const zkp = await zkpInit();
+ // Convert keys.publicKey (Uint8Array) to Buffer for Musig
+ const keysPublicKeyBuffer = Buffer.from(keys.publicKey);
+ const musig = new Musig(zkp, keys, randomBytes(32), [
+ boltzPublicKey,
+ keysPublicKeyBuffer,
+ ]);
+
+ const tweakedKey = TaprootUtils.tweakMusig(
+ musig,
+ SwapTreeSerializer.deserializeSwapTree(createdResponse.swapTree).tree
+ );
+
+ // Parse the lockup transaction and find the output relevant for the swap
+ const lockupTx = Transaction.fromHex(lockupTxHex);
+ // Convert Transaction outputs to the format expected by detectSwap
+ // bitcoinjs-lib v7 uses bigint for values, but detectSwap expects number
+ const txOutputs = lockupTx.outs.map((out) => ({
+ script: Buffer.from(out.script),
+ value: Number(out.value), // Convert bigint to number
+ }));
+ const swapOutput = detectSwap(tweakedKey, { outs: txOutputs });
+
+ if (swapOutput === undefined) {
+ throw new Error('No swap output found in lockup transaction');
+ }
+
+ // Create a claim transaction to be signed cooperatively via a key path spend
+ // swapOutput.value is guaranteed to be a number because we converted it above
+ // (detectSwap preserves the input type, and we passed { value: number })
+ // TypeScript needs explicit assertion since detectSwap is generic
+ const swapValueForClaim: number = Number(swapOutput.value);
+
+ // Convert txHash to Buffer
+ const txHashBuffer = Buffer.from(lockupTx.getHash());
+
+ // Convert address script to Buffer
+ const destinationScript = Buffer.from(address.toOutputScript(destinationAddress, swapNetwork));
+
+ const claimTx = targetFee(2, (fee) =>
+ constructClaimTransaction(
+ [
+ {
+ ...swapOutput,
+ value: swapValueForClaim,
+ keys,
+ preimage,
+ cooperative: true,
+ type: OutputType.Taproot,
+ txHash: txHashBuffer,
+ },
+ ],
+ destinationScript,
+ fee
+ )
+ );
+
+ // Get the partial signature from Boltz
+ const claimResponse = await fetch(
+ `${API_ENDPOINT}/v2/swap/reverse/${createdResponse.id}/claim`,
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ index: 0,
+ transaction: claimTx.toHex(),
+ preimage: preimage.toString('hex'),
+ pubNonce: Buffer.from(musig.getPublicNonce()).toString('hex'),
+ }),
+ }
+ );
+
+ if (!claimResponse.ok) {
+ const errorText = await claimResponse.text();
+ throw new Error(`Failed to get claim signature: ${errorText}`);
+ }
+
+ const boltzSig = await claimResponse.json();
+
+ // Aggregate the nonces
+ musig.aggregateNonces([
+ [boltzPublicKey, Buffer.from(boltzSig.pubNonce, 'hex')],
+ ]);
+
+ // Initialize the session to sign the claim transaction
+ // Use the already converted value for hashForWitnessV1
+ musig.initializeSession(
+ claimTx.hashForWitnessV1(
+ 0,
+ [swapOutput.script],
+ [swapValueForClaim],
+ Transaction.SIGHASH_DEFAULT
+ )
+ );
+
+ // Add the partial signature from Boltz
+ musig.addPartial(
+ boltzPublicKey,
+ Buffer.from(boltzSig.partialSignature, 'hex')
+ );
+
+ // Create our partial signature
+ musig.signPartial();
+
+ // Witness of the input to the aggregated signature
+ claimTx.ins[0].witness = [musig.aggregatePartials()];
+
+ // Broadcast the finalized transaction
+ const broadcastResponse = await fetch(
+ `${API_ENDPOINT}/v2/chain/BTC/transaction`,
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({
+ hex: claimTx.toHex(),
+ }),
+ }
+ );
+
+ if (!broadcastResponse.ok) {
+ const errorText = await broadcastResponse.text();
+ throw new Error(`Failed to broadcast transaction: ${errorText}`);
+ }
+}
diff --git a/src/hooks/wallet/useReverseSwapOperations.ts b/src/hooks/wallet/useReverseSwapOperations.ts
new file mode 100644
index 0000000..f5b0fbb
--- /dev/null
+++ b/src/hooks/wallet/useReverseSwapOperations.ts
@@ -0,0 +1,189 @@
+import { useState, useCallback, useEffect } from 'react';
+import { nip19 } from 'nostr-tools';
+import { createReverseSwap, type SwapStatusUpdate } from '@/hooks/wallet/useReverseSwap';
+import { isValidBitcoinAddress, npubToBitcoinAddress } from '@/lib/bitcoin';
+import type { Manager } from 'coco-cashu-core';
+import { useToast } from '@/hooks/useToast';
+
+interface UseReverseSwapOperationsProps {
+ coco: Manager | null;
+ activeMintUrl: string | null;
+}
+
+export function useReverseSwapOperations({ coco, activeMintUrl }: UseReverseSwapOperationsProps) {
+ const { toast } = useToast();
+
+ // Reverse swap state (Lightning -> Bitcoin)
+ const [pendingBitcoinSwapAddress, setPendingBitcoinSwapAddress] = useState(null);
+ const [bitcoinSwapAmount, setBitcoinSwapAmount] = useState('');
+ const [swapStatus, setSwapStatus] = useState(null);
+ const [reverseSwapClose, setReverseSwapClose] = useState<(() => void) | null>(null);
+
+ // Detect if input is a Bitcoin address or npub for reverse swap
+ const detectBitcoinAddress = useCallback((input: string): boolean => {
+ // Check if it's a Bitcoin address
+ if (isValidBitcoinAddress(input)) {
+ setPendingBitcoinSwapAddress(input);
+ return true;
+ }
+
+ // Check if it's an npub (can be converted to Bitcoin address)
+ try {
+ const decoded = nip19.decode(input);
+ if (decoded.type === 'npub') {
+ const bitcoinAddr = npubToBitcoinAddress(input);
+ if (bitcoinAddr) {
+ setPendingBitcoinSwapAddress(input); // Store npub, will convert later
+ return true;
+ }
+ }
+ } catch {
+ // Not an npub, continue
+ }
+
+ return false;
+ }, []);
+
+ // Handle reverse swap execution
+ const handleReverseSwap = useCallback(async () => {
+ if (!coco || !pendingBitcoinSwapAddress || !bitcoinSwapAmount || !activeMintUrl) {
+ return;
+ }
+
+ try {
+ const amount = parseInt(bitcoinSwapAmount);
+ if (isNaN(amount) || amount <= 0) {
+ toast({
+ variant: 'destructive',
+ title: 'Invalid Amount',
+ description: 'Please enter a valid amount',
+ });
+ return;
+ }
+
+ // Validate reverse swap amount limits (25,000 - 25,000,000 sats)
+ if (amount < 25_000 || amount > 25_000_000) {
+ toast({
+ variant: 'destructive',
+ title: 'Invalid Amount',
+ description: 'Reverse swap amount must be between 25,000 and 25,000,000 sats',
+ });
+ return;
+ }
+
+ // Determine destination address (could be Bitcoin address or npub)
+ let destinationAddress = pendingBitcoinSwapAddress;
+ try {
+ // Try to decode as npub first
+ const decoded = nip19.decode(pendingBitcoinSwapAddress);
+ if (decoded.type === 'npub') {
+ destinationAddress = npubToBitcoinAddress(pendingBitcoinSwapAddress);
+ }
+ } catch {
+ // Not an npub, assume it's already a Bitcoin address
+ }
+
+ // Initiate reverse swap
+ setSwapStatus('Creating reverse swap...');
+ const swapResult = await createReverseSwap({
+ invoiceAmount: amount,
+ destinationAddress,
+ onStatusUpdate: (update: SwapStatusUpdate) => {
+ switch (update.status) {
+ case 'swap.created':
+ setSwapStatus('Waiting for invoice payment...');
+ break;
+ case 'transaction.mempool':
+ setSwapStatus('Swap transaction sent to blockchain...');
+ break;
+ case 'invoice.settled':
+ case 'transaction.confirmed':
+ setSwapStatus('Swap completed!');
+ break;
+ }
+ },
+ onSuccess: () => {
+ const displayAddress = destinationAddress.length > 26
+ ? destinationAddress.slice(0, 12) + '...' + destinationAddress.slice(-12)
+ : destinationAddress;
+ toast({
+ title: 'Reverse Swap Completed',
+ description: `Successfully swapped ${amount} sats to Bitcoin address ${displayAddress}!`,
+ });
+ setSwapStatus(null);
+ setPendingBitcoinSwapAddress(null);
+ setBitcoinSwapAmount('');
+ if (reverseSwapClose) {
+ reverseSwapClose();
+ setReverseSwapClose(null);
+ }
+ },
+ onError: (error: Error) => {
+ toast({
+ variant: 'destructive',
+ title: 'Reverse Swap Failed',
+ description: error.message,
+ });
+ setSwapStatus(null);
+ setPendingBitcoinSwapAddress(null);
+ setBitcoinSwapAmount('');
+ if (reverseSwapClose) {
+ reverseSwapClose();
+ setReverseSwapClose(null);
+ }
+ },
+ });
+
+ // Store close function for cleanup
+ setReverseSwapClose(() => swapResult.close);
+
+ // Pay the Lightning invoice from the swap using the active mint
+ setSwapStatus('Paying Lightning invoice...');
+ const meltQuote = await coco.quotes.createMeltQuote(
+ activeMintUrl,
+ swapResult.invoice
+ );
+ await coco.quotes.payMeltQuote(activeMintUrl, meltQuote.quote);
+
+ toast({
+ title: 'Invoice Paid',
+ description: `Lightning invoice paid. Swap in progress...`,
+ });
+ } catch (err) {
+ console.error('Reverse swap error:', err);
+ toast({
+ variant: 'destructive',
+ title: 'Reverse Swap Failed',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ setSwapStatus(null);
+ setPendingBitcoinSwapAddress(null);
+ setBitcoinSwapAmount('');
+ if (reverseSwapClose) {
+ reverseSwapClose();
+ setReverseSwapClose(null);
+ }
+ }
+ }, [coco, pendingBitcoinSwapAddress, bitcoinSwapAmount, activeMintUrl, toast, reverseSwapClose]);
+
+ // Cleanup reverse swap WebSocket on unmount
+ useEffect(() => {
+ return () => {
+ if (reverseSwapClose) {
+ reverseSwapClose();
+ }
+ };
+ }, [reverseSwapClose]);
+
+ return {
+ // State
+ pendingBitcoinSwapAddress,
+ setPendingBitcoinSwapAddress,
+ bitcoinSwapAmount,
+ setBitcoinSwapAmount,
+ swapStatus,
+ // Functions
+ detectBitcoinAddress,
+ handleReverseSwap,
+ };
+}
diff --git a/src/hooks/wallet/useSeedPhraseRestore.ts b/src/hooks/wallet/useSeedPhraseRestore.ts
new file mode 100644
index 0000000..8ba7d97
--- /dev/null
+++ b/src/hooks/wallet/useSeedPhraseRestore.ts
@@ -0,0 +1,116 @@
+import { useState, useCallback } from 'react';
+import * as bip39 from '@scure/bip39';
+import { wordlist } from '@scure/bip39/wordlists/english.js';
+import { initializeCoco, ConsoleLogger } from 'coco-cashu-core';
+import { IndexedDbRepositories } from 'coco-cashu-indexeddb';
+import type { Manager } from 'coco-cashu-core';
+import { useToast } from '@/hooks/useToast';
+
+interface UseSeedPhraseRestoreProps {
+ coco: Manager | null;
+}
+
+export function useSeedPhraseRestore({ coco }: UseSeedPhraseRestoreProps) {
+ const { toast } = useToast();
+ const [isRestoring, setIsRestoring] = useState(false);
+
+ const handleRestoreFromSeedPhrase = useCallback(async (seedPhrase: string, mintUrl: string) => {
+ if (!coco) {
+ throw new Error('Wallet not initialized');
+ }
+
+ setIsRestoring(true);
+
+ try {
+ // Clean and validate the seed phrase
+ const cleanedSeedPhrase = seedPhrase.trim().toLowerCase();
+
+ // Check if it's a valid mnemonic format
+ if (!bip39.validateMnemonic(cleanedSeedPhrase, wordlist)) {
+ // Try to provide more specific error information
+ const words = cleanedSeedPhrase.split(/\s+/);
+ if (words.length !== 12) {
+ throw new Error(`Seed phrase must have exactly 12 words, but found ${words.length} words`);
+ }
+
+ // Check if all words are valid
+ const invalidWords = words.filter(word => !wordlist.includes(word));
+ if (invalidWords.length > 0) {
+ throw new Error(`Invalid words found: ${invalidWords.join(', ')}`);
+ }
+
+ throw new Error('Invalid seed phrase format. Please check that all words are spelled correctly.');
+ }
+
+ // Verify this is a different seed from the current wallet
+ const currentMnemonic = localStorage.getItem('cashu-mnemonic');
+ if (currentMnemonic && currentMnemonic.toLowerCase() === cleanedSeedPhrase) {
+ throw new Error('This is the same seed phrase as your current wallet. Please enter a different seed phrase to restore from.');
+ }
+
+ // Convert seed phrase to seed
+ const restoredSeed = bip39.mnemonicToSeedSync(cleanedSeedPhrase);
+
+ // Get current balance before restore
+ const balancesBefore = await coco.wallet.getBalances();
+ const balanceBefore = balancesBefore[mintUrl] || 0;
+
+ // Create a temporary coco instance with the restored seed to fetch proofs
+ const tempRepo = new IndexedDbRepositories({ name: `cashu-wallet-restore-${Date.now()}` });
+ await tempRepo.init();
+
+ const tempCoco = await initializeCoco({
+ repo: tempRepo,
+ seedGetter: async () => restoredSeed,
+ logger: new ConsoleLogger(`restore-${Date.now()}`, { level: "debug" })
+ });
+
+ try {
+ // Restore the proofs in the temporary wallet
+ await tempCoco.wallet.restore(mintUrl);
+
+ // Get the restored balance from the temporary wallet
+ const tempBalances = await tempCoco.wallet.getBalances();
+ const restoredAmount = tempBalances[mintUrl] || 0;
+
+ if (restoredAmount <= 0) {
+ toast({
+ title: "No Tokens Found",
+ description: "No tokens were found for this seed phrase on the selected mint.",
+ });
+ return;
+ }
+
+ // Send the restored tokens from the temporary wallet
+ const token = await tempCoco.wallet.send(mintUrl, restoredAmount);
+
+ // Receive the token in the main wallet
+ await coco.wallet.receive(token);
+
+ // Verify the transfer
+ const balancesAfter = await coco.wallet.getBalances();
+ const balanceAfter = balancesAfter[mintUrl] || 0;
+ const actualRestored = balanceAfter - balanceBefore;
+
+ toast({
+ title: "Restore Successful",
+ description: `Restored ${actualRestored} sats from the seed phrase and added to your current wallet.`,
+ });
+ } finally {
+ // Clean up temporary database (optional - happens automatically on next session)
+ // The temporary IndexedDB will be isolated to the unique name we provided
+ }
+
+ } catch (error) {
+ console.error('Restore failed:', error);
+ throw error;
+ } finally {
+ setIsRestoring(false);
+ }
+ }, [coco, toast]);
+
+ return {
+ handleRestoreFromSeedPhrase,
+ isRestoring,
+ };
+}
diff --git a/src/hooks/wallet/useTokenOperations.ts b/src/hooks/wallet/useTokenOperations.ts
new file mode 100644
index 0000000..d89a37c
--- /dev/null
+++ b/src/hooks/wallet/useTokenOperations.ts
@@ -0,0 +1,168 @@
+import { useState, useCallback } from 'react';
+import { isUnknownMintError, extractMintUrlFromError } from './useMintManager';
+import type { Manager } from 'coco-cashu-core';
+import type { Token } from '@cashu/cashu-ts';
+import { useToast } from '@/hooks/useToast';
+
+interface UseTokenOperationsProps {
+ coco: Manager | null;
+ activeMintUrl: string | null;
+ generateQRCode: (text: string) => Promise;
+ getEncodedToken: (token: Token | string) => string;
+}
+
+export function useTokenOperations({
+ coco,
+ activeMintUrl,
+ generateQRCode,
+ getEncodedToken,
+}: UseTokenOperationsProps) {
+ const { toast } = useToast();
+
+ // Receive state
+ const [tokenInput, setTokenInput] = useState('');
+
+ // Send state
+ const [sendAmount, setSendAmount] = useState('');
+
+ // Transaction output state
+ const [sentToken, setSentToken] = useState(null);
+ const [sentTokenQRCode, setSentTokenQRCode] = useState('');
+
+ // Generate QR code for sent token
+ const generateSentTokenQRCode = useCallback(async (token: string) => {
+ try {
+ const qrCodeUrl = await generateQRCode(token);
+ setSentTokenQRCode(qrCodeUrl);
+ } catch (err) {
+ console.error('Failed to generate sent token QR code:', err);
+ }
+ }, [generateQRCode]);
+
+ // Handle unknown mint error by adding the mint and retrying
+ const handleUnknownMintError = useCallback(
+ async (mintUrl: string) => {
+ if (!coco) return;
+
+ try {
+ console.log('Adding unknown mint:', mintUrl);
+
+ // Check if mint exists (known) by checking all mints
+ const allMints = await coco.mint.getAllMints();
+ const isKnown = allMints.some(m => m.mintUrl.toLowerCase() === mintUrl.toLowerCase());
+
+ if (isKnown) {
+ // Mint exists but may not be trusted, ensure it's trusted
+ const isTrusted = await coco.mint.isTrustedMint(mintUrl);
+ if (!isTrusted) {
+ await coco.mint.trustMint(mintUrl);
+ }
+ } else {
+ // Add the mint and automatically trust it (user is explicitly receiving from it)
+ await coco.mint.addMint(mintUrl, { trusted: true });
+ }
+
+ // Retry receiving the token
+ await coco.wallet.receive(tokenInput);
+ setTokenInput('');
+
+ toast({
+ title: 'Token Received',
+ description: `Cashu token redeemed successfully! Added new mint: ${mintUrl}`,
+ });
+ } catch (retryErr) {
+ console.error('Failed to add mint and retry receive:', retryErr);
+ toast({
+ variant: 'destructive',
+ title: 'Receive Failed',
+ description: `Failed to add mint and receive token: ${retryErr instanceof Error ? retryErr.message : 'Unknown error'}`,
+ });
+ }
+ },
+ [coco, tokenInput, toast]
+ );
+
+ // Handle receive (token)
+ const handleTokenReceive = useCallback(async () => {
+ if (!coco || !tokenInput) {
+ return;
+ }
+
+ try {
+ console.log(
+ 'Attempting to receive token:',
+ tokenInput.substring(0, 20) + '...'
+ );
+ await coco.wallet.receive(tokenInput);
+ setTokenInput('');
+ toast({
+ title: 'Token Received',
+ description: 'Cashu token redeemed successfully!',
+ });
+ } catch (err) {
+ console.error('Token receive error:', err);
+
+ // Handle UnknownMintError by automatically adding the mint
+ if (isUnknownMintError(err)) {
+ const mintUrl = extractMintUrlFromError(err);
+ if (mintUrl) {
+ await handleUnknownMintError(mintUrl);
+ return;
+ }
+ }
+
+ toast({
+ variant: 'destructive',
+ title: 'Receive Failed',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ }
+ }, [coco, tokenInput, toast, handleUnknownMintError]);
+
+ // Handle send (token)
+ const handleTokenSend = useCallback(async () => {
+ if (!coco || !sendAmount || !activeMintUrl) {
+ return;
+ }
+
+ try {
+ const amount = parseInt(sendAmount);
+ if (isNaN(amount) || amount <= 0) {
+ toast({
+ variant: 'destructive',
+ title: 'Invalid Amount',
+ description: 'Please enter a valid amount',
+ });
+ return;
+ }
+
+ const token = await coco.wallet.send(activeMintUrl, amount);
+ const encodedToken = getEncodedToken(token);
+ setSentToken(encodedToken);
+ await generateSentTokenQRCode(encodedToken);
+ setSendAmount('');
+ } catch (err) {
+ toast({
+ variant: 'destructive',
+ title: 'Send Failed',
+ description: err instanceof Error ? err.message : 'Unknown error',
+ });
+ }
+ }, [coco, sendAmount, activeMintUrl, getEncodedToken, generateSentTokenQRCode, toast]);
+
+ return {
+ // Receive state
+ tokenInput,
+ setTokenInput,
+ // Send state
+ sendAmount,
+ setSendAmount,
+ // Transaction output state
+ sentToken,
+ setSentToken,
+ sentTokenQRCode,
+ // Handlers
+ handleTokenReceive,
+ handleTokenSend,
+ };
+}
diff --git a/src/index.css b/src/index.css
index 33fdf9d..2814c31 100644
--- a/src/index.css
+++ b/src/index.css
@@ -98,4 +98,23 @@
body {
@apply bg-background text-foreground;
}
+}
+
+@layer utilities {
+ /* Safe area inset utilities */
+ .pb-safe-bottom {
+ padding-bottom: env(safe-area-inset-bottom);
+ }
+
+ .mb-safe-bottom {
+ margin-bottom: env(safe-area-inset-bottom);
+ }
+
+ .pt-safe-top {
+ padding-top: env(safe-area-inset-top);
+ }
+
+ .mt-safe-top {
+ margin-top: env(safe-area-inset-top);
+ }
}
\ No newline at end of file
diff --git a/src/lib/bitcoin.ts b/src/lib/bitcoin.ts
new file mode 100644
index 0000000..6c217a4
--- /dev/null
+++ b/src/lib/bitcoin.ts
@@ -0,0 +1,322 @@
+import * as bitcoin from 'bitcoinjs-lib';
+import { nip19 } from 'nostr-tools';
+import * as ecc from '@bitcoinerlab/secp256k1';
+import { ECPairFactory, type ECPairAPI } from 'ecpair';
+
+// Initialize ECC library immediately
+bitcoin.initEccLib(ecc);
+
+// Lazy initialization to avoid issues in test environment
+let ECPair: ECPairAPI | null = null;
+
+function getECPair(): ECPairAPI {
+ if (!ECPair) {
+ ECPair = ECPairFactory(ecc);
+ }
+ return ECPair;
+}
+
+/**
+ * Convert Nostr pubkey (hex) to Bitcoin Taproot address
+ */
+export function nostrPubkeyToBitcoinAddress(pubkeyHex: string): string {
+ try {
+ const pubkeyBuffer = Buffer.from(pubkeyHex, 'hex');
+
+ const { address } = bitcoin.payments.p2tr({
+ internalPubkey: pubkeyBuffer,
+ network: bitcoin.networks.bitcoin,
+ });
+
+ return address || '';
+ } catch (error) {
+ console.error('Error generating Bitcoin address:', error);
+ return '';
+ }
+}
+
+/**
+ * Convert npub to Bitcoin Taproot address
+ */
+export function npubToBitcoinAddress(npub: string): string {
+ try {
+ const decoded = nip19.decode(npub);
+
+ if (decoded.type !== 'npub') {
+ throw new Error('Invalid npub format');
+ }
+
+ const pubkeyHex = decoded.data as string;
+ return nostrPubkeyToBitcoinAddress(pubkeyHex);
+ } catch (error) {
+ console.error('Error converting npub to Bitcoin address:', error);
+ throw error;
+ }
+}
+
+/**
+ * Check if a string looks like a Bitcoin address
+ * Supports P2PKH (starts with 1), P2SH (starts with 3), and P2TR/Taproot (starts with bc1)
+ */
+export function isValidBitcoinAddress(address: string): boolean {
+ if (!address || typeof address !== 'string') return false;
+
+ const trimmed = address.trim();
+
+ // P2PKH addresses (legacy, starts with 1)
+ if (trimmed.startsWith('1') && trimmed.length >= 26 && trimmed.length <= 35) {
+ return /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/.test(trimmed);
+ }
+
+ // P2SH addresses (starts with 3)
+ if (trimmed.startsWith('3') && trimmed.length >= 26 && trimmed.length <= 35) {
+ return /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/.test(trimmed);
+ }
+
+ // P2TR/Taproot addresses (bech32, starts with bc1)
+ if (trimmed.startsWith('bc1')) {
+ // Taproot addresses are bc1p... (62 chars) or bc1q... (42 chars for P2WPKH)
+ // For reverse swaps, we're mostly concerned with bc1p (Taproot)
+ return /^bc1[a-z0-9]{39,59}$/i.test(trimmed);
+ }
+
+ return false;
+}
+
+/**
+ * Interface for UTXO (Unspent Transaction Output)
+ */
+export interface UTXO {
+ txid: string;
+ vout: number;
+ value: number; // in satoshis
+ status: {
+ confirmed: boolean;
+ block_height?: number;
+ block_hash?: string;
+ block_time?: number;
+ };
+}
+
+/**
+ * Fetch UTXOs for a Bitcoin address from Blockstream API
+ */
+export async function fetchUTXOs(address: string): Promise {
+ const response = await fetch(`https://blockstream.info/api/address/${address}/utxo`);
+
+ if (!response.ok) {
+ throw new Error('Failed to fetch UTXOs');
+ }
+
+ return response.json();
+}
+
+/**
+ * Get recommended fee rates from Blockstream API
+ */
+export async function getFeeRates(): Promise<{
+ fastestFee: number;
+ halfHourFee: number;
+ hourFee: number;
+ economyFee: number;
+ minimumFee: number;
+}> {
+ const response = await fetch('https://blockstream.info/api/fee-estimates');
+
+ if (!response.ok) {
+ throw new Error('Failed to fetch fee estimates');
+ }
+
+ const data = await response.json();
+
+ return {
+ fastestFee: Math.ceil(data['1'] || 1),
+ halfHourFee: Math.ceil(data['3'] || 1),
+ hourFee: Math.ceil(data['6'] || 1),
+ economyFee: Math.ceil(data['144'] || 1),
+ minimumFee: Math.ceil(data['504'] || 1),
+ };
+}
+
+/**
+ * Broadcast a transaction to the Bitcoin network
+ */
+export async function broadcastTransaction(txHex: string): Promise {
+ const response = await fetch('https://blockstream.info/api/tx', {
+ method: 'POST',
+ body: txHex,
+ });
+
+ if (!response.ok) {
+ const error = await response.text();
+ throw new Error(`Failed to broadcast transaction: ${error}`);
+ }
+
+ return response.text(); // Returns the transaction ID
+}
+
+/**
+ * Create and sign a Bitcoin transaction
+ * @param privateKeyHex - Private key in hex format (from Nostr nsec)
+ * @param toAddress - Recipient Bitcoin address
+ * @param amountSats - Amount to send in satoshis
+ * @param utxos - Available UTXOs
+ * @param feeRate - Fee rate in sat/vB
+ * @param sendMax - If true, sends all UTXOs to recipient with no change output
+ * @returns Signed transaction hex
+ */
+export async function createBitcoinTransaction(
+ privateKeyHex: string,
+ toAddress: string,
+ amountSats: number,
+ utxos: UTXO[],
+ feeRate: number,
+ sendMax: boolean = false
+): Promise<{ txHex: string; fee: number }> {
+ // Create key pair from private key
+ const privateKeyBuffer = Buffer.from(privateKeyHex, 'hex');
+ const keyPair = getECPair().fromPrivateKey(privateKeyBuffer);
+
+ // Get x-only public key (32 bytes) for Taproot
+ // Remove the first byte (compression flag) from the 33-byte compressed pubkey
+ const internalPubkey = keyPair.publicKey.slice(1, 33);
+
+ // Get sender's address for change
+ const { address: changeAddress } = bitcoin.payments.p2tr({
+ internalPubkey,
+ network: bitcoin.networks.bitcoin,
+ });
+
+ if (!changeAddress) {
+ throw new Error('Failed to generate change address');
+ }
+
+ // Create transaction builder
+ const psbt = new bitcoin.Psbt({ network: bitcoin.networks.bitcoin });
+
+ // Add inputs (UTXOs)
+ let totalInput = 0;
+ for (const utxo of utxos) {
+ psbt.addInput({
+ hash: utxo.txid,
+ index: utxo.vout,
+ witnessUtxo: {
+ script: bitcoin.payments.p2tr({
+ internalPubkey,
+ network: bitcoin.networks.bitcoin,
+ }).output!,
+ value: BigInt(utxo.value),
+ },
+ tapInternalKey: internalPubkey,
+ });
+
+ totalInput += utxo.value;
+ }
+
+ // Estimate transaction size based on sendMax mode
+ // P2TR input: ~57.5 vBytes, P2TR output: ~43 vBytes
+ const outputCount = sendMax ? 1 : 2; // Send Max = 1 output, Regular = 2 outputs (recipient + change)
+ const estimatedSize = utxos.length * 57.5 + outputCount * 43 + 10.5;
+ const estimatedFee = Math.ceil(estimatedSize * feeRate);
+
+ if (sendMax) {
+ // For Send Max: send all UTXOs to recipient, no change
+ const maxAmount = totalInput - estimatedFee;
+
+ if (maxAmount <= 0) {
+ throw new Error(
+ `Insufficient funds for Send Max. Total: ${totalInput} sats, Fee: ${estimatedFee} sats`
+ );
+ }
+
+ // Add single output for recipient with max amount
+ psbt.addOutput({
+ address: toAddress,
+ value: BigInt(maxAmount),
+ });
+ } else {
+ // Regular transaction: calculate change
+ const change = totalInput - amountSats - estimatedFee;
+
+ if (change < 0) {
+ throw new Error(
+ `Insufficient funds. Need ${amountSats + estimatedFee} sats, have ${totalInput} sats`
+ );
+ }
+
+ // Add output for recipient
+ psbt.addOutput({
+ address: toAddress,
+ value: BigInt(amountSats),
+ });
+
+ // Add change output if significant (> dust limit)
+ const dustLimit = 546; // Standard dust limit for Bitcoin
+ if (change > dustLimit) {
+ psbt.addOutput({
+ address: changeAddress,
+ value: BigInt(change),
+ });
+ }
+ }
+
+ // Create a Taproot signer
+ // For Taproot key-path spending, we need to tweak the private key
+ const tweakedSigner = keyPair.tweak(
+ bitcoin.crypto.taggedHash('TapTweak', internalPubkey)
+ );
+
+ // Sign all inputs
+ for (let i = 0; i < utxos.length; i++) {
+ psbt.signInput(i, tweakedSigner);
+ }
+
+ // Finalize and extract transaction
+ psbt.finalizeAllInputs();
+ const tx = psbt.extractTransaction();
+
+ return {
+ txHex: tx.toHex(),
+ fee: estimatedFee,
+ };
+}
+
+/**
+ * Convert satoshis to BTC
+ */
+export function satsToBTC(sats: number): string {
+ return (sats / 100000000).toFixed(8);
+}
+
+/**
+ * Convert BTC to satoshis
+ */
+export function btcToSats(btc: number): number {
+ return Math.round(btc * 100000000);
+}
+
+/**
+ * Calculate the maximum amount that can be sent from available UTXOs
+ * This accounts for fees and dust limits
+ * @param utxos - Available UTXOs
+ * @param feeRate - Fee rate in sat/vB
+ * @returns Maximum amount in satoshis that can be sent
+ */
+export function calculateMaxSendAmount(utxos: UTXO[], feeRate: number): number {
+ if (utxos.length === 0) {
+ return 0;
+ }
+
+ // Calculate total input value
+ const totalInput = utxos.reduce((sum, utxo) => sum + utxo.value, 0);
+
+ // Estimate transaction size for a single output (no change)
+ // P2TR input: ~57.5 vBytes, P2TR output: ~43 vBytes
+ const estimatedSize = utxos.length * 57.5 + 43 + 10.5; // Single output + overhead
+ const estimatedFee = Math.ceil(estimatedSize * feeRate);
+
+ // Calculate maximum amount (total input minus fees)
+ const maxAmount = totalInput - estimatedFee;
+
+ return Math.max(0, maxAmount);
+}
\ No newline at end of file
diff --git a/src/lib/bolt11Decoder.ts b/src/lib/bolt11Decoder.ts
new file mode 100644
index 0000000..399fa0e
--- /dev/null
+++ b/src/lib/bolt11Decoder.ts
@@ -0,0 +1,85 @@
+/**
+ * Decodes a BOLT11 lightning invoice and extracts the amount in satoshis.
+ * Based on the lightning-decoder project implementation.
+ */
+
+/**
+ * Decode a BOLT11 invoice and extract the amount in satoshis
+ * @param invoice - The BOLT11 invoice string
+ * @returns The amount in satoshis, or null if amount cannot be determined
+ */
+export function decodeBolt11Amount(invoice: string): number | null {
+ try {
+ // Validate and prepare invoice
+ if (!invoice || typeof invoice !== 'string') {
+ return null;
+ }
+
+ const normalizedInvoice = invoice.toLowerCase().trim();
+
+ // Check if it's a valid BOLT11 invoice
+ if (!isValidBolt11Invoice(normalizedInvoice)) {
+ return null;
+ }
+
+ // Parse the prefix to extract amount
+ // Format: lnbc[amount][suffix] where suffix can be m, u, n, p
+ const prefixMatch = normalizedInvoice.match(/^lnbc(\d*)([munp]?)/);
+ if (!prefixMatch) {
+ return null;
+ }
+
+ const [, amountStr, suffix] = prefixMatch;
+
+ // If no amount specified, return null (amountless invoice)
+ if (!amountStr) {
+ return null;
+ }
+
+ const amount = parseInt(amountStr, 10);
+ if (isNaN(amount)) {
+ return null;
+ }
+
+ // Define multipliers for different denominations
+ const multipliers: Record = {
+ m: 0.001, // milli-bitcoin
+ u: 0.000001, // micro-bitcoin
+ n: 0.000000001, // nano-bitcoin
+ p: 0.000000000001 // pico-bitcoin
+ };
+
+ // Apply multiplier if suffix exists
+ const multiplier = multipliers[suffix] || 1;
+ const amountInBitcoin = amount * multiplier;
+
+ // Convert Bitcoin to satoshis (1 Bitcoin = 100,000,000 satoshis)
+ const amountInSatoshis = Math.round(amountInBitcoin * 100_000_000);
+
+ return amountInSatoshis;
+ } catch (error) {
+ console.error('Error decoding BOLT11 invoice:', error);
+ return null;
+ }
+}
+
+/**
+ * Validate if a string is a valid BOLT11 invoice
+ * @param invoice - The string to validate
+ * @returns true if the string appears to be a valid BOLT11 invoice
+ */
+export function isValidBolt11Invoice(invoice: string): boolean {
+ if (!invoice || typeof invoice !== 'string') {
+ return false;
+ }
+
+ const normalized = invoice.toLowerCase().trim();
+
+ // BOLT11 invoices start with 'lnbc' and contain '1' followed by characters (the bech32 separator)
+ // They also need to be long enough to contain the required components
+ return (
+ normalized.startsWith('lnbc') &&
+ /1[a-z0-9]/.test(normalized) &&
+ normalized.length > 20 // Minimum reasonable length for a BOLT11 invoice
+ );
+}
diff --git a/src/lib/exchangeRateService.ts b/src/lib/exchangeRateService.ts
new file mode 100644
index 0000000..ff065b3
--- /dev/null
+++ b/src/lib/exchangeRateService.ts
@@ -0,0 +1,131 @@
+/**
+ * Exchange rate service for fetching BTC/USD rates from Coinbase API
+ */
+export class ExchangeRateService {
+ private static readonly COINBASE_API_URL = "https://api.coinbase.com/v2/exchange-rates";
+ private static readonly CACHE_DURATION_MS = 60000; // 1 minute cache
+
+ private cachedRate: number | null = null;
+ private cacheTimestamp: number = 0;
+
+ /**
+ * Get the current BTC/USD exchange rate from Coinbase API
+ * Uses caching to avoid excessive API calls
+ */
+ async getBtcUsdRate(): Promise {
+ const now = Date.now();
+
+ // Return cached rate if still valid
+ if (this.cachedRate && (now - this.cacheTimestamp) < ExchangeRateService.CACHE_DURATION_MS) {
+ console.debug(`Using cached BTC/USD rate: ${this.cachedRate}`, {
+ cache_age_ms: now - this.cacheTimestamp,
+ });
+ return this.cachedRate;
+ }
+
+ try {
+ console.debug("Fetching BTC/USD rate from Coinbase API");
+
+ const response = await fetch(`${ExchangeRateService.COINBASE_API_URL}?currency=BTC`, {
+ method: "GET",
+ headers: {
+ "Accept": "application/json",
+ "User-Agent": "MKStack/1.0",
+ },
+ // Add timeout to prevent hanging
+ signal: AbortSignal.timeout(10000), // 10 second timeout
+ });
+
+ if (!response.ok) {
+ throw new Error(`Coinbase API error: ${response.status} ${response.statusText}`);
+ }
+
+ const data = await response.json();
+
+ // Validate response structure
+ if (!data?.data?.rates?.USD) {
+ throw new Error("Invalid response format from Coinbase API");
+ }
+
+ const rate = parseFloat(data.data.rates.USD);
+
+ if (isNaN(rate) || rate <= 0) {
+ throw new Error(`Invalid exchange rate received: ${data.data.rates.USD}`);
+ }
+
+ // Update cache
+ this.cachedRate = rate;
+ this.cacheTimestamp = now;
+
+ console.info(`Fetched BTC/USD rate from Coinbase: ${rate}`, { rate });
+
+ return rate;
+ } catch (error) {
+ const errorMessage = error instanceof Error ? error.message : String(error);
+
+ console.error(`Failed to fetch BTC/USD rate: ${errorMessage}`);
+
+ // If we have a cached rate, use it as fallback
+ if (this.cachedRate) {
+ const cacheAge = now - this.cacheTimestamp;
+ console.warn(`Using stale cached rate as fallback: ${this.cachedRate}`, {
+ cache_age_ms: cacheAge,
+ });
+ return this.cachedRate;
+ }
+
+ // If no cached rate available, throw error
+ throw new Error(`Unable to fetch BTC/USD exchange rate: ${errorMessage}`);
+ }
+ }
+
+ /**
+ * Convert BTC amount to USD using current exchange rate
+ */
+ async btcToUsd(btcAmount: number): Promise {
+ const rate = await this.getBtcUsdRate();
+ return btcAmount * rate;
+ }
+
+ /**
+ * Convert USD amount to BTC using current exchange rate
+ */
+ async usdToBtc(usdAmount: number): Promise {
+ const rate = await this.getBtcUsdRate();
+ return usdAmount / rate;
+ }
+
+ /**
+ * Convert sats to USD using current exchange rate
+ */
+ async satsToUsd(sats: number): Promise {
+ const btcAmount = sats / 100000000; // Convert sats to BTC
+ return this.btcToUsd(btcAmount);
+ }
+
+ /**
+ * Clear the cached exchange rate (useful for testing)
+ */
+ clearCache(): void {
+ this.cachedRate = null;
+ this.cacheTimestamp = 0;
+ }
+
+ /**
+ * Get cache status for debugging
+ */
+ getCacheStatus(): { rate: number | null; age_ms: number; is_valid: boolean } {
+ const now = Date.now();
+ const age = now - this.cacheTimestamp;
+ const isValid = this.cachedRate !== null && age < ExchangeRateService.CACHE_DURATION_MS;
+
+ return {
+ rate: this.cachedRate,
+ age_ms: age,
+ is_valid: isValid,
+ };
+ }
+}
+
+// Export a singleton instance
+export const exchangeRateService = new ExchangeRateService();
diff --git a/src/lib/polyfills.ts b/src/lib/polyfills.ts
index 17e7e56..21a4e3b 100644
--- a/src/lib/polyfills.ts
+++ b/src/lib/polyfills.ts
@@ -10,6 +10,15 @@ if (!globalThis.Buffer) {
globalThis.Buffer = Buffer.Buffer;
}
+/**
+ * Polyfill for Buffer in browser environment
+ *
+ * Many Node.js libraries like bitcoinjs-lib expect Buffer to be globally available.
+ * This polyfill makes the buffer package's Buffer available globally.
+ */
+import { Buffer } from 'buffer';
+globalThis.Buffer = Buffer;
+
/**
* Polyfill for AbortSignal.any()
*
diff --git a/src/main.tsx b/src/main.tsx
index e263904..12f0d27 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -7,11 +7,24 @@ import { ErrorBoundary } from '@/components/ErrorBoundary';
import App from './App.tsx';
import './index.css';
-// FIXME: a custom font should be used. Eg:
-// import '@fontsource-variable/';
+// TODO: Add custom font from @fontsource-variable
+// Example: import '@fontsource-variable/';
createRoot(document.getElementById("root")!).render(
);
+
+// Register service worker for PWA
+if ('serviceWorker' in navigator) {
+ window.addEventListener('load', () => {
+ navigator.serviceWorker.register('/sw.js')
+ .then((registration) => {
+ console.log('SW registered: ', registration);
+ })
+ .catch((registrationError) => {
+ console.log('SW registration failed: ', registrationError);
+ });
+ });
+}
\ No newline at end of file
diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx
index 4427de5..2b75063 100644
--- a/src/pages/Index.tsx
+++ b/src/pages/Index.tsx
@@ -1,6 +1,6 @@
import { useSeoMeta } from '@unhead/react';
-// FIXME: Update this page (the content is just a fallback if you fail to update the page)
+// TODO: Customize this index page with specific content
const Index = () => {
useSeoMeta({