<!-- ghit#filepath: ../issues/roadmap/learnault-api/PHASE-1.md --> ## Description Add wallet and managed-key-reference models without storing plaintext Stellar secrets. ## File Location `learnault-api/prisma/schema.prisma`, wallet migration/types, KMS interface, and tests ## Design Reference API Roadmap Phase 1: Add Custodial Wallet Persistence and KMS References. ## Dependencies - **Status:** Blocked - **Blocked by:** #64; #65; #66 - **Blocks:** #90; #92 ## Tasks - [ ] Add wallet user, network, custody, public key, status, and timestamps - [ ] Add opaque managed-key/envelope metadata only - [ ] Enforce intended wallet and public-key uniqueness - [ ] Define provisioning, active, failed, export, migrated, and disabled transitions - [ ] Add KMS interface and fake - [ ] Test migration, uniqueness, transitions, redaction, and lifecycle ## Acceptance Criteria - Schema/DTO cannot store plaintext secret - Uniqueness and transitions are enforced - KMS references never enter ordinary responses - Tests pass ## Verification Evidence - [ ] Attach schema threat review, migration, and secret-redaction tests ## Difficulty Advanced
Description
Add wallet and managed-key-reference models without storing plaintext Stellar secrets.
File Location
learnault-api/prisma/schema.prisma, wallet migration/types, KMS interface, and testsDesign Reference
API Roadmap Phase 1: Add Custodial Wallet Persistence and KMS References.
Dependencies
Tasks
Acceptance Criteria
Verification Evidence
Difficulty
Advanced