1.8 KiB
1.8 KiB
NOSTR_LOGIN_LITE Examples
This directory contains examples and tests for NOSTR_LOGIN_LITE using the local bundle setup.
Files
🔬 comprehensive-test.html
The main diagnostic and testing tool
- Comprehensive test suite with extensive debugging output
- Tests all library functions, dependencies, crypto, storage, etc.
- Results displayed on webpage for easy copying and debugging
- Run this when you need to diagnose issues or verify functionality
📱 simple-demo.html
Basic demonstration of NOSTR_LOGIN_LITE integration
- Minimal setup example
- Good starting point for new implementations
🎨 modal-login-demo.html
Demonstrates modal-based login flow
- Shows how to trigger and handle the login modal
- Example of auth event handling
👤 login-and-profile.html
Login and user profile demonstration
- Shows authentication flow
- Displays user profile information after login
🔗 nip46-bunker-demo.html
NIP-46 remote signing demonstration
- Shows how to connect to remote signers/bunkers
- Advanced use case example
Usage
- Start a local web server (e.g.,
python -m http.server 5501or Live Server in VS Code) - Navigate to any HTML file
- For comprehensive testing and debugging, use
comprehensive-test.html
All examples use the local bundle setup with two files:
../lite/nostr.bundle.js- Official nostr-tools bundle../lite/nostr-lite.js- NOSTR_LOGIN_LITE library with embedded NIP-46 extension
Architecture Update (2025-09-13)
The library has been simplified from a three-file to a two-file architecture:
- ✅ Before:
nostr.bundle.js+nip46-extension.js+nostr-lite.js - ✅ Now:
nostr.bundle.js+nostr-lite.js(with embedded NIP-46)
All functionality remains identical - NIP-46 remote signing, all auth methods, and full compatibility are preserved.