#!/usr/bin/env bash
# Hyper-Wallet Backup Script
# Displays mnemonics for secure paper backup
set -e
echo "╔════════════════════════════════════════════════════════════════════╗"
echo "║ HYPER-WALLET BACKUP PROCEDURE ║"
echo "╚════════════════════════════════════════════════════════════════════╝"
echo ""
echo "⚠️ CRITICAL: Write these down on PAPER and store securely!"
echo "⚠️ If you lose these mnemonics, your wallet is UNRECOVERABLE."
echo ""
echo "Press Enter to continue (Ctrl+C to cancel)..."
read
echo ""
echo "════════════════════════════════════════════════════════════════════"
echo " IDENTITY MNEMONIC (24 words) - Device Access"
echo "════════════════════════════════════════════════════════════════════"
echo ""
if [ -f ~/.hyper-wallet/.mnemonic ]; then
cat ~/.hyper-wallet/.mnemonic
echo ""
else
echo "❌ Identity mnemonic not found!"
exit 1
fi
echo ""
echo "════════════════════════════════════════════════════════════════════"
echo " WALLET MNEMONIC (12 words) - ALL Cryptocurrency Keys"
echo " (Bitcoin, Ethereum, and all other chains)"
echo "════════════════════════════════════════════════════════════════════"
echo ""
if [ -f ~/.hyper-wallet/.wallet-mnemonic ]; then
cat ~/.hyper-wallet/.wallet-mnemonic
echo ""
else
echo "❌ Wallet mnemonic not found!"
exit 1
fi
echo ""
echo "════════════════════════════════════════════════════════════════════"
echo " CURRENT ADDRESSES (for verification after recovery)"
echo "════════════════════════════════════════════════════════════════════"
echo ""
echo "testnet-bitcoin:"
echo " tb1qfej77dh7cnxj3zxpxlj0hksxhjgpfyg7ajgvvd"
echo " Path: m/84'/1'/0'/0/0"
echo ""
echo "testnet-ethereum:"
echo " 0xB91cc8b6803f55c2e1D2B56623790615C9951340"
echo " Path: m/44'/60'/0'/0/0"
echo ""
echo "════════════════════════════════════════════════════════════════════"
echo ""
echo "✅ BACKUP CHECKLIST:"
echo ""
echo " [ ] Write IDENTITY mnemonic (24 words) on paper"
echo " [ ] Write WALLET mnemonic (12 words) on paper - covers ALL chains"
echo " [ ] Verify both by reading back (no mistakes)"
echo " [ ] Verify addresses match (Bitcoin AND Ethereum)"
echo " [ ] Store in secure location (safe, safety deposit box)"
echo " [ ] Test recovery on different device (optional but recommended)"
echo ""
echo "════════════════════════════════════════════════════════════════════"
echo ""
echo "⚠️ NEVER:"
echo " - Email these mnemonics to yourself"
echo " - Store in plain text files"
echo " - Take screenshots"
echo " - Share with anyone (even support)"
echo " - Type into untrusted websites"
echo ""
echo "See BACKUP_PROCEDURE.md for detailed instructions."
echo ""