A demonstration web app showing how to implement Bitcoin payments via Lightning using the Breez SDK - Nodeless with WebAssembly.
See it in action here.
Note: this is just a demo, for production usage, check out the security notes below.
Built with React, this demo app showcases best practices for integrating Lightning in a web environment using the Breez SDK’s WebAssembly bindings. It enables users to:
- Connect with a mnemonic seed phrase
- Send Lightning payments using Bolt11 invoices
- Receive Lightning payments by generating invoices
- View transaction history
- View detailed payment information
- React with TypeScript
- Tailwind CSS for styling
- Breez SDK - Nodeless for Lightning payments
You'll need a Nodeless Breez API key for the SDK to work — you can request one for free here.
git clone https://github.com:breez/wasm-example-app.git
cd wasm-example-appnpm install- Create a
.env.localfile in the project root - Add your Breez API key:
VITE_BREEZ_API_KEY="your_breez_api_key_here"
npm run devThe application will be available at http://localhost:5173
npm run buildThe build output will be in the dist directory.
/src
/components # UI components
/ui # Reusable UI component library
/contexts # React context providers
/services # Business logic and API communication
App.tsx # Main application component
main.tsx # Application entry point
index.css # Global styles
/pkg # WebAssembly bindings for Breez SDK
- walletService.ts - Handles communication with the Breez SDK
- SendPaymentDialog - Dialog for making Lightning payments
- ReceivePaymentDialog - Dialog for generating invoices
- PaymentDetailsDialog - Shows detailed information about transactions
- The app stores your mnemonic in localStorage. For a production app, it's recommended to use a secured storage and encrypt sensitive data.