Add npub scan receipt feature to cash-in/cash-out flows #36

Closed
opened 2026-06-13 22:02:55 +00:00 by padreug · 1 comment
Owner

Migrated from aiolabs/lamassu-next#36 — opened by @padreug on 2026-03-01.\n\n## Summary

After a successful transaction (cash-in or cash-out), offer the user the option to scan their Nostr npub (via QR camera scan or NFC) to receive a receipt as a Nostr DM.

Context

The askForReceipt and sendingReceipt states already exist in the state machine but the UI screens are placeholder. The npub scan camera/NFC hardware integration needs to be implemented.

Requirements

  • After transaction completes, show a "Scan your npub for a receipt" screen with camera viewfinder
  • Support both QR code scanning (npub1... encoded as QR) and NFC tap
  • Send receipt as encrypted Nostr DM (NIP-04 or NIP-44) containing:
    • Transaction type (buy/sell)
    • Fiat amount and currency
    • Sats amount
    • Exchange rate
    • Commission
    • Timestamp
    • Transaction ID
  • "No Thanks" button to skip
  • Timeout after 30s and auto-skip
  • Camera hardware integration via HAL IPC

Current State

The state machine states (askForReceipt, sendingReceipt) and events (SCAN_NPUB, SKIP_RECEIPT, RECEIPT_SENT) are already wired. Only the UI + camera/NFC hardware integration is missing.

> _Migrated from [aiolabs/lamassu-next#36](https://git.atitlan.io/aiolabs/lamassu-next/issues/36) — opened by @padreug on 2026-03-01._\n\n## Summary After a successful transaction (cash-in or cash-out), offer the user the option to scan their Nostr npub (via QR camera scan or NFC) to receive a receipt as a Nostr DM. ## Context The `askForReceipt` and `sendingReceipt` states already exist in the state machine but the UI screens are placeholder. The npub scan camera/NFC hardware integration needs to be implemented. ## Requirements - After transaction completes, show a "Scan your npub for a receipt" screen with camera viewfinder - Support both QR code scanning (npub1... encoded as QR) and NFC tap - Send receipt as encrypted Nostr DM (NIP-04 or NIP-44) containing: - Transaction type (buy/sell) - Fiat amount and currency - Sats amount - Exchange rate - Commission - Timestamp - Transaction ID - "No Thanks" button to skip - Timeout after 30s and auto-skip - Camera hardware integration via HAL IPC ## Current State The state machine states (`askForReceipt`, `sendingReceipt`) and events (`SCAN_NPUB`, `SKIP_RECEIPT`, `RECEIPT_SENT`) are already wired. Only the UI + camera/NFC hardware integration is missing.
Author
Owner

@padreug commented on 2026-03-28 (lamassu-next#36):

closed accidentally by claude, reopening...

> _@padreug commented on 2026-03-28 ([lamassu-next#36](https://git.atitlan.io/aiolabs/lamassu-next/issues/36#issuecomment-181)):_ closed accidentally by claude, reopening...
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/bitspire#36
No description provided.