# Bend Bank

A web bank written in [Bend](https://github.com/HigherOrderCO/Bend).
Its rules are laws, proven about the very function that answers every
request: https://bank.bend-lang.com.

- `bank.bend`: accounts, payments, loans and escrow.
- `web.bend`: requests and pages. `Web.serve` answers every request.
- `LAWS.bend`: the laws. `proof/`: a proof of each, from `proof/base.bend`.
  `bend PROOF.bend --verdict` checks them all.
- `host.mjs`: moves bytes between sockets and `Web.serve`, and keeps the
  log of every request that changed the bank.
- `check/run.sh`: the gate before every deploy. It checks the proofs and
  tests the compiled JavaScript against Bend's own evaluator and against
  the CakeML binary built from `cml/`.
- `deploy.sh staging|prod js|cml`: ships what the gate checked, served by
  node or by the CakeML binary.
