Backup & Restore
Phantom-WG provides the ability to back up databases containing
user-portable values and exports them into a portable .tar archive. The archive
consists of three files:
Manifest
Export
Import
Preview
Before import, manifest data is displayed to the user:
Validation Layers
The backup file goes through two-stage validation before reaching the daemon — first on the SPA side, then on the daemon side:
Browser-Side Validation (SPA)
|
Check
|
Rule
|
|---|---|
| Extension | .tar |
| Size | Max 64 MB |
| Tar structure | wallet.db, exit.db, manifest.json present |
| Manifest | Valid JSON, version: "1.0" |
Server-Side Validation (Daemon)
|
Check
|
Rule
|
|---|---|
| Tar whitelist |
Only wallet.db, exit.db, manifest.json — extra
files are rejected
|
| Path traversal | Paths like ../../ are blocked |
| Manifest version | Invalid version is rejected |
| PRAGMA integrity_check | Integrity check for both databases |
| Schema validation | Required tables and columns are verified |