boardwalkcash mirror from github
Go to file
Damian 5ce4cbee2e
One tap to create ecash w/ custom tap amounts (#54)
* Tap to create ecash (#51)



* add ecash tap button and settings

* set default zap amt to 0

* disable tap button when processing

* add e.message to clipboard error

* fix copy to clipboard?

* copy link not just token

* refactor SendEcashModalBody to take in static token

* show ecashsendmodal if on mobile

* center send link qr

* bug fix/ float to whole number

* Catch QR error when token is too long (#52)

* update warning message

* catch QR error when token is too long

* remove bottom border from cash taps settings
2024-05-28 17:10:09 -07:00
prisma store keysets, and make keyset used configurable 2024-04-17 07:32:36 -07:00
public restyle settings sidebar to match tx history (#50) 2024-05-27 11:07:59 -07:00
src One tap to create ecash w/ custom tap amounts (#54) 2024-05-28 17:10:09 -07:00
.env.example add a .env.example 2024-03-08 08:38:18 -08:00
.eslintrc.json add and run prettier xD 2024-03-11 09:51:28 -07:00
.gitignore . 2024-05-24 08:49:14 -07:00
.prettierrc add and run prettier xD 2024-03-11 09:51:28 -07:00
bolt11-decoder.d.ts fix bolt11-decoder ts issue 2024-04-23 12:04:51 -07:00
docker-compose.yml mod /setup and rebrand to "Boardwalk Cash" 2024-04-24 12:50:27 -07:00
docker_entrypoint.sh Add a docker entrypoint to run the migration 2024-02-28 14:14:04 -08:00
Dockerfile Add a docker entrypoint to run the migration 2024-02-28 14:14:04 -08:00
global.d.ts fix bolt11-decoder ts issue 2024-04-23 12:04:51 -07:00
LICENSE add mit license 2024-03-08 08:26:24 -08:00
next.config.mjs added pwa configuration (#35) 2024-05-17 08:45:20 -07:00
package-lock.json add transaction history + ability to reclaim unspent tokens (#45) 2024-05-23 15:46:06 -07:00
package.json add transaction history + ability to reclaim unspent tokens (#45) 2024-05-23 15:46:06 -07:00
postcss.config.js add and run prettier xD 2024-03-11 09:51:28 -07:00
README.md Update README.md 2024-04-25 08:37:50 -07:00
tailwind.config.ts add transaction history + ability to reclaim unspent tokens (#45) 2024-05-23 15:46:06 -07:00
tsconfig.json fix bolt11-decoder ts issue 2024-04-23 12:04:51 -07:00
vercel.json add and run prettier xD 2024-03-11 09:51:28 -07:00

Boardwalk Cash

A Lightning / Cashu Ecash wallet designed for fast easy onboarding and use

Table of Contents

Features

  • Lightning Integration: Send and Receive Lightning payments.
  • Cashu Ecash Wallet: Store balance locally as e-cash while at rest.
  • Lightning Address: Receive payments using an auto-generated Lightning Address.
  • Nostr Wallet Connect: Initiate payments from apps using NWC (NIP-47)
  • Nostr Wallet Authentication: Seamlessly create app connections with NWA (NIP-67)
  • Prism Payments: Use NWC to pay multiple invoices at once

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Before you begin, ensure you have the following tools installed and running:

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/boardwalkcash.git
    
    
  2. Navigate to the project directory:

    cd boardwalkcash
    
    
  3. Use Docker Compose to build and run the containers:

    docker-compose up --build
    

Architecture

Frontend

  • Framework: Built with Next.js and TypeScript.
  • Pages:
    • index.tsx: The main page for the app. Starts up top level hooks and reads in proofs from localstorage
    • connect.tsx: Reads in query params to connect with the apps using NWA
  • Components:
    • Balance: Displays sat/usd balance
    • ActivityIndicator: Controls the user messaging which appears between balance and buttons
    • buttons/lightning: Contains send and receive buttons for making Lightning payments
    • SendModal: UI / state for Lightning send flow
    • ClipboardButton: for copying to clipboard
    • EcashButtons: Currently in development
  • Hooks: Custom React hooks for managing state and side effects.
    • useCashu: Handles all of the calls to cashu mint and cashu-ts library. Reads/Writes to localstorage for handling proofs
    • useNwc: Subscribes to and handles NWC requests and prism payments.
  • State Management: Global state management using Redux Toolkit.
    • store.ts: Redux Toolkit store for global state management
    • slices/ActivitySlice.ts: managing activity state
    • slices/CashuSlice.ts: managing cashu state
    • slices/UserSlice.ts: managing user state
  • LocalStorage: for persisting user data and allowing user to self custody ecash proofs.
    • localStorage is being called for reads/writes across the app. This is used to store the user's proofs.
    • We are currently working on a more consistent and centralized way to handle this.

Backend

  • API Endpoints: RESTful API endpoints facilitating lud16, crud operations on the db, and mint operations such as paying invoices, creating invoices, and checking/exchanging proofs with the mint.
    • /api/callback: lud16 callback
    • /api/invoice/polling: Polls mint for invoices waiting to be paid.
    • /api/cron/invoice: Once above polling times out, this cron job check every minute for not-expired invoices
    • /api/lnurlp: lud16 lnurlp flow for paying invoices
    • /api/proofs: CRUD operations for the user's proofs
    • /api/users: CRUD operations for the user's data
    • /api/quotes: CRUD operations for managing quotes we need to keep track of
  • Database: PostgreSQL database, managed using Prisma ORM.

Docker Integration

  • Docker Containers: Next.js app and database are containerized.
  • Docker Compose: orchestrates the deployment.

NOTE: You may run only the database with docker and use your local Node.js environment for running the Next.js app, if you so choose.

Contributing

Any contributions you make are greatly appreciated.

  • Fork the Project
  • Create your Feature Branch (git checkout -b feature/AmazingFeature)
  • Commit your Changes (git commit -m 'Add some AmazingFeature')
  • Push to the Branch (git push origin feature/AmazingFeature)
  • Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/makeprisms/boardwalkcash

Acknowledgements

  • The Cashu Ecosystem
  • Cashu-TS
  • Calle
  • Egge