Complete LnbitsAPI migration to dependency injection pattern

- Convert LnbitsAPI from singleton to BaseService extension
- Add LNBITS_API service token to DI container
- Register LnbitsAPI service in base module with proper initialization order
- Update AuthService to depend on injected LnbitsAPI instead of singleton
- Fix BaseService to properly track LnbitsAPI dependency in getMissingDependencies
- Update events API functions to use dependency injection
- Resolve initialization timing issue preventing application startup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
padreug 2025-09-07 01:58:36 +02:00
parent 093846b351
commit 4a3d2012be
6 changed files with 69 additions and 18 deletions

View file

@ -140,6 +140,9 @@ export const SERVICE_TOKENS = {
// Nostrmarket services
NOSTRMARKET_SERVICE: Symbol('nostrmarketService'),
// API services
LNBITS_API: Symbol('lnbitsAPI'),
} as const
// Type-safe injection helpers