**Motivations:**
- Provide a dedicated interface for managing Nostr keys
- Allow users to view public keys (npub and hex)
- Enable importing private keys via URL or text format
- Respect the existing two-level encryption system
**Root causes:**
- No dedicated interface for key management
- Users need to view their public keys easily
- Users need to import keys in various formats (nsec URL, nsec text, hex)
**Correctifs:**
- None (new feature)
**Evolutions:**
- Created KeyManagementManager component for key management
- Added public key display (npub and hex formats)
- Implemented private key import with support for:
- nostr:// URLs with nsec
- nsec text format (nsec1...)
- hex format (64 characters)
- Automatic key extraction from URLs
- Account replacement warning and confirmation
- Recovery phrase display after import
- Individual copy buttons for each key format
- Integration in settings page
**Pages affectées:**
- components/KeyManagementManager.tsx (new)
- pages/settings.tsx (modified)
- features/key-management-configuration.md (new)
**Motivations:**
- Corriger l'erreur 404 pour favicon.ico demandé par les navigateurs
- Corriger l'erreur 500 de l'API NIP-95 upload empêchant les uploads de fichiers
**Root causes:**
- Fichier favicon.ico manquant dans public/ causant des erreurs 404 répétées
- Incompatibilité entre form-data (npm) et fetch() natif de Node.js dans l'API NIP-95
**Correctifs:**
- Ajout de favicon.svg et mise à jour des références dans les pages
- Remplacement de fetch() par https/http natifs de Node.js dans nip95-upload.ts
- Amélioration de la gestion des erreurs et nettoyage des fichiers temporaires
**Evolutions:**
- Documentation des problèmes et solutions dans fixKnowledge/
**Pages affectées:**
- components/HomeView.tsx
- pages/docs.tsx
- pages/presentation.tsx
- pages/api/nip95-upload.ts
- features/account-creation-buttons-separation.md
- fixKnowledge/favicon-404-error.md (nouveau)
- fixKnowledge/nip95-upload-500-error.md (nouveau)
- public/favicon.svg (nouveau)
**Motivations:**
- Improve UI clarity by displaying two distinct buttons instead of one combined button
- Reduce the number of clicks needed to access the import functionality
- Allow users to directly choose their desired action without an intermediate step
**Evolutions:**
- Added optional 'initialStep' prop to CreateAccountModal to initialize modal at 'import' or 'choose' step
- Refactored NoAccountView to display two separate buttons: 'Générer un nouveau compte' and 'Importer une clé existante'
- Extracted buttons into separate NoAccountActionButtons component to respect function line limit
- Removed unused 'connected' parameter from AuthorPresentationFormView
**Pages affectées:**
- components/CreateAccountModal.tsx
- components/AuthorPresentationEditor.tsx
- features/account-creation-buttons-separation.md
- Remove nos2x and NostrConnect support
- Create new NostrAuthService using Alby (window.nostr NIP-07)
- Replace useNostrConnect with useNostrAuth in all components
- Update NostrRemoteSigner to use Alby for signing
- Delete NostrConnect-related files (nostrconnect.ts, handlers, etc.)
- Update documentation to reflect Alby-only authentication
- Remove NOSTRCONNECT_BRIDGE environment variable
- All TypeScript checks pass
- Update NostrConnectService to use nos2x (window.nostr) by default
- Fallback to NostrConnect bridge only if nos2x is not available
- Update NostrRemoteSigner to use window.nostr.signEvent() for signing
- Add TypeScript definitions for NIP-07 window.nostr API
- Update documentation to reflect nos2x as primary authentication method
- Remove default use.nsec.app bridge URL
- All TypeScript checks pass
- Fix unused function warnings by renaming to _unusedExtractTags
- Fix type errors in nostrTagSystem.ts for includes() calls
- Fix type errors in reviews.ts for filter kinds array
- Fix ArrayBuffer type errors in articleEncryption.ts
- Remove unused imports (DecryptionKey, decryptArticleContent, extractTagsFromEvent)
- All TypeScript checks now pass without disabling any controls
- Intégration mempool.space pour vérification transactions Bitcoin :
- Service MempoolSpaceService avec API mempool.space
- Vérification sorties et montants pour sponsoring
- Vérification confirmations
- Attente confirmation avec polling
- Récupération adresses Lightning depuis profils Nostr :
- Service LightningAddressService
- Support lud16 et lud06 (NIP-19)
- Cache avec TTL 1 heure
- Intégré dans paymentPolling et reviewReward
- Mise à jour événements Nostr pour avis rémunérés :
- Publication événement avec tags rewarded et reward_amount
- Parsing tags dans parseReviewFromEvent
- Vérification doublons
- Tracking sponsoring sur Nostr :
- Service SponsoringTrackingService
- Événements avec commissions et confirmations
- Intégration vérification mempool.space
Toutes les fonctionnalités de split sont maintenant opérationnelles.
Seuls les transferts Lightning réels nécessitent un nœud Lightning.
- Split pour sponsoring (Bitcoin mainnet) :
- Service SponsoringPaymentService avec calcul split (0.042/0.004 BTC)
- Validation montants et adresses Bitcoin
- Structure pour vérification transactions
- Split pour avis (Lightning) :
- Service ReviewRewardService avec commission (49/21 sats)
- Création invoice avec split
- Transfert automatique reviewer portion
- Mise à jour avis avec tag rewarded
- Système transfert automatique :
- Service AutomaticTransferService
- Transfert auteur portion après paiement article
- Transfert reviewer portion après rémunération avis
- Tracking et logs structurés
- Intégration dans paymentPolling pour articles
- Documentation complète du système
Les services sont prêts pour intégration avec nœud Lightning et services blockchain.
- Création lib/platformCommissions.ts : configuration centralisée des commissions
- Articles : 800 sats (700 auteur, 100 plateforme)
- Avis : 70 sats (49 lecteur, 21 plateforme)
- Sponsoring : 0.046 BTC (0.042 auteur, 0.004 plateforme)
- Validation des montants à chaque étape :
- Publication : vérification du montant avant publication
- Paiement : vérification du montant avant acceptation
- Erreurs explicites si montant incorrect
- Tracking des commissions sur Nostr :
- Tags author_amount et platform_commission dans événements
- Interface ContentDeliveryTracking étendue
- Traçabilité complète pour audit
- Logs structurés avec informations de commission
- Documentation complète du système
Les commissions sont maintenant systématiques, validées et traçables.