Show HN: Bankster – "money as data" toolkit for Clojure (registry, bigdec, EDN) (github.com)

1 points by siefca ↗ HN
Hi 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.

1 comment

[ 87.2 ms ] story [ 20.2 ms ] thread