fix wallet load/dump/list

This commit is contained in:
Dobromir Popov
2025-09-29 23:16:06 +03:00
parent dc8f69c5c3
commit e272755015
7 changed files with 352 additions and 40 deletions

View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Script to load the main wallet
# Usage: ./load_main_wallet.sh
RPC_USER="rinrpc"
RPC_PASSWORD="745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90"
RPC_HOST="localhost"
RPC_PORT="9556"
echo "Loading main wallet..."
LOAD_RESPONSE=$(curl -s -u "$RPC_USER:$RPC_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": "loadwallet", "method": "loadwallet", "params": ["main"]}' \
"http://$RPC_HOST:$RPC_PORT")
echo "Response: $LOAD_RESPONSE"
if echo "$LOAD_RESPONSE" | grep -q '"error":null'; then
echo "✓ Main wallet loaded successfully"
elif echo "$LOAD_RESPONSE" | grep -q "already loaded"; then
echo "✓ Main wallet is already loaded"
else
echo "Failed to load main wallet"
fi