The currencies this store can hold money in, as a registry.
A currency is its id, the number of decimal places its minor unit represents, and whether it is settled on a chain or by a processor. Adding one is a map entry — nothing below this namespace branches on which currency it is.
The currencies this store can hold money in, as a registry. A currency is its id, the number of decimal places its minor unit represents, and whether it is settled on a chain or by a processor. Adding one is a map entry — nothing below this namespace branches on which currency it is.
(->display currency-id amount)amount minor units of currency-id as a fixed-point string.
Display only: every decision in this store is made on the integer.
`amount` minor units of `currency-id` as a fixed-point string. Display only: every decision in this store is made on the integer.
(->minor-units currency-id x)The decimal string or number x as minor units of currency-id.
Rounds half up, because this is only ever used on operator input and a configured price — never on money that has already moved.
The decimal string or number `x` as minor units of `currency-id`. Rounds half up, because this is only ever used on operator input and a configured price — never on money that has already moved.
Currencies every deployment starts with. :currency/scale is how many
decimal places one major unit is divided into: piconero for XMR, cents for
the fiat pair, satoshi for BTC.
Currencies every deployment starts with. `:currency/scale` is how many decimal places one major unit is divided into: piconero for XMR, cents for the fiat pair, satoshi for BTC.
(register! {:currency/keys [id scale] :as spec})Register spec under its :currency/id. Returns the spec.
Register `spec` under its `:currency/id`. Returns the spec.
(registered)Ids of every registered currency.
Ids of every registered currency.
(scale currency-id)Decimal places currency-id's minor unit represents, or nil when unknown.
Decimal places `currency-id`'s minor unit represents, or nil when unknown.
(spec currency-id)Registered spec for currency-id, or nil.
Registered spec for `currency-id`, or nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |