Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic Bitcoin Lightning wallet via Breez SDK (#59)
* bump versions to 0.1.0 * npmrc shh * add private spark wallet sdk * initial spark class * singleton * pull in breez service * Enhanced WalletStoreModel with balance tracking and initialization state; added SecureStorageService for improved security. * Refactor WalletStore.ts to use breezService, add TransactionModel, and remove spark dependency. * Refactor WalletStore.ts to remove unused imports and streamline transaction model definitions. * securestorage * shh * breezservice fix type errors * save mnemonic * extract initialize function from walletstore * extract setup * Create file app/models/wallet/actions/types.ts * Refactor `initialize` to use `IWalletStore` interface for better type safety. * extract * Refactor IWalletStore interface: add balance and pending transaction properties, include TransactionModel, and introduce setMnemonic method. * Refactor setup function to use IWalletStore interface for type consistency. * Refactor `restoreWallet` to use `IWalletStore` interface for better type safety and reset balance on wallet restoration. * Added 'types' export and reorganized export order in index.ts for better module structure. * Refactor WalletStore.ts to remove unused imports and streamline the code base. * Refactor `IWalletStore` into `IWalletStoreBase` and `IWalletStore` for clearer separation of base properties and extended functionalities in `types.ts`. * Refactor setup function to use IWalletStoreBase instead of IWalletStore for broader compatibility. * shh * Create file app/models/wallet/actions/fetchBalanceInfo.ts * Create file app/models/wallet/actions/disconnect.ts * Create file app/models/wallet/actions/fetchTransactions.ts * Create file app/models/wallet/actions/sendPayment.ts * Create file app/models/wallet/actions/receivePayment.ts * Add exports for disconnect, balance, transactions, and payment functions to index.ts for expanded module functionality. * Refactor WalletStore.ts: remove unused imports, update properties in WalletStoreModel. * Refactor `types.ts`: Split `IWalletStore` into `IWalletStoreBase` and `IWalletStoreWithTransactions`, add `setError` method, and import `TransactionModel`. * Refactor fetchTransactions to use IWalletStoreWithTransactions for enhanced type safety. * Refactor `sendPayment` to use `IWalletStoreWithTransactions` for enhanced transaction handling. * No changes detected in WalletStore.ts. Commit skipped. * Create file docs/wallet-store.md * Refactor `types.ts`: Replace `IWalletStoreWithTransactions` with `IWalletStoreBalance`, enhancing balance management features. * Refactor fetchBalanceInfo to use IWalletStoreBalance for enhanced type specificity. * Refactor `sendPayment` to improve readability and maintenance by adding explanatory comments. * Refactor WalletStore.ts to organize imports and clean up code structure for better readability. * No changes detected between file revisions. * Added fetchBalanceInfo import in initialize.ts to enhance wallet initialization. * Add `fetchBalanceInfo` import and improve wallet state reset in `restoreWallet` function. * nice * Create file app/models/wallet/views.ts * Add 'views' import to WalletStore.ts to enhance model functionality. * Refactor `views` import to use `createViews` in `WalletStore.ts` for enhanced modularity. * Refactor views.ts to use MST Instance and renamed functions for clarity and type safety. * Create file app/models/wallet/types.ts * Refactor WalletStore.ts by removing unused 'Instance' and 'SnapshotOut' imports to streamline dependencies. * Refactor `views.ts`: Simplify imports, use `WalletStoreType` for type checking, and modify `self` type for clarity and accuracy. * Create file app/types.ts * Refactor `views.ts` to use `WalletStore` from a new path and complete the implementation of `pendingTransactions` view. * Delete app/models/wallet/types.ts * Delete app/models/wallet/actions/types.ts * Create file app/models/wallet/types.ts * Update import path for `WalletStore` in `views.ts` to use local `types` directory. * Delete app/types.ts * testing * Refactor `types.ts`: added `IArrayType` import and replaced `WalletStoreModel` with `TransactionModel` to align with updated data structures. * Add `Instance` import and `IWalletStore` interface to `WalletStore.ts` for enhanced type support. * Refactor fetchTransactions to use IWalletStore and include transaction fee in mapping. * Refactor `restoreWallet`: Add disconnect check for initialized `breezService` before proceeding. * Refactor `IArrayType` to `IAnyModelType` in `types.ts` for broader model compatibility. * Refactor WalletStore.ts: Removed unused 'Instance' import and 'IWalletStore' type, added 'pendingReceiveSat' property to model. * Refactor sendPayment to use IWalletStore and enhance error handling and balance updates. * Refactor WalletStore interfaces in types.ts for clarity and modularization. * Add IWalletStoreProps import to WalletStore.ts for type consistency. * Refactor fetchTransactions to use IWalletStoreProps for enhanced type accuracy. * Refactor `sendPayment` to use `IWalletStoreProps` for enhanced type safety and clarity. * Refactor `IWalletStoreProps` into `IWalletStoreBase` and `IWalletStoreBalance` for clearer separation of concerns. * Refactor WalletStore.ts: Updated import name from IWalletStoreProps to IWalletStore for consistency. * Refactor fetchTransactions to use updated IWalletStore interface for improved type consistency. * Refactor sendPayment to use IWalletStore interface and handle error state by setting it to null. * Refactor `setup.ts` to retrieve mnemonic from secure storage and handle errors, replacing mnemonic generation with error handling. * Refactor fetchBalanceInfo to use updated breezService API and IWalletStore interface for balance details. * Refactor `fetchBalanceInfo` to align property names with `breezService` API changes. * Refactor WalletStore.ts to use destructuring for `Instance` from mobx-state-tree and change `WalletStoreModel` to a non-exported constant. * Updated Wallet Store documentation to clarify the modular architecture and roles of core components. * wallet store hierarchy * nic * initialize * initialize breez sdk store clean * Refactor WalletStore.ts to improve code organization and maintainability. * Refactor fetchTransactions to use setTransactions instead of replace for updating store. * No changes detected in `types.ts`. Commit unnecessary. * fetch balnace info and transactions * Added useNavigation hook to ChatDrawerContent for enhanced navigation handling. * pull in money components etc * initial wallet screen * set isinit * new icon * icons * axe walletsdk for now * Refactor: Import React explicitly in Button.tsx for clarity and consistency. * Refactor Money.tsx by updating enum and type definitions for clarity and consistency. * No changes made to MoneySmall.tsx; verify if commit is necessary. * No changes detected in Money.tsx file; commit unnecessary. * Refactor MoneySmall.tsx: Remove unused imports and optimize component readability. * No changes made to Money.tsx; commit unnecessary. * No changes detected in MoneySmall.tsx. Commit aborted to preserve repository integrity. * No changes detected in Money.tsx. * No changes made to Money.tsx, commit aborted. * Refactor MoneySmall.tsx to remove unused imports and streamline code readability. * No changes detected in Money.tsx file. * No changes detected between the old and new content of MoneySmall.tsx. * Refactor EDenomination enum to type and constant in Money.tsx for improved type safety and flexibility. * denom types * ok * derive nostr keys and save to walletstore * show npub * Added StyleSheet import to ChatDrawerContent for custom styling. * disable send/receive for now * nice * Create file app/chat/drawer/styles.ts * Create file app/chat/drawer/ChatPreview.ts * Create file app/chat/drawer/NewChatButton.tsx * Create file app/chat/drawer/WalletButton.tsx * Create file app/chat/drawer/ChatList.tsx * Create file app/chat/drawer/index.tsx * Delete app/chat/ChatDrawerContent.tsx * Create file app/chat/drawer/ChatDrawerLayout.tsx * Delete app/chat/ChatDrawerContainer.tsx * Refactor `ChatDrawerContent` to use proper typing for `drawerInsets` in `index.tsx`. * chatdrawerlayout * border button * Create file app/chat/drawer/README.md * yarn hierarchy * Create file app/screens/ProfileScreen/ProfileScreen.tsx * Create file app/screens/ProfileScreen/index.ts * Added export for ProfileScreen in index.ts to facilitate module access. * Refactor AppNavigator.tsx to remove unused imports and streamline navigation setup. * Create file app/chat/drawer/ProfileButton.tsx * Add ProfileButton to ChatDrawerContent and update imports in index.tsx. * Refactor WalletButton to use functional component structure for clarity and maintenance. * button * Refactor ProfileButton.tsx to use local styles and MaterialCommunityIcons, improving UI consistency and performance. * onyx profile * shh * hm * Add useState, Pressable, Clipboard, and MaterialCommunityIcons to ProfileScreen; introduce KeyRow component for handling secret keys. * Refactor ProfileScreen: Replace Pressable with TouchableOpacity, update Clipboard import for better modularity. * cool * Create file app/screens/ProfileScreen/KeyRow.tsx * Refactor ProfileScreen.tsx: Removed unused imports, extracted KeyRow component, and integrated useStores for state management. * copied * profilebutton * Create file docs/pro.md * Add authentication section requiring Nostr public key for API requests in `pro.md`. * Create file app/services/aiur/aiur.types.ts * Create file app/services/aiur/aiur.ts * Create file app/services/aiur/index.ts * Create file docs/aiur.md * Updated aiur.md to clarify Aiur's role and its decentralized services. * Add fallback URL to DEFAULT_AIUR_CONFIG in aiur.ts for increased reliability. * Add AIUR_API_URL to ConfigBaseProps and remove GROQ_API_KEY. * Added AIUR_API_URL to config.dev.ts for local AI service integration. * Added AIUR_API_URL to production config for new service integration. * Update DEFAULT_AIUR_CONFIG URL to use localhost in dev environments for Aiur API. * hierarchy * shh * Create file app/navigators/SettingsNavigator.tsx * Create file app/screens/SettingsScreen/AutocoderSettings.tsx * Enhance SettingsScreen with sharing feature, navigation updates, and style adjustments. * Add SettingsNavigator import to AppNavigator for enhanced settings navigation. * Delete app/screens/SettingsScreen/coder/RepoSettings.tsx * Create file app/screens/SettingsScreen/styles.ts * Refactor SettingsScreen to use local styles import. * Refactor styles.ts to include typography, update button and container styles, and adjust color scheme for improved UI consistency. * Refactor SettingsScreen: remove unused 'colors' import and update share message. * Create file app/screens/ShareScreen/ShareScreen.tsx * Added ShareScreen to SettingsNavigator and updated SettingsStackParamList. * Refactor SettingsScreen: remove unused Share import and update UI to navigate to ShareScreen on button press. * padding * Added Ionicons and colorsDark to SettingsScreen for enhanced UI elements. * Refactor ShareScreen to use MobX, add KeyboardAvoidingView, ScrollView, and Button components for enhanced functionality and interactivity. * hierarchy * Add TextInput import and extend styles in ShareScreen.tsx for enhanced text input functionality. * Refactor ShareRequest and Share interfaces to include messages and metadata, replacing previous fields to support enhanced sharing features. * Refactor ShareScreen.tsx to improve readability and maintainability. * Refactor AiurApi class to improve code organization and readability. * hm * nice * red * sharescreen * android fix fonts * Create file scripts/deepseek_test_fixer.sh * pull in wallet screens * tsc 8 * hm * update hierarchy * Refactor: Cleaned up imports and removed unused `useNavigation` in `BackupWalletScreen.tsx`. * Add TextStyle import in ReceiveScreen.tsx for enhanced styling options. * Refactor WalletStore.ts to streamline imports and remove unused variables for improved clarity and maintainability. * Added TextStyle import to RestoreWalletScreen for enhanced text styling. * Refactor AppNavigator.tsx to use relative imports for better maintainability and consistency. * Refactor WalletScreen.tsx: Remove unused imports and useEffect, streamline component. * Create file app/navigators/WalletNavigator.tsx * Refactor AppNavigator.tsx to improve import efficiency by consolidating navigation utilities. * Refactor WalletScreen to use typed navigation props from WalletNavigator. * Refactor SendScreen to use NativeStackScreenProps and simplify imports and components. * Refactor ReceiveScreen to use NativeStackScreenProps for improved type safety and navigation consistency. * Refactor BackupWalletScreen to use NativeStackScreenProps for navigation type safety. * Refactor RestoreWalletScreen to use NativeStackScreenProps for improved type safety and navigation handling. * Refactor SendScreen.tsx to include useState, additional imports, and useStores hook for enhanced functionality. * Refactor RestoreWalletScreen to improve readability and maintenance by reorganizing imports and interfaces. * No changes detected in BackupWalletScreen.tsx. * Refactor ReceiveScreen.tsx for code clarity and maintainability. * sendreceive nav * backup wallet * backuprestore * cool * Refactor BackupWalletScreen to improve code readability and maintainability. * Create file app/services/notifications/index.ts * No changes detected in app.tsx; commit unnecessary. * No changes detected between old and new content of app.config.ts. * Create file app/hooks/useNotifications.ts * npx expo install expo-notifications expo-device expo-constants * axe gemini key shaz * No changes detected; commit skipped. * No changes detected in app.config.ts; commit unnecessary. * Added `sendPushNotification` function to handle sending push notifications in `index.ts`. * Refactor useNotifications hook to manage state with useState and update listener types for improved handling of Expo notifications. * hierarchy * Create file app/screens/SettingsScreen/NotificationsScreen.tsx * Added NotificationsScreen to SettingsNavigator and updated SettingsStackParamList. * Refactored SettingsScreen to enhance readability and maintainability. * ok * hierarchy * Create file app/models/user/UserStore.ts * Added UserStoreModel to RootStore for enhanced user management. * Added useStores import to NotificationsScreen for state management integration. * Added KeyRow import to NotificationsScreen for enhanced user settings management. * invoice only --------- Co-authored-by: GitHub API <[email protected]>
- Loading branch information