# Tides: A Nostr Messenger Extension For Chrome & Brave
A zap and NWC enabled Nostr messenger
Browser extension for Chromium-based browsers like Brave (recommended), Chrome, or Edge.
## Features π
- **Direct Messaging & Groups**: P2P communication and group conversations
- **Lightning Zaps**: Send/receive Bitcoin tips with optional ***NWC wallet integration***
- **Media Support**: Images, GIFs, videos (MP4, WebM, MOV, AVI, MKV), file uploads to Blossom
- **Rich Previews**: Nostr notes/profiles, YouTube, Twitter/X, Twitch, Amazon, media links
- **Multiple Relays**: Automatic fallback and retry logic
- **Login**: nsec login with AES-GCM encrypted local key storage (NIP-46 remote signing planned)
- **Contact Management**: Follow/unfollow with network-wide sync, NIP-51 mute lists
- **Search & Navigation**: Find contacts, groups, messages with context menus
- **Modern UI**: Dark mode, emoji picker, GIF search, QR codes
- **Performance**: Message caching, fast loading, robust error handling
## Installation π§
1. Download and extract the latest release `.zip` file
2. Open your browser extensions page (`brave://extensions`, `chrome://extensions`, `edge://extensions`)
3. Enable "Developer mode" β Click "Load unpacked" β Select extracted folder
4. Enable "Add to taskbar" in extension details
## Changelog π
### v1.2.0 - Advanced Contact Management & NWC (Aug 2025)
**New Features:**
- Advanced contact management with network-wide sync
- NIP-51 mute lists for multi-client consistency
- Nostr Wallet Connect (NWC) for direct wallet zap payments
- Improved contact discovery and performance optimizations
**Improvements:**
- Enhanced unfollow functionality and removed message limits
- Better error handling, UI stability, and GIF service integration
- Network-level contact actions and proper NIP-51 implementation
## For Developers π οΈ
```bash
git clone https://github.com/arbadacarbaYK/tides.git
cd tides
npm install
npm run build
```
Load the `dist` directory as an unpacked extension in your browser.
You can find more info in Setup Instructions.
### Project Structure
```
src/
βββ background.js # Service worker and background processes
βββ popup.js # Main UI logic
βββ popup.html # Extension popup interface
βββ style.css # Styling
βββ shared.js # Shared utilities and constants
βββ userMetadata.js # User profile handling
βββ contact.js # Contact management
βββ messages.js # Message handling and encryption
βββ groupContact.js # Group contact management
βββ groupMessages.js # Group message handling
βββ services/ # External API integrations (Giphy, etc.)
βββ sounds/ # Audio files for notifications
βββ icons/ # Extension and UI icons
βββ state/ # State management and persistence
βββ lib/ # Third-party libraries
```
### Tech Stack & NIPs
**Built with:** nostr-tools, WebSocket, Chrome Storage API, Web Notifications, Giphy API, WebLN, Blossom
**Supported NIPs:** 01, 02, 03, 04, 05, 07, 17, 19, 21, 25, 28, 40, 41, 42, 44, 47, 51, 57, 59, 65, 89, 92
#### NWC (Wallet Connect)
Tides supports zapping via Nostr Wallet Connect (NIPβ47):
- Connect your wallet in Settings β NWC and paste your NWC URI
- In any chat, use the zap button β choose βPay with NWCβ (or scan QR)
- We show clear success/error status without closing the modal prematurely
- Your custom message is included in the zap receipt (NIPβ57; for NWC zaps not yet shown on all apps)
#### NIPs and Kinds at a Glance
| Feature | NIP | Kind(s) | What it means | Where Tides uses it |
|---|---|---|---|---|
| Direct Messages (encrypted) | [NIP-04](https://nips.nostr.com/04) | 4 | Legacy encrypted DMs | Reading older DMs, fallback when peer doesnβt support NIPβ17 |
| Chat Messages (DMs) | [NIP-17](https://nips.nostr.com/17) | 14 | Unsigned chat messages; may be wrapped via NIPβ59 | Preferred for DMs when available |
| Versioned Encryption | [NIP-44](https://nips.nostr.com/44) | β (applies to payloads of 4/14) | Stronger encryption format | Decrypting/creating modern DMs |
| Gift Wrap & Seals | [NIP-59](https://nips.nostr.com/59) | 1059 (gift wrap), 13 (seal) | Wraps/ships kindβ14 privately | Receiving βsecretβ NIPβ17 messages |
| Zap Receipts | [NIP-57](https://nips.nostr.com/57) | 9734 | Lightning zap receipt events | QR zaps and NWC zaps |
| Wallet Connect | [NIP-47](https://nips.nostr.com/47) | β | Control wallet over Nostr | βPay with NWCβ buttons |
| Groups | β | 40 (create), 41 (metadata/update/leave), 42 (messages) | Group lifecycle and chat | Group list and chat views |
| DM Relay List | [NIP-17](https://nips.nostr.com/17) | 10050 | Userβs preferred DM relays | Live DMs use your 10050; backfill may widen to peerβs 10050 |
| Relay List (general) | [NIP-65](https://nips.nostr.com/65) | 10002 | General relay preferences | Fallback when 10050 is missing |
| Contacts + Relay Hints | [NIP-02/03](https://nips.nostr.com) | 3 | Follow list; sometimes includes relays | Contact discovery and hints |
### Key Development Areas
- **Authentication**: nsec login, AES-GCM encrypted local storage, key validation (NIP-46 remote signing planned)
- **Relays**: Connection pooling, fallbacks, retry logic, health monitoring
- **Messages**: NIP-04/44 encryption, signatures, media support, group handling
- **Contacts**: Follow lists (NIP-02/03), mute lists (NIP-51), network sync
- **Groups**: Creation, management, metadata, caching
- **Performance**: Local caching, lazy loading, optimized connections, timeouts
- **Error Handling**: Global boundaries, graceful degradation, user-friendly messages
## Privacy & Security π
- **E2E Encryption**: NIP-04/44 encrypted messages, private keys never leave device
- **P2P Communication**: No central server, open source, no tracking
- **Secure Features**: Local storage encryption, minimal permissions, secure relay connections
- **Privacy Controls**: Network-wide contact sync, NIP-51 mute lists, optional NWC integration
## Contributing π€
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## License π
Licensed under [Creative Commons Attribution-NonCommercial 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
**You can**: Share, remix, adapt
**Requirements**: Attribution, non-commercial use only
## Acknowledgments π
Thanks to my dear weirdos of the Nostr and lightning community !
If you want to support my work send some π§‘ to LNURL1DP68GURN8GHJ7CN5D9CZUMNV9UH8WETVDSKKKMN0WAHZ7MRWW4EXCUP0X9UXGDEEXQ6XVVM9XUMXGDFCXY6NQS43TRV