Show HN: Bankster – "money as data" toolkit for Clojure (registry, bigdec, EDN)
github.comHi HN,
I built Bankster, a Clojure library for working with money and currencies, with explicit behavior contracts.
It’s "money as data": Money = (Currency, BigDecimal amount), and currencies are managed via a registry (global / dynamically scoped / local) that can represent ISO 4217, crypto, and custom currencies – including deterministic conflict resolution for currency codes.
Highlights:
* BigDecimal everywhere; scale/rounding under control (including non-terminating divisions via rescaling/rounding policies)
* ISO 4217 + crypto + custom currencies (namespaced IDs like crypto/ETH)
* Sum-preserving allocation/distribution ("no lost pennies")
* EDN-friendly: tagged literals #money, #currency, data readers; JSON/EDN serialization
* Operator layer: money.ops and money.inter-ops
I’d love feedback on the contracts, API ergonomics, and the registry approach. Bankster is a money/currency toolkit (not a ledger, not market data). I needed one coherent model for ISO + custom + crypto currencies, and I wanted the semantics to be "data-first" and predictable – i.e., behavior contracts instead of implicit assumptions. Docs: README: https://cljdoc.org/d/io.randomseed/bankster/2.1.1/doc/readme Contracts: https://cljdoc.org/d/io.randomseed/bankster/2.1.1/doc/bankst...