Add ticket purchase via Nostr DM (NIP-17 preferred) #8

Open
opened 2026-04-26 20:24:06 +00:00 by padreug · 0 comments
Owner

Summary

Enable fully Nostr-native ticket purchasing via encrypted DMs, following the nostrmarket order flow pattern but using NIP-17 (gift-wrapped DMs) instead of the deprecated NIP-04.

Scope

  • Prefer NIP-17 (kind 1059 gift-wrapped DMs) over NIP-04 (kind 4) — NIP-04 is deprecated per nostr-protocol/nips
  • Use NIP-44 v2 encryption for all message content
  • Subscribe for DMs tagged to the events extension pubkey via nostrclient
  • Parse incoming ticket purchase requests (JSON in DM content)
  • Create Lightning invoice, respond with payment request DM
  • Listen for invoice payment, update ticket status, send confirmation DM
  • This enables fully Nostr-native ticket purchasing without any HTTP

Depends on

  • aiolabs/events#4 (NIP-52 publishing — for extension keypair and nostrclient integration)

Notes

nostrmarket currently uses NIP-04 (kind 4). This issue should use NIP-17 from the start to follow current best practices.

References

## Summary Enable fully Nostr-native ticket purchasing via encrypted DMs, following the nostrmarket order flow pattern but using NIP-17 (gift-wrapped DMs) instead of the deprecated NIP-04. ## Scope - Prefer NIP-17 (kind 1059 gift-wrapped DMs) over NIP-04 (kind 4) — NIP-04 is deprecated per nostr-protocol/nips - Use NIP-44 v2 encryption for all message content - Subscribe for DMs tagged to the events extension pubkey via nostrclient - Parse incoming ticket purchase requests (JSON in DM content) - Create Lightning invoice, respond with payment request DM - Listen for invoice payment, update ticket status, send confirmation DM - This enables fully Nostr-native ticket purchasing without any HTTP ## Depends on - aiolabs/events#4 (NIP-52 publishing — for extension keypair and nostrclient integration) ## Notes nostrmarket currently uses NIP-04 (kind 4). This issue should use NIP-17 from the start to follow current best practices. ## References - NIP-17 spec: https://github.com/nostr-protocol/nips/blob/master/17.md - NIP-44 v2 spec: https://github.com/nostr-protocol/nips/blob/master/44.md - nostrmarket DM flow pattern (for architecture, not encryption choice): `nostrmarket/services.py` lines 433-501
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/events#8
No description provided.