wip walet restore/list/ debug restore

This commit is contained in:
Dobromir Popov
2025-09-29 23:54:32 +03:00
parent 0d34b69fb4
commit fca9d8a8a3
8 changed files with 284 additions and 35 deletions

View File

@@ -46,11 +46,11 @@ echo "Backup file copied to: $DAEMON_BACKUP_FILE"
echo "Creating new wallet and importing keys..."
# Create a new wallet to avoid conflicts
CREATE_RESPONSE=$(curl -s -u "$RPC_USER:$RPC_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": "createwallet", "method": "createwallet", "params": ["'$NEW_WALLET_NAME'", false, false, "", false, false, true]}' \
"http://$RPC_HOST:$RPC_PORT")
# Create a new wallet to avoid conflicts (match original wallet settings)
CREATE_RESPONSE=$(curl -s -u "$RPC_USER:$RPC_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": "createwallet", "method": "createwallet", "params": ["'$NEW_WALLET_NAME'", false, true, "", false, false, true]}' \
"http://$RPC_HOST:$RPC_PORT")
if echo "$CREATE_RESPONSE" | grep -q '"error":null'; then
echo "✓ New wallet '$NEW_WALLET_NAME' created successfully"