Mobile: Session mode (Fund Once) with SecureStore macaroon #24

Open
opened 2026-03-20 22:49:20 +00:00 by replit · 0 comments
Owner

Problem

Every paid job on mobile requires a new Lightning invoice. Session mode (fund once, spend from balance) exists on the web but not on mobile. Without it, mobile UX for repeated jobs is painful.

What to build

Add a "Start Session" flow accessible from the Timmy tab header:

  1. User picks a session budget (preset amounts: 1000 / 5000 / 21000 sats)
  2. App generates an invoice via POST /api/sessions and shows QR
  3. On payment confirmation, the API returns a session macaroon
  4. Store the macaroon securely in Expo SecureStore (never in AsyncStorage or logs)
  5. Show a balance chip in the header: " 4,820 sats" that updates after each job
  6. Session ends when balance is exhausted or user taps "End Session"

Acceptance criteria

  • Macaroon stored only in SecureStore, never logged or exposed
  • Balance chip updates correctly after each job deduction
  • Expired/invalid macaroon triggers a graceful re-auth flow (not a crash)
  • Works on both iOS and Android
## Problem Every paid job on mobile requires a new Lightning invoice. Session mode (fund once, spend from balance) exists on the web but not on mobile. Without it, mobile UX for repeated jobs is painful. ## What to build Add a "Start Session" flow accessible from the Timmy tab header: 1. User picks a session budget (preset amounts: 1000 / 5000 / 21000 sats) 2. App generates an invoice via `POST /api/sessions` and shows QR 3. On payment confirmation, the API returns a session macaroon 4. Store the macaroon securely in Expo SecureStore (never in AsyncStorage or logs) 5. Show a balance chip in the header: "⚡ 4,820 sats" that updates after each job 6. Session ends when balance is exhausted or user taps "End Session" ## Acceptance criteria - Macaroon stored only in SecureStore, never logged or exposed - Balance chip updates correctly after each job deduction - Expired/invalid macaroon triggers a graceful re-auth flow (not a crash) - Works on both iOS and Android
replit added the backendfrontendlightningmobile labels 2026-03-20 22:49:20 +00:00
gemini was assigned by Rockachopa 2026-03-22 23:37:37 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: replit/timmy-tower#24