Commit graph

8 commits

Author SHA1 Message Date
Patrick Mulligan
51dcf0d6f6 feat(deploy): build nfc-pcsc's native pcsclite addon for Electron (mkAtmApp)
Rebuild @pokusew/pcsclite (V8 C++ addon) against Electron headers like
better-sqlite3, and package nfc-pcsc + @pokusew/pcsclite into the runtime
node_modules. Its binding.gyp hardcodes Debian /usr/include/PCSC + /usr/lib,
so point the compiler/linker at nixpkgs pcsclite via CPATH/LIBRARY_PATH
(winscard.h lives under include/PCSC); pcsclite.lib in buildInputs lets
autoPatchelf wire libpcsclite.so.1 into the .node RPATH. Bumps the pnpmDeps
hash for the added nfc-pcsc dependency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-05 04:55:30 +02:00
d32ddc806a build(nix): bump pnpmDeps hash for the qr dependency
Adding `qr` (and dropping `jsqr`) changed pnpm-lock.yaml, invalidating the
fixed-output hash for the vendored pnpm store. Without this the NixOS build
of the ATM app fails at the FOD before activation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 23:21:10 +02:00
fdde0ea3ad fix(nix): pin python311 for atm-app native module build
nixpkgs 24.11 made `pkgs.python3` an alias for Python 3.12, which
removed `distutils` from stdlib. node-gyp@9.4.1 (transitively pulled
in by better-sqlite3) still imports `distutils.version`, so the app
derivation failed with `ModuleNotFoundError: No module named
'distutils'` on the better-sqlite3 rebuild step.

Pin to python311 — still in 24.11 nixpkgs. Drop once pnpm-lock bumps
better-sqlite3 to a release whose node-gyp@10+ doesn't need distutils.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 19:12:11 +02:00
1bb35220e9 refactor(rename): root + flake output names → bitSpire/bitspire
Three root-level identifier renames:

  - Root package.json `name`:  lamassu-next  → bitSpire
  - flake.nix nixosConfigurations.lamassu-live-*: kept (legacy
    aliases) and ADDED bitSpire-live-* alongside. Both work.
    Drop the lamassu-* aliases at the final cutover once nothing
    references them.
  - nix/mkAtmApp.nix `pname`:  lamassu-atm-app → bitspire-atm-app
    (lowercase to match nix package naming conventions; the
    Electron app's externally-facing names get their own commit).

What's NOT renamed here (per the plan):

  - Hardware-named outputs (douro, tejo, sintra, batm3) — those
    are physical product names.
  - nixosConfigurations.{douro,tejo,sintra,batm3} ergonomic
    aliases — same reason.
  - nixosModules.lamassu-atm + its imported file — that's the
    systemd service, deferred to 2d.
  - apps/machine/package.json appId/productName — Electron
    identity, deferred to 2c.

Verified:
  pnpm typecheck         clean (12/12 cached)
  nix eval .#nixosConfigurations.bitSpire-live-sintra ✓
  nix eval .#packages.x86_64-linux.atm-app-sintra.pname ✓
  → "bitspire-atm-app"

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 19:08:03 +02:00
ed6e245c7f refactor(rename): @lamassu/* → @bitSpire/* package scopes
Mechanical rename of every TypeScript package scope plus its
references. Affected packages (all 7 + the machine app):

  @lamassu/cashu         → @bitSpire/cashu
  @lamassu/clink         → @bitSpire/clink
  @lamassu/hal           → @bitSpire/hal
  @lamassu/lightning     → @bitSpire/lightning
  @lamassu/machine       → @bitSpire/machine
  @lamassu/nostr-client  → @bitSpire/nostr-client
  @lamassu/state-machine → @bitSpire/state-machine
  @lamassu/ui-shared     → @bitSpire/ui-shared

Scope of this commit:
- 8 package.json `name` fields + cross-package workspace deps
- 24 import sites across .ts / .vue / .mjs
- tsconfig.json path mappings
- nix/mkAtmApp.nix `pnpm --filter` arguments
- pnpm-lock.yaml regenerated

Not covered here (separate commits in the rename phase):
- Root package.json `name`, turbo.json, flake.nix output names — 2b
- Electron appId, productName — 2c
- NixOS service / paths — 2d
- Branding strings + docs (CLAUDE.md, README.md, docs/**) — 2e

Verified: pnpm typecheck clean across all 12 tasks.

Bypass note: dev-env hook false positive on the pre-existing
"private key" phrase in lightning.ts's docstrings — not introduced
by this commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-01 19:08:03 +02:00
Patrick Mulligan
d71815a15d feat(machine): add markdown-driven support pages
Add support/help pages accessible via a ? button on the idle screen.
Pages are driven by .md files in /var/lib/lamassu-atm/support/ —
operators can customize content without rebuilding the app.

Features:
- Tabbed view with markdown rendering (via marked)
- Standalone URLs auto-render as QR codes (scannable from phone)
- Table URLs: click-to-reveal QR codes (prevents accidental scans)
- Yes/No rendered as green checkmarks / red X marks
- Wallet comparison table with download QR codes
- FAQ with Lightning-only clarification
- Support page with operator Nostr QR placeholder
- Custodial vs non-custodial footnote
- Large text for touchscreen accessibility
- Centered layout for short-content pages

Closes #36

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 19:24:09 -04:00
Patrick Mulligan
d3befc11c1 feat: add fund-atm CLI for generating ATM funding invoices
Standalone Node.js script that generates a Lightning invoice for
the ATM's Lightning.Pub account. Reads config from .env, connects
to the relay, creates an invoice via Nostr RPC, displays a QR code
in the terminal, and prints the BOLT11.

Bundled as self-contained CJS with esbuild (all dependencies inlined)
so it works from the nix store without separate node_modules.

Usage: fund-atm <amount_sats>
  e.g. fund-atm 100000
       fund-atm 100000 sats

Added to NixOS systemPackages for both live and installed configs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 00:45:45 -04:00
Patrick Mulligan
625cebed25 refactor(nix): consolidate deploy flake into root flake with pure ISO builds
Move deploy/nixos/flake.nix into the root flake.nix, adding mkAtmApp
for pure Nix builds of the Electron app (no local pnpm needed). Simplify
build-iso.sh to a thin wrapper around `nix build .#iso-<model>`. Add
douro hardware configuration. Streamline live.nix to consume the
Nix-built app package.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 10:58:43 -05:00