fix wallet load/dump/list
This commit is contained in:
27
rin/wallet/cmd/load_main_wallet.sh
Normal file
27
rin/wallet/cmd/load_main_wallet.sh
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user