#!/bin/bash
# Test script for device attestation on ashatron.local
# This will backup existing data and start fresh
set -e
echo "🧪 Testing Device Attestation on ashatron.local"
echo ""
# Backup existing data
if [ -d ~/.hyper-wallet ]; then
BACKUP_DIR=~/.hyper-wallet-backup-$(date +%s)
echo "📦 Backing up existing data to: $BACKUP_DIR"
mv ~/.hyper-wallet "$BACKUP_DIR"
echo " ✅ Backup complete"
echo ""
fi
# Start wallet server
echo "🚀 Starting wallet server..."
echo " Server will run on: http://ashatron.local:4004"
echo " Network access: http://$(hostname -I | awk '{print $1}'):4004"
echo ""
echo "📱 Open the web UI and you should see the setup wizard!"
echo ""
echo "To restore your backup later:"
echo " rm -rf ~/.hyper-wallet"
echo " mv $BACKUP_DIR ~/.hyper-wallet"
echo ""
# Run server
cd /storage/projects/code/hypercore-kb/hyper-fleeky/hyper-wallet
bare wallet-server.cjs