/api/system/encryption-status
GETLightweight probe used by clients to decide whether to prompt the user for a login password.
Description
Reports two facts about the running server:
- key_set — Is a password loaded this session? (Has /api/system/load-password already been called and is the derived key still in memory?)
- encrypted_files_exist — Are there any
.binfiles in the registered wallets' Bank or Fracked folders whose on-disk header marks them as encrypted?
From those two facts the server derives login_required: true if encrypted files exist AND no key is set (the user must supply the password before any encrypted-coin operation can succeed). The client can branch on login_required instead of running its own scan.
File encryption is being rebuilt on the Type 10 format (encrypted files are exactly 612 bytes; plaintext Type 9 files are 439 bytes). In the current build, encrypted_files_exist: true can only mean leftover files from the removed legacy scheme — they are unsupported and should be restored from a plaintext backup. Once Type 10 lands, this endpoint will additionally report a state of encrypted, decrypted, or mixed (mixed = an interrupted encrypt/decrypt run that should be finished by re-running the same endpoint).
This endpoint is the recommended first call for a fresh client. It tells you whether the user even needs a password prompt — many users will see encrypted_files_exist: false and can skip the login step entirely.
Parameters
None.
Response
Success — 200 OK
{
"command": "encryption-status",
"success": true,
"key_set": false,
"encrypted_files_exist": false,
"login_required": false
}
{
"command": "encryption-status",
"success": true,
"key_set": false,
"encrypted_files_exist": true,
"login_required": true
}
{
"command": "encryption-status",
"success": true,
"key_set": true,
"encrypted_files_exist": true,
"login_required": false
}
Response Fields
| Field | Type | Description |
|---|---|---|
key_set | bool | true if a derived encryption key is currently held in memory (someone has logged in and not logged out). |
encrypted_files_exist | bool | true if at least one .bin file in any registered wallet's Bank or Fracked folder has encryption_type != 0 in its header. |
login_required | bool | Convenience: encrypted_files_exist && !key_set. Branch on this in the client. |
Decision table for clients
| key_set | encrypted_files_exist | login_required | What the client should do |
|---|---|---|---|
| false | false | false | No password is needed. The wallet is decrypted (no .bin files also counts as decrypted). The user MAY encrypt via the Security menu. |
| false | true | true | Prompt for password (before the dashboard appears) and POST to /api/system/load-password. |
| true | any | false | Password already loaded this session. Proceed. |
Example Usage
curl "http://localhost:8080/api/system/encryption-status"
const res = await fetch('http://localhost:8080/api/system/encryption-status');
const s = await res.json();
if (s.login_required) {
// show password prompt, then POST /api/system/load-password
} else if (!s.key_set && !s.encrypted_files_exist) {
// optional: ask the user if they want to set a password now
}
import requests
s = requests.get('http://localhost:8080/api/system/encryption-status').json()
print(s)
# {'command': 'encryption-status', 'success': True,
# 'key_set': False, 'encrypted_files_exist': True, 'login_required': True}
Related Endpoints
- /api/system/load-password — Load the password into RAM.
- /api/system/shutdown — Delete the password from RAM and shut the core down (log out).
- /api/system/encrypt_existing_files — Encrypt all plaintext coin files.
- /api/system/decrypt_existing_files — Decrypt all encrypted coin files.
- /api/recovery/status — Different concern (boot-time deposit/upgrade recovery), but commonly polled at the same time.