Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
ad93bcd
updated type on dialog headers for payment request,receive ecash, sen…
swedishfrenchpress Nov 13, 2025
607de19
fix min amount
callebtc Nov 16, 2025
e6506a4
update node to 25
callebtc Nov 17, 2025
72c23a9
update package lock
callebtc Nov 17, 2025
0c78173
Merge pull request #469 from cashubtc/node-25
callebtc Nov 17, 2025
d56731f
npm run format
callebtc Nov 17, 2025
b2d8d7a
Merge pull request #468 from cashubtc/lnurl-min-amount-2
callebtc Nov 17, 2025
bd33905
Merge pull request #465 from cashubtc/header_type_fixed
callebtc Nov 17, 2025
db19595
show keyboard lnurl pay
callebtc Nov 17, 2025
dacdb6f
keyboard ripple
callebtc Nov 17, 2025
e14e88c
Merge pull request #471 from cashubtc/fix-lnurl-show-keyboard
callebtc Nov 17, 2025
5831a8f
show paid animation
callebtc Nov 17, 2025
d19c463
improve layout
callebtc Nov 17, 2025
514b3bb
extract translations
callebtc Nov 17, 2025
5813e78
Merge pull request #472 from cashubtc/pay-invoice-improve
callebtc Nov 17, 2025
a31eb74
fix swap amount
callebtc Nov 22, 2025
80902a8
fix swap
callebtc Nov 22, 2025
d6a08e4
Merge pull request #475 from cashubtc/fix-swap-amount
callebtc Nov 22, 2025
9ed53a6
import wallet backup
callebtc Nov 24, 2025
d4f1833
format
callebtc Nov 24, 2025
3e21c51
Merge pull request #477 from cashubtc/import-wallet-backup
callebtc Nov 24, 2025
24ee7ae
prevent second payment after success
callebtc Dec 4, 2025
dc8510b
fix lnurl-p callback separator
prusnak Dec 7, 2025
5a1d722
fix(nostr): respect verbose flag in backup error notifications
b-l-u-e Dec 8, 2025
876395d
fix: update Docker to Node.js 22 and remove obsolete compose version
b-l-u-e Dec 8, 2025
617e4b1
Merge pull request #480 from cashubtc/lnurlp-callback-separator
prusnak Dec 8, 2025
bc69979
do not use var, use const or let
prusnak Dec 7, 2025
4f862d1
use const where possible instead of let
prusnak Dec 8, 2025
5681166
enable eslint:recommended but silence some common errors/warnings
prusnak Dec 10, 2025
0066189
fix eslint case-declarations
prusnak Dec 10, 2025
8b0aa09
Merge pull request #483 from cashubtc/do-not-use-var
prusnak Dec 10, 2025
b78026d
Merge pull request #481 from b-l-u-e/docker-update-nodejs-version
prusnak Dec 10, 2025
58bdd31
use node:24 in Dockerfile
prusnak Dec 11, 2025
6160796
Merge pull request #484 from cashubtc/docker-node
prusnak Dec 11, 2025
7fe371a
added czech translations
hynek-jina Dec 22, 2025
128f8c0
revert of unwanted change in package-lock.json
hynek-jina Dec 22, 2025
e39de74
Merge pull request #488 from hynek-jina/feat/czech-translation
prusnak Dec 22, 2025
cd14612
10s
callebtc Dec 25, 2025
ff45cdb
Merge branch 'main' into fix/deny-melt-after-melt
callebtc Dec 25, 2025
9210ad6
Merge pull request #479 from cashubtc/fix/deny-melt-after-melt
callebtc Dec 25, 2025
5296959
Normalize and validate BIP39 mnemonic on init/restore
robwoodgate Jan 6, 2026
bdd3b24
format
robwoodgate Jan 6, 2026
273046f
Tidy up and improve UX
robwoodgate Jan 6, 2026
a26d0c9
async wallet
callebtc Jan 10, 2026
13a1a99
fix test mock
callebtc Jan 10, 2026
9857c4d
refactor: async mintWallet and automatic keyset updates
callebtc Jan 10, 2026
a7fd3a4
back to one hour
callebtc Jan 10, 2026
e919e93
update keyset for send only if swap is needed
callebtc Jan 10, 2026
db1b0b9
npm run format
callebtc Jan 10, 2026
942ca27
one hour
callebtc Jan 10, 2026
3451795
Merge pull request #496 from cashubtc/update-keysets-and-mint-info
callebtc Jan 10, 2026
c46bd5a
add AGENTS.md
callebtc Jan 10, 2026
8ad2a3e
Merge pull request #497 from cashubtc/add-agents-md
callebtc Jan 10, 2026
688111b
Fix keyset rotation handling by merging instead of overwriting keysets
fresh3nough Jan 17, 2026
9cc8581
Merge pull request #502 from fresh3nough/cody/fixes/id-keyset
callebtc Jan 24, 2026
349aa72
fix(pay-lightning): fix mobile layout with long lightning address
asmogo Jan 25, 2026
5d13dbc
fix: fmt
asmogo Jan 25, 2026
ecd260c
fix(ui): restore multipath payment functionality
a1denvalu3 Jan 26, 2026
9c53a0c
prettier run
a1denvalu3 Jan 26, 2026
4540a11
fix format
prusnak Jan 30, 2026
33b734e
Merge pull request #507 from cashubtc/format
prusnak Jan 30, 2026
a94d08a
Support for legacy QR codes for retail has been implemented
DSanich Dec 19, 2025
5b1d86c
Code refactoring
DSanich Jan 9, 2026
53e7deb
cleanup and simplify
prusnak Jan 20, 2026
00dd7b5
Merge pull request #487 from DSanich/feat/support-legacy-retail-qr-codes
prusnak Jan 30, 2026
0f01349
Merge pull request #506 from a1denvalu3/restore-mpp-ui
callebtc Feb 20, 2026
136e521
Merge pull request #505 from asmogo/fix/pay-lightning
callebtc Feb 20, 2026
6ba1a2e
Merge pull request #495 from robwoodgate/fix-bip39-seed
callebtc Feb 20, 2026
fffabc5
fix(ui): use checkout terminal style for fiat amount input and remove…
callebtc Feb 20, 2026
81ff81b
fix(ui): apply checkout terminal input style to native fiat currencie…
callebtc Feb 20, 2026
f30c031
fix(ui): handle number vs string when initializing fiat buffer
callebtc Feb 20, 2026
58540ef
Merge pull request #509 from cashubtc/fix-fiat-decimal-input
callebtc Feb 21, 2026
c48c2b1
Merge pull request #482 from b-l-u-e/fix/nostr-backup-silent-errors
callebtc Feb 21, 2026
395d8c0
feat(i18n): add Brazilian Portuguese (pt-BR) language support
claude Feb 27, 2026
35c2cdc
chore(dev): switch dev server to HTTP on port 8081 for local preview
claude Feb 27, 2026
c052a72
chore: trigger Vercel preview build for pt-BR
claude Feb 27, 2026
7115dbc
fix(i18n): replace pt-BR "troca/trocar" with "swap" loanword
claude Feb 27, 2026
eac6019
fix(i18n): replace pt-BR "Descobrir mints" with "Buscar mints"
claude Feb 27, 2026
7f93471
fix(i18n): replace pt-BR "Teia de confiança" with "Rede de confiança"
claude Feb 27, 2026
680ec83
feat(i18n): sort language selector options alphabetically
claude Feb 27, 2026
e6d37cd
fix: address PR review feedback
claude Feb 28, 2026
3938373
chore: run prettier format
claude Feb 28, 2026
c0eced3
Merge pull request #510 from paulosacramento/claude/wallet-language-a…
prusnak Feb 28, 2026
efcef8b
chore: merge upstream/main (83 commits) + keep node22/heap Dockerfile
Mar 6, 2026
000ae96
feat: Flash Address as first-class wallet feature
Mar 24, 2026
f1f629f
chore: run prettier format on flash address files
Mar 24, 2026
28427bf
chore: format with prettier 2.8.8 (project version)
Mar 24, 2026
7c93f24
fix(docker): add .dockerignore, upgrade @quasar/app-vite to v2, fix v…
forge0x Mar 25, 2026
ea37b1c
feat(wizard): SetupWizard onboarding with FlashShell, StepUsername, S…
forge0x Mar 25, 2026
48783ce
feat(pwa): Flash branding in manifest
forge0x Mar 25, 2026
5799f28
feat(ui): Flash branding on register.html and claim.html
forge0x Mar 25, 2026
f4ad9d9
feat(ui): Flash branding on register.html and claim.html
forge0x Mar 25, 2026
fbf0fe1
chore: update package-lock.json for @quasar/app-vite@2 and vitest@2
forge0x Mar 25, 2026
1da9e2c
fix(build): migrate quasar.config.js to ESM for @quasar/app-vite@2
forge0x Mar 25, 2026
9c4dee2
fix(build): update tsconfig.json for @quasar/app-vite@2
forge0x Mar 25, 2026
b7d8665
fix(build): fix workboxMode casing for @quasar/app-vite@2 (GenerateSW…
forge0x Mar 25, 2026
b2cb922
fix(build): add register-service-worker as explicit dep (required by …
forge0x Mar 25, 2026
c31be6c
fix(test): use ESM vitest config filename (.mjs) for vite 5 plugin im…
forge0x Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules
dist
.git
.gitignore
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.DS_Store
*.local
coverage
.nyc_output
21 changes: 20 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
// Rules order is important, please avoid shuffling them
extends: [
// Base ESLint recommended rules
// 'eslint:recommended',
"eslint:recommended",

// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
Expand Down Expand Up @@ -60,6 +60,25 @@ module.exports = {

// allow debugger during development only
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",

"no-var": "error",
"no-const-assign": "error",
"prefer-const": [
"error",
{
destructuring: "any",
ignoreReadBeforeAssign: false,
},
],

// remove some warnings/errors from eslint:recommended for now
// which are quite common in the current codebase
// we will deal with them later on
"no-unused-vars": "off",
"no-undef": "off",
"no-empty": "off",
"no-useless-catch": "off",
"no-constant-condition": "off",
},
overrides: [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 24
node-version: 25
cache: npm

- name: Install dependencies
Expand Down
180 changes: 180 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# Cashu.me Developer Guide for Agents

This document provides a comprehensive overview of the **Cashu.me** codebase. It is designed to help coding agents understand the architecture, tech stack, conventions, and patterns used in this project.

## 1. Tech Stack

### Core Frameworks

- **Framework:** [Quasar Framework](https://quasar.dev/) (Vue.js 3 + Vite)
- **Language:** TypeScript (mostly) and JavaScript.
- **State Management:** [Pinia](https://pinia.vuejs.org/)
- **Routing:** Vue Router (standard Quasar setup)
- **Build Tool:** Vite (via Quasar CLI)
- **CSS:** SCSS/Sass with Quasar's utility classes.

### Mobile & Desktop

- **Mobile:** [Capacitor](https://capacitorjs.com/) (Android & iOS)
- **Desktop:** Electron (via Quasar mode)
- **PWA:** Supported and primary delivery method for web.

### Cashu & Cryptography

- **Cashu Library:** [`@cashu/cashu-ts`](https://github.com/cashubtc/cashu-ts) (Core Cashu wallet logic)
- **Crypto:** `@cashu/crypto`, `@noble/secp256k1`
- **Lightning/Bitcoin:** `light-bolt11-decoder`, `bech32`

### Persistence

- **Database:** [Dexie.js](https://dexie.org/) (IndexedDB wrapper) for storing Cashu proofs (tokens).
- **Local Storage:** `@vueuse/core` (`useLocalStorage`) for user settings, history, and simpler state.

### Testing & Linting

- **Testing:** Vitest
- **Linting:** ESLint + Prettier

---

## 2. Project Structure

```
.
├── src/
│ ├── assets/ # Static assets (images, icons)
│ ├── boot/ # Quasar boot files (initialization logic)
│ ├── components/ # Vue components (UI elements)
│ ├── css/ # Global styles (SCSS)
│ ├── i18n/ # Internationalization (locales)
│ ├── js/ # Utility functions (non-component logic)
│ ├── layouts/ # App layouts (MainLayout, FullscreenLayout)
│ ├── pages/ # Route pages (WalletPage, Settings, etc.)
│ ├── router/ # Vue Router configuration
│ ├── stores/ # Pinia stores (Critical business logic)
│ ├── App.vue # Root component
│ └── main.js # Entry point
├── src-capacitor/ # Capacitor configuration and native projects
├── src-electron/ # Electron main/preload scripts
├── src-pwa/ # PWA service worker and manifest
└── quasar.config.js # Quasar configuration
```

---

## 3. Architecture & Key Stores

The application logic is heavily centralized in Pinia stores found in `src/stores/`.

### Critical Stores

- **`wallet.ts` (`useWalletStore`):** The **primary controller** for the wallet. It handles:
- Sending, receiving, melting (paying invoices), and minting tokens.
- interacting with the `cashu-ts` library (`CashuWallet`, `CashuMint`).
- managing invoice history.
- **`mints.ts` (`useMintsStore`):** Manages the list of connected mints, their keysets, and URLs.
- **`proofs.ts` (`useProofsStore`):** Manages the collection of proofs (ecash tokens). Handles CRUD operations for proofs in memory and syncs with storage.
- **`tokens.ts` (`useTokensStore`):** Manages token history (spent/received tokens log).
- **`dexie.ts` (`useDexieStore`):** Wrapper around Dexie.js for persistent storage of proofs.
- **`ui.ts` (`useUiStore`):** Manages UI state (loaders, dialog visibility, tab selection).

### Database Schema (Dexie)

The `proofs` table in Dexie stores the actual ecash tokens:

- `secret` (string, PK)
- `amount` (number)
- `C` (string, curve point)
- `id` (string, keyset ID)
- `reserved` (boolean, locked for pending operations)
- `quote` (string, optional)

---

## 4. Coding Conventions

### Component Style

The project predominantly uses the **Options API** with **Pinia mappers** within `.vue` files, even though it is a Vue 3 project.

**Pattern:**

```typescript
import { defineComponent } from "vue";
import { mapState, mapActions, mapWritableState } from "pinia";
import { useWalletStore } from "src/stores/wallet";

export default defineComponent({
name: "MyComponent",
mixins: [windowMixin], // Common mixin used for global window props
components: { ... },
data() {
return { ... };
},
computed: {
...mapState(useWalletStore, ["someState"]),
...mapWritableState(useWalletStore, ["someWritableState"]),
},
methods: {
...mapActions(useWalletStore, ["someAction"]),
myMethod() {
// Logic here
}
}
});
```

**Note:** While `<script setup>` is the modern Vue 3 standard, this codebase relies heavily on the Options API + Pinia mappers. **Respect this convention when modifying existing components.** For new simple components, `<script setup>` may be acceptable, but consistency is preferred.

### Styling

- Use **Quasar Utility Classes** (e.g., `q-pa-md`, `text-center`, `row`, `col-12`) whenever possible.
- Scoped CSS (`<style scoped>`) is used for component-specific overrides.
- Global variables are in `src/css/quasar.variables.scss`.

### Naming

- **Files:** PascalCase for components (`BalanceView.vue`), camelCase for logic files (`wallet.ts`).
- **Stores:** `use[Name]Store` (e.g., `useWalletStore`).

---

## 5. Common Patterns & Gotchas

### Wallet Operations

Most heavy lifting happens in `wallet.ts`. If you need to implement a new feature involving Cashu logic (e.g., "swap tokens", "pay lnurl"), look there first.

### Mutex Locking

The app uses a global mutex (in `ui.ts` -> `lockMutex`) during critical wallet operations (minting, melting, swapping) to prevent race conditions with the database or network.
**Always** ensure mutexes are released in a `finally` block.

### Notifications

Use the helper in `src/js/notify.ts`:

- `notifySuccess(message)`
- `notifyError(message)`
- `notifyWarning(message)`

### Platform Detection

The app runs on Web, Android, and iOS.

- Use `this.getPwaDisplayMode()` (mixin/helper) to detect if running as PWA or browser.
- Capacitor plugins are often wrapped or used directly in stores/components.

### Assets & Icons

- Icons are typically from `lucide-vue-next` or Quasar's internal Material Icons.
- Imports: `import { X as XIcon } from "lucide-vue-next";`

## 6. Development Workflow

- **Run Dev Server:** `npm run dev` (Starts Vite + Quasar)
- **Lint:** `npm run lint`
- **Format:** `npm run format`
- **Test:** `npm test` (Vitest)

When adding dependencies, prefer `npm install`.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Build Phase
FROM node:20.10.0-bullseye AS builder
FROM node:24 AS builder

WORKDIR /app

Expand All @@ -12,6 +12,9 @@ RUN npm install
# Copy the application code to the container
COPY . .

# Increase Node.js heap size for the build to prevent OOM errors
ENV NODE_OPTIONS="--max-old-space-size=1536"

# Build the PWA (replace 'npm run build' with your actual build command)
RUN npm run build:pwa

Expand All @@ -23,4 +26,3 @@ COPY --from=builder /app/dist/pwa /usr/share/nginx/html

# Expose the port your app will run on
EXPOSE 80

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Cashu Wallet
## One-liner build & run

```
docker-compose up -d
docker compose up -d
```

access at http://localhost:3000 or serve it behind a reverse proxy.
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "2"
services:
cashu.me:
image: cashu.me
Expand Down
Loading
Loading