# Wavlake Paywall Debug Client A **debug/testing harness** for the Wavlake paywall system. Built to expose every step of the payment flow. ## Purpose Test and debug: - Kind 30440 track discovery - Cashu wallet operations (proofs, balances) - Content API requests/responses - Payment flow (402 โ†’ token โ†’ access) - Audio playback from signed URLs ## Features - ๐Ÿ“Š **Debug Panels** - Real-time state inspection - ๐Ÿช™ **Wallet Visibility** - See all proofs, balances, transactions - ๐Ÿ“ **Request Logging** - Full request/response history - ๐Ÿ”Š **Playback Debug** - Stream status, grant expiry, buffer health ## Layout ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ ๐ŸŽต Wavlake Debug Client [API: localhost:3000] โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ โ”‚ โ”‚ Wallet Panel โ”‚ โ”‚ Track List โ”‚ Now Playing โ”‚ Balance: 500 ยข โ”‚ โ”‚ โ”‚ + Controls โ”‚ Proofs: [...] โ”‚ โ”‚ - Track 1 โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ - Track 2 ๐Ÿ”’โ”‚ โ”‚ API Config โ”‚ โ”‚ - Track 3 โ”‚ โ”‚ Base URL: [...] โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค โ”‚ Debug Log โ”‚ โ”‚ 22:15:01 REQUEST GET /content/abc123 โ”‚ โ”‚ 22:15:01 RESPONSE 402 { priceCredits: 5, mintUrl: ... } โ”‚ โ”‚ 22:15:02 WALLET spending 5 credits (proofs: [...]) โ”‚ โ”‚ 22:15:02 REQUEST GET /content/abc123 + X-Ecash-Token โ”‚ โ”‚ 22:15:02 RESPONSE 200 { url: "...", grant: {...} } โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ## Getting Started ```bash npm install npm run dev ``` Configure API URL in the debug panel (default: `http://localhost:3000/api/v1`) ## Token Import Paste a Cashu token (cashuA... or cashuB...) to add credits to your wallet. ## Tech Stack - React 18 + TypeScript + Vite - NDK for Nostr relay queries - cashu-ts for wallet operations - Zustand for state management ## Related - [wavlake/monorepo](https://github.com/wavlake/monorepo) - Main platform - [cashu-ts](https://github.com/cashubtc/cashu-ts) - Cashu TypeScript library