koopa-admin-log/configs/bank-landing
Hernâni Marques 5af039ca03
bank landing: one-step withdraw-exchange + Android/iOS links
Short intro; wallet install; single taler://withdraw-exchange QR.
2026-07-10 18:05:00 +02:00
..
index.html bank landing: one-step withdraw-exchange + Android/iOS links 2026-07-10 18:05:00 +02:00
nginx-cors-stats.conf bank landing: nginx :9013 + English intro (stats placeholders) 2026-07-09 10:44:08 +02:00
nginx-landing.conf bank landing: nginx :9013 + English intro (stats placeholders) 2026-07-09 10:44:08 +02:00
privacy.html bank landing: nginx :9013 + English intro (stats placeholders) 2026-07-09 10:44:08 +02:00
qrcode.min.js bank: English landing with taler withdraw QR 2026-07-09 03:24:03 +02:00
README.md bank landing: one-step withdraw-exchange + Android/iOS links 2026-07-10 18:05:00 +02:00
terms.html bank landing: nginx :9013 + English intro (stats placeholders) 2026-07-09 10:44:08 +02:00

Bank landing (bank.hacktivism.ch)

English intro for GOA exploration: put coins in a GNU Taler wallet, optionally open your own bank account, and point merchants at taler.hacktivism.ch.

Public URL What
https://bank.hacktivism.ch/ · /intro/ Landing (nginx in bank container → host 9013, Caddy)
https://bank.hacktivism.ch/intro/stats.json Live stats (written inside bank container)
https://bank.hacktivism.ch/webui/ libeufin-bank SPA (register · login · withdraw) when libeufin is up on 9012
https://exchange.hacktivism.ch/ Exchange (ToS /terms, keys /keys)
https://taler.hacktivism.ch/ Merchant backend

User flow (documented on the page)

Same one-step pattern as taler-ops.ch Android/iOS guides:

  1. Install wallet — Android (Play Store / F-Droid) and iOS (App Store), plus hub wallet.taler.net.
  2. One QR / linktaler://withdraw-exchange/exchange.hacktivism.ch/
    Adds the GOA exchange and starts withdrawal (accept ToS → enter amount).

The old two-step path (taler://add-exchange/… + demo taler://withdraw/… from withdraw.uri) is removed from the landing.

Optional: bank UI (/webui/) and merchant (taler.hacktivism.ch) stay further down.

CLI sketch (fresh wallet DB)

# equivalent one-step in CLI terms:
taler-wallet-cli exchanges add https://exchange.hacktivism.ch/
taler-wallet-cli exchanges accept-tos https://exchange.hacktivism.ch/
# then withdraw from the exchange (amount chosen in wallet UI)

Live stats (in bank container)

Stats are not computed on the laptop or host browser. A small script runs inside the bank container, queries libeufin for the demo funding account (explorer), and writes a public JSON file next to the landing assets.

Piece Path / role
Generator (in-container) /usr/local/bin/landing-stats.sh
Source in admin-log scripts/taler-bank/landing-stats.sh
Host installer scripts/taler-bank/landing-stats-install.sh
Output /var/www/bank-landing/stats.jsonhttps://bank.hacktivism.ch/intro/stats.json
Landing UI index.html section GOA flow · live

What the page shows

  • Bank accounts — registered accounts (libeufin GET /accounts, admin)
  • Wallets involved — unique reserve pubs from Taler withdrawal debits (≈ individual wallet withdraws)
  • Withdraws / total out — customer debit withdrawals only (exchange mirror skipped)
  • Last withdraws — recent list with amount, time (CEST / Europe/Zurich), bank username
  • Last 24h / 7d — count · amount
  • Footer: updated time (CEST), user-account count, accounts that funded withdraws — no “demo QR / pool explorer”

stats.json shape (abridged)

{
  "ok": true,
  "currency": "GOA",
  "generated_at": "2026-07-09T18:55Z",
  "account": "explorer",
  "balance": "GOA:960",
  "withdraws": {
    "count": 4,
    "total_amount": "GOA:40",
    "last_amount": "GOA:10",
    "last_at": "2026-07-09T08:49Z",
    "last_24h": { "count": 2, "amount": "GOA:20" },
    "last_7d": { "count": 4, "amount": "GOA:40" }
  },
  "flow": {
    "debits_scanned": "GOA:40",
    "credits_scanned": "GOA:1000",
    "tx_scanned": 5
  },
  "demo": {
    "uri": "taler://withdraw/…",
    "amount": "GOA:10",
    "status": "confirmed",
    "ready": false
  },
  "source": "in-container landing-stats.sh"
}

Install + refresh (on koopa host)

# from laptop: copy scripts, then on koopa:
cd /path/to/koopa-admin-log/scripts/taler-bank

# copy into container + one-shot run
sudo ./landing-stats-install.sh

# every minute inside the container (* * * * *)
sudo ./landing-stats-install.sh --cron
# optional: LANDING_STATS_CRON='*/5 * * * *' ./landing-stats-install.sh --cron

# later: only re-run
sudo ./landing-stats-install.sh --run-only

Requirements inside the container:

  • curl, awk (mawk OK), sed, dateno python
  • libeufin-bank listening on loopback (script auto-detects PORT / 9012 / 8080)
  • /root/bank-explorer-password.txt (or BANK_PASS=… on the podman exec)
  • writable /var/www/bank-landing/ (same tree nginx uses for /intro/)

make-demo-withdraw-qr.sh also calls landing-stats.sh after refreshing the demo URI, when the binary is already installed at /usr/local/bin/landing-stats.sh.

Manual one-liner (debug)

podman exec -e LANDING_DIR=/var/www/bank-landing taler-hacktivism-bank \
  /usr/local/bin/landing-stats.sh
curl -sS https://bank.hacktivism.ch/intro/stats.json | python3 -m json.tool

Host / container files

Landing root (nginx in bank container), typically under something like /var/www/bank-landing/ or the container path mapped for 9013:

File Role
index.html landing (steps + stats panel)
qrcode.min.js QR helper
stats.json live stats (from in-container script)
withdraw.uri current demo taler://withdraw/… (optional)
withdraw.amount e.g. GOA:10 (optional)
withdraw-watch.ids ids for auto-confirm helper (optional)

Deploy landing HTML

# from laptop (example) — path depends on where nginx in the bank container reads from
scp koopa-admin-log/configs/bank-landing/index.html \
  koopa-admin-log/configs/bank-landing/qrcode.min.js \
  hernani@koopa:/tmp/bank-landing/
# then copy into the bank container / host path used by nginx :9013
podman cp /tmp/bank-landing/index.html taler-hacktivism-bank:/var/www/bank-landing/index.html

Demo QR refresh (in container, no python)

podman exec taler-hacktivism-bank /usr/local/bin/refresh-demo-withdraw.sh
# source: scripts/taler-bank/refresh-demo-withdraw.sh

Older host script (needs python3): scripts/taler-bank/make-demo-withdraw-qr.sh