A hardware Nostr remote signer implementing NIP-46 (Nostr Connect) protocol for secure event signing
This is a hardware-based Nostr remote signer built for the Guition JC3248W535 3.5" ESP32-S3 development board with touch screen display. The device implements the NIP-46 (Nostr Connect) protocol to provide secure remote signing services for Nostr events while keeping private keys isolated on the hardware device.
- NIP-46 Remote Signer: Secure implementation of Nostr Connect protocol
- Touch Screen Interface: 320x480 color touchscreen for user interaction
- Hardware Key Storage: Private keys stored securely on device
- Client Authorization: Manual approval system for connecting applications
- Event Signing Confirmation: User approval required for each signing request
- WiFi Connectivity: Connect to Nostr relays via WiFi
- PIN Protection: Secure access to settings and configuration
- Power Management: Light sleep after a short period of inactivity and deep sleep mode after a longer period of inactivity
- Real-time Status: Connection status and signing request notifications
- Guition JC3248W535 3.5" ESP32-S3 development board with touch screen display (320x480)
- Power supply (USB or battery)
- PlatformIO installed
- Guition JC3248W535 3.5" touch screen display (320x480)
The project pins Espressif32 6.12.0 / Arduino ESP32 2.0.17. The display library is not compatible with the changed SPI API in Arduino 3.3.11. Use the checked-in configuration for both terminal and editor builds.
Upload writes only the currently selected application slot after validating the installed partition table and image size. It preserves settings, boot metadata and data partitions. A board with no valid OTA layout needs separate initial provisioning; this uploader refuses to guess a layout.
# Clone the repository
git clone <repository-url>
cd <repository-directory>
# Build the project
pio run
# Upload to device
pio run --target upload
# Monitor serial output
pio device monitor# Generate documentation
pio run -t docs- Power on the device
- Use the touch screen interface to navigate to settings
- Configure WiFi connection to connect to your network
- Generate or import a Nostr private key (nsec format)
- Configure relay connection settings
- The device will display a bunker URL that applications can use to connect
- When applications request to connect, approve them via the touch interface
- Authorize signing requests as they come in from connected applications
Connecting Applications:
- Applications use the bunker URL to initiate NIP-46 connections
- Device prompts for user authorization of new connections
- Approved applications are stored in authorized clients list
Signing Events:
- Connected applications send signing requests via NIP-46
- Device displays event details and prompts for user confirmation
- User approves or rejects each signing request individually
- Private key never leaves the device
The application uses a modular architecture with the following components:
- App: Central coordinator managing all modules
- Display: LVGL-based UI with LovyanGFX driver
- WiFi: Network connectivity management
- RemoteSigner: NIP-46 protocol implementation and event signing
- Settings: Persistent configuration storage
- UI: User interface screens and interactions
Built with:
- PlatformIO Arduino framework
- LVGL graphics library
- LovyanGFX display driver
- Custom Nostr protocol implementation (NIP-01, NIP-44, NIP-46)
- WebSocket communication for relay connections
- Secp256k1 cryptography for Schnorr signatures
To analyze the codebase for unused functions, use cppcheck:
# Install cppcheck (macOS with Homebrew)
brew install cppcheck
# Run analysis to find unused functions
cppcheck --enable=unusedFunction src/
# For more detailed analysis with all checks
cppcheck --enable=all --inconclusive src/This will identify functions that are defined but never called, helping keep the codebase clean and reducing binary size.
MIT License