Skip to content

[FRONTEND]: Backup and recovery system missing in ZHTP node #4

@umwelt

Description

@umwelt

Problem

The API client expects complete backup/recovery endpoints that don't exist in the ZHTP node.

Missing Endpoints (CRITICAL)

  1. POST /api/v1/identity/backup/export - Export encrypted backup
  2. POST /api/v1/identity/backup/import - Import backup file
  3. POST /api/v1/identity/backup/verify - Verify backup integrity
  4. POST /api/v1/identity/seed/verify - Verify seed phrase
  5. GET /api/v1/identity/{id}/seeds - Export seed phrases
  6. POST /api/v1/identity/restore/seed - Restore identity from seed phrase
  7. POST /api/v1/identity/recover/{method} - Generic recovery endpoint

Current Node Implementation

  • NONE - Backup/recovery subsystem entirely missing

Impact

  • BLOCKING ALPHA - Users cannot recover accounts
  • No seed phrase backup/restore
  • No encrypted backup files
  • No account recovery mechanism
  • Critical security/UX issue

Expected Behavior

POST /api/v1/identity/backup/export

  • Request: { identity_id: string, password: string }
  • Response: BackupData object with encrypted backup
  • Should create encrypted backup file

POST /api/v1/identity/backup/import

  • Request: { backup_data: string, password: string }
  • Response: Identity object
  • Should restore from encrypted backup

POST /api/v1/identity/seed/verify

  • Request: { identity_id: string, seed_phrase: string }
  • Response: SeedVerification with valid boolean
  • Should verify seed phrase matches identity

GET /api/v1/identity/{id}/seeds

  • Response: SeedPhrases object with all wallet seeds
  • Should return primary, ubi, savings wallet seed phrases

Implementation Location

ZHTP Node: zhtp/src/api/handlers/identity/mod.rs

Priority

CRITICAL - Must be implemented for alpha release

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions