Publish a public attendance attestation event on ticket register #20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
PR #19 added
events_ticket_registerover the LNbits nostrtransport. The transport encrypts every RPC event (NIP-44 v2) to
the server's transport pubkey, so the registration record is
visible only to the organizer + the server. For ticket-holder-side
verifiability — and as a stepping stone toward fully-Nostr-native
scanning where the webapp publishes the attestation directly
without a backend round-trip — the events extension should ALSO
publish an unencrypted attestation event when a ticket flips to
registered.Proposed shape
Modeled on the existing
publish_or_delete_nostr_eventpattern innostr_hooks.py, which signs and broadcasts on the organizer'skeypair. New publish call site lives in
services.py(or adedicated
services.register_attestation), invoked from BOTHregister paths so the wire signal is consistent:
transport_rpcs.handle_events_ticket_register— rightafter the
update_ticket(ticket)line.api_event_register_ticket(views_api.py) — same hook for the LNbits admin Quasar UI.
Event proposal
30030— addressablereplaceable so the registrar can re-publish if they need to
correct a bad scan; OR a regular kind in the 1000-9999 range if
we want it ephemeral). Probably
30030for replaceability.["d", "<ticket_id>"]— addressable identifier so theorganizer can only have one "registered" attestation per ticket
(re-publishes replace).
["a", "<31922|31923>:<organizer_pubkey>:<event_d_tag>"]— NIP-19reference to the parent calendar event.
["p", "<ticket_holder_pubkey>"]— if the ticket has anostr_identifierand it resolves to a pubkey, surface it so theholder can subscribe.
["status", "registered"]— explicit; leaves room forunregistered/refunded/ etc. via the same kind later.{"ticket_id": "...", "ts": <unix>}. Don't include holder PII (name/email) since this ispublic.
account.prvkeyper theexisting publish flow).
NIP landscape
No existing NIP covers ticket attendance directly (NIP-52 is calendar
events, NIP-99 is classified marketplace). Reasonable to define the
shape internally and propose upstream later if it sees traction.
Use cases unlocked
{kinds: [30030], "#d": [<ticket_id>]}and shows a "✓ Checked in"badge when the attestation lands on relays.
organizer flagged a specific ticket as scanned without trusting
any LNbits instance.
RPC becomes the only transport).
Out of scope
aiolabs/webapponce this lands.["status", "unregistered"]) — the kind isreplaceable so the same
d-tag re-publish handles a correction.Explicit revocation can come later.
Test plan
30030 event with the
d-tag matching the ticket id appearson the connected relays, signed by the organizer's pubkey.
a-tag to the calendar event and thestatus: registeredtag.the existing attestation under the same
d-tag on therelay (NIP-33 replaceable semantics).
a relay outage doesn't break the register flow.