mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-10 00:09:04 +00:00
Add nostr backup constants and manifest models
This commit is contained in:
26
src/nostr/backup_models.py
Normal file
26
src/nostr/backup_models.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Optional
|
||||
|
||||
# Event kind constants used for SeedPass backups
|
||||
KIND_MANIFEST = 30070
|
||||
KIND_SNAPSHOT_CHUNK = 30071
|
||||
KIND_DELTA = 30072
|
||||
|
||||
|
||||
@dataclass
|
||||
class ChunkMeta:
|
||||
"""Metadata for an individual snapshot chunk."""
|
||||
|
||||
id: str
|
||||
size: int
|
||||
hash: str
|
||||
|
||||
|
||||
@dataclass
|
||||
class Manifest:
|
||||
"""Structure of the backup manifest JSON."""
|
||||
|
||||
ver: int
|
||||
algo: str
|
||||
chunks: List[ChunkMeta]
|
||||
delta_since: Optional[str] = None
|
Reference in New Issue
Block a user