kinds.go raw

   1  // Package marmot implements the Marmot protocol (MLS-based E2E encrypted
   2  // messaging) for Nostr. It wraps github.com/emersion/go-mls to provide
   3  // 1:1 DM groups using NIP-EE event kinds.
   4  //
   5  // Event kinds:
   6  //   - 443:  Key packages (MIP-00)
   7  //   - 445:  Group messages (MIP-03)
   8  //   - 1059: Gift-wrapped welcome events (MIP-02)
   9  package marmot
  10  
  11  // Nostr event kinds used by the Marmot protocol.
  12  const (
  13  	// KindKeyPackage is published by users to advertise their MLS key
  14  	// material. Other users fetch this to create DM groups.
  15  	KindKeyPackage uint16 = 443
  16  
  17  	// KindGroupMessage carries MLS-encrypted application messages within
  18  	// an established group.
  19  	KindGroupMessage uint16 = 445
  20  
  21  	// KindGiftWrap wraps a Welcome message so only the intended recipient
  22  	// can decrypt it. Uses NIP-44 encryption to the recipient's pubkey.
  23  	KindGiftWrap uint16 = 1059
  24  )
  25