# @projectos/wallet Personal-use wallet backend (TEST mode only): double-entry ledger, Stripe test funding (Checkout / PaymentIntents + signature-verified webhooks), QR-invoice payment routing, Supabase persistence. See root README "Wallet service" section. ## Web UI | Page | Purpose | |---|---| | `/` | Wallet: balance, add funds (Stripe Checkout), pay invoice by QR payload, transactions, app links | | `/devices` | Add / remove phones and devices (phone numbers normalised to E.164). Requires sign-in | | `/settings` | Enter Stripe **test** keys and Supabase URL + service role key, test each connection, switch storage. Requires sign-in | | `/funding/success`, `/funding/cancel` | Stripe Checkout return pages | ### Admin passcode and secrets * Set `ADMIN_PASSCODE` (env / Space secret). Without it `/settings` and `/devices` are disabled. * Secrets typed on `/settings` are held server-side only. They are never returned to the browser (only a masked tail), never logged, and error text is redacted. Live Stripe keys (`sk_live_`/`rk_live_`) are refused. * To survive restarts the server writes them as Hugging Face **Space secrets** using `HF_SPACE_TOKEN` + the Space-provided `SPACE_ID` (the Space restarts after a save). Without a token they stay in memory only. Prefer a fine-grained token limited to this Space. * With `WALLET_STORE=memory` balances and devices reset on restart. Run the SQL in `supabase/migrations/` (downloadable from `/settings`), then switch storage to `supabase` for durable data. * `/wallet/test-credit` (signed in) adds simulated test credit so the wallet can be exercised before Stripe is configured.