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