Replace user_id with nostr pubkey for ticket identification #3

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

Currently tickets can be created with a user_id (LNbits internal user ID) as an alternative to name/email. This works but ties ticket identity to LNbits internals.

Proposal: Use a nostr pubkey instead of user_id. This would:

  • Decouple ticket identity from LNbits user management
  • Allow ticket lookup across instances (pubkey is portable)
  • Align with the nostr-native architecture used by the webapp
  • Enable future features like nostr-based ticket transfer

Changes needed:

  • Rename user_id column/field to nostr_pubkey (or add alongside)
  • Update CreateTicket validator
  • Update get_tickets_by_user_idget_tickets_by_pubkey
  • Update API endpoints
  • Migration to rename/add column

Considerations:

  • Backward compatibility with existing user_id tickets
  • Whether to keep user_id as a fallback or drop entirely
Currently tickets can be created with a `user_id` (LNbits internal user ID) as an alternative to name/email. This works but ties ticket identity to LNbits internals. **Proposal:** Use a nostr pubkey instead of `user_id`. This would: - Decouple ticket identity from LNbits user management - Allow ticket lookup across instances (pubkey is portable) - Align with the nostr-native architecture used by the webapp - Enable future features like nostr-based ticket transfer **Changes needed:** - Rename `user_id` column/field to `nostr_pubkey` (or add alongside) - Update `CreateTicket` validator - Update `get_tickets_by_user_id` → `get_tickets_by_pubkey` - Update API endpoints - Migration to rename/add column **Considerations:** - Backward compatibility with existing `user_id` tickets - Whether to keep `user_id` as a fallback or drop entirely
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#3
No description provided.