/api/system/decrypt_existing_files
POSTThe reverse of encrypt_existing_files: rewrite every encrypted (Type 10, 612-byte) coin file back to plaintext (Type 9, 439-byte). Returns a task_id immediately; the caller polls /api/system/tasks.
The endpoint is registered and its contract (below) is final, but the current build returns 501 Not Implemented: decryption arrives together with Type 10 file-format support. GUIs should treat 501 from this endpoint as "feature not available yet".
Description
Requires a loaded, RAIDA-verified password (/api/system/load-password). Per file: a Type 10 file is decrypted in memory and rewritten atomically as plaintext Type 9; plaintext files are skipped. After a successful run the wallet contains no encrypted files, and the next start of the core will not prompt for a password. Decrypted coins stay decrypted until the user chooses to encrypt again.
The operation is idempotent and resumable: if a run is interrupted, encryption-status reports a mixed state and running this endpoint again finishes the job ("Finish Decrypting" in the GUI).
After decryption, anyone with access to the disk can read the coins' authenticity numbers. The GUI should warn the user before starting.
Parameters
Both parameters are optional and mirror encrypt_existing_files: wallet_path (default: all registered wallets) and folders (default: all wallet coin folders).
Response
Kickoff — 200 OK
{
"command": "decrypt-existing-files",
"success": true,
"task_id": "Jul-30-26_02-10-14-pm-a9b6",
"url": "http://localhost:8080/api/system/tasks?task_id=Jul-30-26_02-10-14-pm-a9b6",
"message": "Decryption started — poll /api/system/tasks for status"
}
Task result counts
{
"counts": {
"processed": 45,
"decrypted": 45,
"skipped": 0,
"errors": 0
}
}
| Field | Description |
|---|---|
processed | Number of .bin files visited. |
decrypted | Number physically rewritten Type 10 → plaintext Type 9. |
skipped | Number left untouched (already plaintext, or unexpected multi-coin files). |
errors | Number that failed to read or rewrite. Each error is logged to main.log. |
Error Responses
501 — Not implemented (current build)
{
"error": true,
"message": "Not implemented: file decryption arrives with the Type 10 format. This endpoint returns when the Type 10 reader lands.",
"code": 501
}
400 — No verified password loaded (once implemented)
Decryption requires the correct password verified via RAIDA. Call /api/system/load-password first.
Related Endpoints
- /api/system/encrypt_existing_files — The forward direction.
- /api/system/encryption-status — Detects encrypted/decrypted/mixed state.
- /api/system/load-password — Required prerequisite.
- /api/system/tasks — Generic task polling endpoint.