Files
plebeian-signer/projects/common/src/public-api.ts
woikos d98a0ef76e Implement DDD refactoring phases 1-4 with domain layer and ubiquitous language
Phase 1-3: Domain Layer Foundation
- Add value objects: IdentityId, PermissionId, RelayId, WalletId, Nickname, NostrKeyPair
- Add rich domain entities: Identity, Permission, Relay with behavior
- Add domain events: IdentityCreated, IdentityRenamed, IdentitySelected, etc.
- Add repository interfaces for Identity, Permission, Relay
- Add infrastructure layer with repository implementations
- Add EncryptionService abstraction

Phase 4: Ubiquitous Language Cleanup
- Rename BrowserSyncData → EncryptedVault (encrypted vault storage)
- Rename BrowserSessionData → VaultSession (decrypted session state)
- Rename SignerMetaData → ExtensionSettings (extension configuration)
- Rename Identity_ENCRYPTED → StoredIdentity (storage DTO)
- Rename Identity_DECRYPTED → IdentityData (session DTO)
- Similar renames for Permission, Relay, NwcConnection, CashuMint
- Add backwards compatibility aliases with @deprecated markers

Test Coverage
- Add comprehensive tests for all value objects
- Add tests for domain entities and their behavior
- Add tests for domain events
- Fix PermissionChecker to prioritize kind-specific rules over blanket rules
- Fix pre-existing component test issues (IconButton, Pubkey)

All 113 tests pass. Both Chrome and Firefox builds succeed.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 05:21:44 +01:00

60 lines
2.2 KiB
TypeScript

/*
* Public API Surface of common
*/
// Domain (DDD Value Objects & Repository Interfaces)
export * from './lib/domain';
// Infrastructure (Encryption & Repository Implementations)
export * from './lib/infrastructure';
// Common
export * from './lib/common/nav-component';
// Constants
export * from './lib/constants/fallback-relays';
export * from './lib/constants/event-kinds';
// Helpers
export * from './lib/helpers/crypto-helper';
export * from './lib/helpers/argon2-crypto';
export * from './lib/helpers/nostr-helper';
export * from './lib/helpers/text-helper';
export * from './lib/helpers/date-helper';
export * from './lib/helpers/websocket-auth';
export * from './lib/helpers/nip05-validator';
// Models
export * from './lib/models/nostr';
export * from './lib/models/webln';
// Services (and related)
export * from './lib/services/storage/storage.service';
export * from './lib/services/storage/types';
export * from './lib/services/storage/browser-sync-handler';
export * from './lib/services/storage/browser-session-handler';
export * from './lib/services/storage/signer-meta-handler';
export * from './lib/services/storage/related/nwc';
export * from './lib/services/storage/related/cashu';
export * from './lib/services/nwc/nwc.service';
export * from './lib/services/nwc/nwc-client';
export * from './lib/services/nwc/types';
export * from './lib/services/cashu/cashu.service';
export * from './lib/services/cashu/types';
export * from './lib/services/logger/logger.service';
export * from './lib/services/startup/startup.service';
export * from './lib/services/profile-metadata/profile-metadata.service';
export * from './lib/services/relay-list/relay-list.service';
// Components
export * from './lib/components/icon-button/icon-button.component';
export * from './lib/components/confirm/confirm.component';
export * from './lib/components/toast/toast.component';
export * from './lib/components/nav-item/nav-item.component';
export * from './lib/components/pubkey/pubkey.component';
export * from './lib/components/relay-rw/relay-rw.component';
export * from './lib/components/deriving-modal/deriving-modal.component';
// Pipes
export * from './lib/pipes/visual-relay.pipe';
export * from './lib/pipes/visual-nip05.pipe';