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,25 @@
#!/bin/bash
# Simple seed restoration
MASTER_KEY="$1"
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
WALLET_NAME="seed_restore_${TIMESTAMP}"
echo "Creating wallet: $WALLET_NAME"
echo "Master key: $MASTER_KEY"
curl -s -u "rinrpc:745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90" \
-H "Content-Type: application/json" \
-d "{\"jsonrpc\": \"2.0\", \"id\": \"createwallet\", \"method\": \"createwallet\", \"params\": [\"$WALLET_NAME\", false, true, \"\", false, false, true]}" \
"http://localhost:9556"
echo ""
echo "Setting seed..."
curl -s -u "rinrpc:745ce784d5d537fc06105a1b935b7657903cfc71a5fb3b90" \
-H "Content-Type: application/json" \
-d "{\"jsonrpc\": \"2.0\", \"id\": \"sethdseed\", \"method\": \"sethdseed\", \"params\": [true, \"$MASTER_KEY\"]}" \
"http://localhost:9556/wallet/$WALLET_NAME"
echo ""
echo "Done! Wallet name: $WALLET_NAME"