/api/system/logout

GET

Disable wallet encryption and clear the encryption key from memory, returning to unencrypted RAIDA communications.

Description

The /api/system/logout endpoint disables wallet encryption and removes the encryption key from memory. After calling this endpoint, all RAIDA communications will be sent in plaintext (unencrypted) mode.

This endpoint is useful when:

  • Troubleshooting encryption-related issues
  • Switching between encrypted and unencrypted modes for testing
  • Removing encryption before transferring wallet to another system
  • Resolving encryption key conflicts or corruption
⚠️ Security Impact

Important: Disabling encryption means your RAIDA requests will be transmitted without encryption. This reduces security but may improve performance or compatibility in certain scenarios.

  • Network Exposure: CloudCoin operations will be visible to network observers
  • RAIDA Requests: All authentication numbers will be transmitted in plaintext
  • Reversible: You can re-enable encryption at any time using /api/system/login
💡 When to Disable Encryption

Consider disabling encryption if:

  • You're experiencing connection issues with encrypted RAIDA requests
  • You're debugging RAIDA communication problems
  • Your encryption key structure is corrupted or fractured
  • You need maximum performance and security is not a concern in your environment

Parameters

This endpoint does not require any parameters.

Response

Success Response (200 OK)

Returns confirmation that encryption has been disabled and cleared.

JSON Response
{
  "status": "success",
  "message": "Wallet encryption cleared",
  "encryption_active": false,
  "key_set": false
}

Response Fields

Field Type Description
status string Operation result - "success" or "error"
message string Human-readable description of the result
encryption_active boolean Always false after clearing encryption
key_set boolean Always false indicating no encryption key is configured

Example Usage

curl "http://localhost:8080/api/system/logout"
fetch('http://localhost:8080/api/system/logout')
  .then(response => response.json())
  .then(data => {
    console.log('Encryption cleared:', data);
    console.log('Encryption is now:', data.encryption_active ? 'enabled' : 'disabled');
  })
  .catch(error => console.error('Error:', error));
import requests

url = 'http://localhost:8080/api/system/logout'

response = requests.get(url)
data = response.json()

print(f"Status: {data['status']}")
print(f"Message: {data['message']}")
print(f"Encryption active: {data['encryption_active']}")

Use Cases

1. Troubleshooting Encryption Issues

If you're experiencing problems with encrypted RAIDA operations, clearing encryption can help diagnose whether the issue is encryption-related:

# Clear encryption
curl "http://localhost:8080/api/system/logout"

# Test RAIDA connectivity without encryption
curl "http://localhost:8080/api/program/echo"

# If successful, re-enable encryption with a new key
curl "http://localhost:8080/api/system/login?key=NEW_KEY_HERE"

2. Switching Encryption Keys

To change your encryption key, first clear the existing key, then set a new one:

// Step 1: Clear existing encryption
await fetch('http://localhost:8080/api/system/logout');

// Step 2: Set new encryption key
const newKey = 'your_new_32_character_hex_key_here';
await fetch(`http://localhost:8080/api/system/login?key=${newKey}`);

Related Endpoints