42 lines
1.4 KiB
Bash
Executable File
42 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# NIP-46 Remote Signer Bunker Setup
|
|
# Self-contained script to run a test bunker for NOSTR_LOGIN_LITE
|
|
|
|
echo "🔐 Starting NIP-46 Bunker Remote Signer..."
|
|
echo "=============================================="
|
|
|
|
# NIP-46 Keys (Generated with NAK for testing)
|
|
|
|
BUNKER_SECRET_KEY="a33767c3bd05bda47880119d6665b79e6f0eecdf8d025966b0b59a9366379d01"
|
|
BUNKER_PUB_KEY="7566048aa9df5b36428f2ce364797f7ac6f6d4a17ee566f0cd3fefcf35146b90"
|
|
|
|
|
|
|
|
RELAY_URL="wss://relay.laantungir.net"
|
|
# RELAY_URL="wss://nostr.mom"
|
|
|
|
echo "Bunker Configuration:"
|
|
echo " Public Key: $BUNKER_PUB_KEY"
|
|
echo " Relay URL: $RELAY_URL"
|
|
echo " Secret key securely held by bunker process"
|
|
echo ""
|
|
|
|
# Check if nak is installed
|
|
if ! command -v nak &> /dev/null; then
|
|
echo "❌ Error: 'nak' command not found"
|
|
echo "Please install nak from: https://github.com/fiatjaf/nak"
|
|
echo "Or run: go install github.com/fiatjaf/nak@latest"
|
|
exit 1
|
|
fi
|
|
|
|
echo "🚀 Starting bunker daemon..."
|
|
echo "The bunker will display a QR code with the connection URL"
|
|
echo "Copy the bunker:// URL and paste it into the NOSTR_LOGIN_LITE modal"
|
|
echo ""
|
|
echo "Press Ctrl+C to stop the bunker"
|
|
echo "=============================================="
|
|
|
|
# Start the NAK bunker daemon
|
|
# This listens for NIP-46 requests via the relay and handles signing operations
|
|
nak bunker --sec "$BUNKER_SECRET_KEY" --qrcode --verbose "$RELAY_URL" |