-
Notifications
You must be signed in to change notification settings - Fork 16
NIP Draft: SimpleX Chat
NOTE: This version is mainly AI generated based on the relevant specs and should not be taken too seriously.
draft
optional
This NIP specifies a bridge between Nostr and SimpleX to enable private chat channels. SimpleX is a secure messaging protocol focused on privacy and security. It uses end-to-end encryption, forward secrecy, and anti-correlation techniques to protect metadata and message contents. SimpleX establishes unidirectional queues between users to send messages via SimpleX servers in a private, asynchronous fashion.
A SimpleX chat channel will utilize established SimpleX queues between channel members to exchange encrypted messages, bridging Nostr and SimpleX. Basic channel management will still occur using Nostr kinds 40-44 from NIP-28, but chat messages and content will be exchanged using the SimpleX protocol.
For a user to join a SimpleX chat channel, they need to establish SimpleX queues with each current channel member. This can be accomplished through:
-
Manual introductions - Each channel member provides the user with their queue information directly so the user can set up queues with everyone individually.
-
Relay discovery - The channel's NIP-28 events contain recommended SimpleX relays in their
e tags
. The new member connects to these relays and requests an introduction to the channel, providing their public key. The relay then facilitates establishing queues between the new member and all current channel members. -
Bridge relays - Special "bridge" relays contain public keys and recommended relays for all current channel members. New members connect to a bridge relay to get introductions to the whole channel. The bridge relays forward introductions and traffic between the new member and channel members' recommended relays.
Once a new member has established SimpleX queues with all current channel members, they create an on-chain join message using kind 45 from this NIP. This signals to all members that private chat can begin over SimpleX queues.
Signal to channel members that a new user has established SimpleX queues and is ready to participate in private chat.
{
"content": "",
"tags": [["e", <kind_40_event_id>]],
...
}
-
46 - SimpleX channel leave
:
Signal to remaining channel members that a user has left the private SimpleX channel.
Example:
{
"content": "",
"tags": [["e", <kind_40_event_id>]],
...
}
-
47 - SimpleX queue rotation
:
Signal to channel members that a user has rotated their SimpleX queues. Members create new queues with this user to maintain a private channel.
Example:
{
"content": "",
"tags": [["e", <kind_40_event_id>]],
...
}