# taler-bank maintenance

One-shot ops tools for **libeufin-bank** on koopa (`taler-hacktivism-bank`).  
Pattern matches **mytops-admin-log** `scripts/taler-merchant/maintenance/`: **dry-run by default**, `--no-dry` to apply.

## `raise-debit-limits.sh`

Raise **`debit_threshold`** on every bank account (overdraft / withdraw headroom).  
Optionally set **`DEFAULT_DEBT_LIMIT`** for new accounts.

| | |
|--|--|
| **Default amount** | `GOA:4503599627370496` (libeufin amount ceiling ≈ 2⁵²) |
| **Auth** | admin password: `BANK_ADMIN_PASS` or `bank-admin-password.txt` |
| **Bank** | `http://127.0.0.1:9012` on koopa, or `podman exec` into `taler-hacktivism-bank` |

### Usage

```bash
# on koopa (hernani), after bank is up:
cd ~/path/to/koopa-admin-log   # or copy script

# preview
./scripts/taler-bank/maintenance/raise-debit-limits.sh

# apply to all accounts
./scripts/taler-bank/maintenance/raise-debit-limits.sh --no-dry

# apply + DEFAULT_DEBT_LIMIT in container overrides + bank restart
./scripts/taler-bank/maintenance/raise-debit-limits.sh --no-dry --set-default

# custom amount / single user
./scripts/taler-bank/maintenance/raise-debit-limits.sh --no-dry --amount GOA:1000000 --only explorer
```

Via container if host cannot reach :9012:

```bash
podman exec -u root -i taler-hacktivism-bank bash -s -- --no-dry \
  < scripts/taler-bank/maintenance/raise-debit-limits.sh
```

### Notes

- Does **not** invent balance; only raises how far accounts may go into **debit**.
- Exchange coin denominations (largest `GOA:1000`) are separate — large withdraws still work with many coins.
- Secrets never live in this repo — see `SECRETS.md` / `koopa-admin-secrets`.
