Bankster 2.2.4
Money as data, done right.
Installation
To install, add the following dependency to your project or build file:
[io.randomseed/bankster "2.2.4"]
Topics
- Introduction
- Sneak peeks
- Bankster Front API
- Bankster Contracts
- Data Structures
- Currency kinds
- Currency traits
- Example EDN config
- Serialization
- Apache License, v2.0
- LGPL License, v3 or later
Namespaces
io.randomseed.bankster.api.currency
Bankster library, front API currency helpers.
Public variables and functions:
- ->edn
- ->json
- ->map
- add-countries
- add-countries!
- add-localized-properties
- add-localized-props!
- add-traits
- add-traits!
- add-weighted-code
- all
- asset?
- attempt
- attempt*
- auto-scaled
- auto-scaled?
- big?
- claim?
- clear-weight
- clear-weight!
- code
- code-literal
- code-str
- codes
- commodity?
- config->registry
- countries
- credit?
- crypto?
- currency?
- data-literal
- decentralised?
- decentralized?
- default-registry
- defined?
- definitive?
- display-name
- display-name-native
- domain
- domains
- experimental?
- fiat?
- fiduciary?
- formatter
- formatter-extended
- from-edn
- from-edn-text
- from-json
- from-json-text
- funds?
- has-country?
- has-domain?
- has-kind?
- has-numeric-id?
- has-trait?
- id
- id-str
- ids
- in-domain?
- info
- iso-legacy?
- iso-possible?
- iso-strict-code?
- iso-strict?
- iso?
- java
- java-all-set
- kind
- kinds
- legacy?
- localized-properties
- localized-property
- map->new
- metal?
- Monetary
- name
- name-native
- new
- new-currency
- no-numeric-id
- none?
- normalize
- nr
- ns
- ns-code
- null?
- numeric
- numeric-id
- numeric-ids
- numerics
- of
- of-country
- of-domain
- of-domain?
- of-id
- of-kind
- of-kind?
- of-trait?
- official?
- old?
- peg?
- possible?
- present?
- real?
- referenced?
- register
- register!
- registry-or-default
- remove-countries
- remove-countries!
- remove-localized-properties
- remove-localized-props!
- remove-traits
- remove-traits!
- resolve
- resolve-all
- resolve-try
- same-ids?
- sc
- scale
- set-default!
- set-default-registry!
- set-traits
- set-traits!
- set-weight
- set-weight!
- special?
- stable?
- staked?
- standard?
- symbol
- symbol-native
- test?
- to-code
- to-code-str
- to-currency
- to-edn-map
- to-edn-string
- to-id
- to-id-str
- to-json-map
- to-json-string
- to-map
- to-numeric-id
- traits
- traits-expanded
- unit
- unit-try
- unregister
- unregister!
- unset-default!
- update
- update!
- val-auto-scaled*?
- val-auto-scaled?
- virtual?
- weight
- with
- with-attempt
- with-default
- with-registry
- with-weight
- wrapped?
io.randomseed.bankster.api.money
Bankster library, front API money helpers.
Public variables and functions:
- *
- +
- -
- ->clojure-symbol
- ->double
- ->edn
- ->float
- ->json
- ->LastMoney
- ->map
- ->symbol
- /
- <
- <=
- =
- ==
- >
- >=
- abs
- Accountable
- add
- add-major
- add-minor
- add-scaled
- allocate
- amount
- apply
- auto-scaled?
- cast
- cast-try
- code-literal
- code-readers
- compare
- compare-amounts
- convert
- currency
- data-literal
- data-readers
- dec-major
- dec-minor
- default-registry
- defliteral
- distribute
- div
- div-rem
- div-scaled
- eq-am?
- eq?
- format
- format-with
- from-edn
- from-edn-text
- from-json
- from-json-map
- from-json-string
- from-json-text
- ge?
- gt?
- inc-major
- inc-minor
- info
- is-neg-or-zero?
- is-neg?
- is-pos-or-zero?
- is-pos?
- is-zero?
- le?
- lt?
- major
- major->int
- major->long
- major-minor
- major-minor->int
- major-minor->long
- major-of
- major-value
- map->LastMoney
- max
- max-amount
- min
- min-amount
- minor
- minor->int
- minor->long
- minor-of
- minor-value
- money?
- mul
- mul-scaled
- ne-am?
- ne?
- neg
- neg-or-zero?
- neg?
- normalize
- not=
- not==
- of
- of-major
- of-map
- of-minor
- of-registry
- on-amount
- parse
- parse-major
- parse-minor
- pos
- pos-or-zero?
- pos?
- readers
- registry-or-default
- rem
- rescale
- rescaled?
- resolve
- resolve-try
- round
- round-to
- rounding-mode
- same-currencies?
- same-currency-ids?
- scale
- scale-apply
- set-amount
- split-scale-int
- strip
- stripped-amount
- sub
- sub-major
- sub-minor
- sub-scaled
- to-json-map
- to-json-string
- to-map
- to-units
- unparse
- value
- with-currency
- with-registry
- with-rescaling
- with-rounding
- zero?
io.randomseed.bankster.api.ops
Bankster library, front API money-aware operators.
io.randomseed.bankster.api.registry
Bankster library, front API registry helpers.
Public variables and functions:
io.randomseed.bankster.api.v2.currency
Bankster library, front API version 2 currency helpers.
Public variables and functions:
- ->edn
- ->json
- ->map
- add-countries
- add-countries!
- add-localized-properties
- add-localized-props!
- add-traits
- add-traits!
- add-weighted-code
- all
- asset?
- attempt
- attempt*
- auto-scaled
- auto-scaled?
- big?
- claim?
- clear-weight
- clear-weight!
- code
- code-literal
- code-str
- codes
- commodity?
- config->registry
- countries
- credit?
- crypto?
- currency?
- data-literal
- decentralised?
- decentralized?
- default-registry
- defined?
- definitive?
- display-name
- display-name-native
- domain
- domains
- experimental?
- fiat?
- fiduciary?
- formatter
- formatter-extended
- from-edn
- from-edn-text
- from-json
- from-json-text
- funds?
- has-country?
- has-domain?
- has-kind?
- has-numeric-id?
- has-trait?
- id
- id-str
- ids
- in-domain?
- info
- iso-legacy?
- iso-possible?
- iso-strict-code?
- iso-strict?
- iso?
- java
- java-all-set
- kind
- kinds
- legacy?
- localized-properties
- localized-property
- map->new
- metal?
- Monetary
- name
- name-native
- new
- new-currency
- no-numeric-id
- none?
- normalize
- nr
- ns
- ns-code
- null?
- numeric
- numeric-id
- numeric-ids
- numerics
- of
- of-country
- of-domain
- of-domain?
- of-id
- of-kind
- of-kind?
- of-trait?
- official?
- old?
- peg?
- possible?
- present?
- real?
- referenced?
- register
- register!
- registry-or-default
- remove-countries
- remove-countries!
- remove-localized-properties
- remove-localized-props!
- remove-traits
- remove-traits!
- resolve
- resolve-all
- resolve-try
- same-ids?
- sc
- scale
- set-default!
- set-default-registry!
- set-traits
- set-traits!
- set-weight
- set-weight!
- special?
- stable?
- staked?
- standard?
- symbol
- symbol-native
- test?
- to-code
- to-code-str
- to-currency
- to-edn-map
- to-edn-string
- to-id
- to-id-str
- to-json-map
- to-json-string
- to-map
- to-numeric-id
- traits
- traits-expanded
- unit
- unit-try
- unregister
- unregister!
- unset-default!
- update
- update!
- val-auto-scaled*?
- val-auto-scaled?
- virtual?
- weight
- with
- with-attempt
- with-default
- with-registry
- with-weight
- wrapped?
io.randomseed.bankster.api.v2.money
Bankster library, front version 2 API money helpers.
Public variables and functions:
- *
- +
- -
- ->clojure-symbol
- ->double
- ->edn
- ->float
- ->json
- ->LastMoney
- ->map
- ->symbol
- /
- <
- <=
- =
- ==
- >
- >=
- abs
- Accountable
- add
- add-major
- add-minor
- add-scaled
- allocate
- amount
- apply
- auto-scaled?
- cast
- cast-try
- code-literal
- code-readers
- compare
- compare-amounts
- convert
- currency
- data-literal
- data-readers
- dec-major
- dec-minor
- default-registry
- defliteral
- distribute
- div
- div-rem
- div-scaled
- eq-am?
- eq?
- format
- format-with
- from-edn
- from-edn-text
- from-json
- from-json-map
- from-json-string
- from-json-text
- ge?
- gt?
- inc-major
- inc-minor
- info
- is-neg-or-zero?
- is-neg?
- is-pos-or-zero?
- is-pos?
- is-zero?
- le?
- lt?
- major
- major->int
- major->long
- major-minor
- major-minor->int
- major-minor->long
- major-of
- major-value
- map->LastMoney
- max
- max-amount
- min
- min-amount
- minor
- minor->int
- minor->long
- minor-of
- minor-value
- money?
- mul
- mul-scaled
- ne-am?
- ne?
- neg
- neg-or-zero?
- neg?
- normalize
- not=
- not==
- of
- of-major
- of-map
- of-minor
- of-registry
- on-amount
- parse
- parse-major
- parse-minor
- pos
- pos-or-zero?
- pos?
- readers
- registry-or-default
- rem
- rescale
- rescaled?
- resolve
- resolve-try
- round
- round-to
- rounding-mode
- same-currencies?
- same-currency-ids?
- scale
- scale-apply
- set-amount
- split-scale-int
- strip
- stripped-amount
- sub
- sub-major
- sub-minor
- sub-scaled
- to-json-map
- to-json-string
- to-map
- to-units
- unparse
- value
- with-currency
- with-registry
- with-rescaling
- with-rounding
- zero?
io.randomseed.bankster.api.v2.ops
Bankster library, front API version 2 money-aware operators.
io.randomseed.bankster.api.v2.registry
Bankster library, front API version 2 registry helpers.
Public variables and functions:
io.randomseed.bankster.config
Bankster library, configuration handling.
Public variables and functions:
io.randomseed.bankster.currency
Bankster library, currency operations.
Public variables and functions:
- *default*
- add-countries
- add-countries!
- add-localized-properties
- add-localized-props!
- add-traits
- add-traits!
- add-weighted-code
- all
- asset?
- attempt
- attempt*
- auto-scaled
- auto-scaled?
- big?
- claim?
- clear-weight
- clear-weight!
- code
- code-literal
- codes
- commodity?
- config->registry
- countries
- credit?
- crypto?
- currency?
- data-literal
- decentralised?
- decentralized?
- display-name
- display-name-native
- domain
- domains
- experimental?
- fiat?
- fiduciary?
- formatter
- formatter-extended
- funds?
- has-country?
- has-domain?
- has-kind?
- has-numeric-id?
- has-trait?
- ids
- in-domain?
- info
- iso-legacy?
- iso-possible?
- iso-strict-code?
- iso-strict?
- iso?
- java
- java-all-set
- kind
- kinds
- legacy?
- localized-properties
- localized-property
- map->new
- metal?
- Monetary
- name
- name-native
- new
- new-currency
- no-numeric-id
- none?
- nr
- ns
- ns-code
- null?
- numeric
- numeric-id
- numeric-ids
- numerics
- of
- of-country
- of-domain
- of-domain?
- of-kind?
- of-trait?
- official?
- old?
- peg?
- possible?
- real?
- referenced?
- register
- register!
- remove-countries
- remove-countries!
- remove-localized-properties
- remove-localized-props!
- remove-traits
- remove-traits!
- same-ids?
- sc
- scale
- set-default!
- set-default-registry!
- set-traits
- set-traits!
- set-weight
- set-weight!
- special?
- stable?
- staked?
- standard?
- symbol
- symbol-native
- test?
- to-edn-map
- to-edn-string
- to-json-map
- to-json-string
- traits
- traits-expanded
- unit-try
- unregister
- unregister!
- unset-default!
- update
- update!
- val-auto-scaled*?
- val-auto-scaled?
- virtual?
- weight
- with
- with-attempt
- with-registry
- with-weight
- wrapped?
io.randomseed.bankster.init
Bankster library, registry initialization helpers.
Public variables and functions:
io.randomseed.bankster.jsr-354
JSR-354 (javax.money) naming-compatible façade for Bankster.
Public variables and functions:
- ->MonetaryContext
- abs
- add
- attr-amount-type
- attr-fixed-scale
- attr-max-scale
- attr-number-type
- attr-precision
- compare-to
- compareTo
- context
- create
- divide
- get-currencies
- get-currency
- get-currency-code
- get-default-fraction-digits
- get-default-rounding
- get-number
- get-number-stripped
- get-numeric-code
- getCurrencies
- getCurrency
- getCurrencyCode
- getDefaultFractionDigits
- getDefaultRounding
- getNumber
- getNumberStripped
- getNumericCode
- is-equal-to
- is-greater-than
- is-greater-than-or-equal-to
- is-less-than
- is-less-than-or-equal-to
- is-negative
- is-negative-or-zero
- is-positive
- is-positive-or-zero
- is-zero
- isEqualTo
- isGreaterThan
- isGreaterThanOrEqualTo
- isLessThan
- isLessThanOrEqualTo
- isNegative
- isNegativeOrZero
- isPositive
- isPositiveOrZero
- isZero
- map->MonetaryContext
- multiply
- negate
- plus
- query
- remainder
- signum
- strip-trailing-zeros
- stripTrailingZeros
- subtract
- with
- with-context
- withContext
io.randomseed.bankster.money
Bankster library, money operations.
Public variables and functions:
- *
- +
- -
- ->clojure-symbol
- ->double
- ->float
- ->LastMoney
- ->symbol
- /
- <
- <=
- =
- ==
- >
- >=
- abs
- Accountable
- add
- add-major
- add-minor
- add-scaled
- allocate
- amount
- apply
- auto-scaled?
- code-literal
- code-readers
- compare
- compare-amounts
- convert
- currency
- data-literal
- data-readers
- dec-major
- dec-minor
- defliteral
- distribute
- div
- div-rem
- div-scaled
- eq-am?
- eq?
- format
- format-with
- from-json-map
- from-json-string
- ge?
- gt?
- inc-major
- inc-minor
- info
- is-neg-or-zero?
- is-neg?
- is-pos-or-zero?
- is-pos?
- is-zero?
- le?
- lt?
- major
- major->int
- major->long
- major-minor
- major-minor->int
- major-minor->long
- major-value
- map->LastMoney
- max
- max-amount
- min
- min-amount
- minor
- minor->int
- minor->long
- minor-value
- money?
- mul
- mul-scaled
- ne-am?
- ne?
- neg
- neg-or-zero?
- neg?
- not=
- not==
- of
- of-major
- of-map
- of-minor
- of-registry
- on-amount
- pos
- pos-or-zero?
- pos?
- readers
- rem
- rescale
- rescaled?
- round
- round-to
- same-currencies?
- same-currency-ids?
- scale
- set-amount
- split-scale-int
- strip
- stripped-amount
- sub
- sub-major
- sub-minor
- sub-scaled
- to-json-map
- to-json-string
- to-map
- to-units
- unparse
- with-currency
- with-rescaling
- with-rounding
- zero?
io.randomseed.bankster.money.inter-ops
Bankster library, transparent wrappers for money operations.
io.randomseed.bankster.money.ops
Bankster library, wrappers for money operations.
io.randomseed.bankster.registry
Bankster, registry management.
Public variables and functions:
- *default*
- *warn-on-inconsistency*
- *warnings-logger*
- country-id->currency
- country-id->currency*
- currency-code->currencies
- currency-code->currencies*
- currency-domain->currencies
- currency-domain->currencies*
- currency-id->country-ids
- currency-id->country-ids*
- currency-id->currency
- currency-id->currency*
- currency-id->localized
- currency-id->localized*
- currency-id->traits
- currency-id->traits*
- currency-id->weight
- currency-id->weight*
- currency-nr->currencies
- currency-nr->currencies*
- currency-nr->currency
- currency-nr->currency*
- default-version
- ext
- ext*
- get
- global
- hierarchies
- hierarchies*
- hierarchy
- hierarchy*
- hierarchy-derive
- hierarchy-derive!
- inconsistency-warning
- new
- new-registry
- R
- registry?
- set!
- state
- update
- update!
- version
- version*
- with
io.randomseed.bankster.scale
Bankster library, scalable protocol with implementation.
Public variables and functions:
- *each*
- *rounding-mode*
- ->double
- ->float
- ->int
- ->long
- auto-scaled
- auto-scaled*?
- auto-scaled?
- auto?
- div-math-context
- div-max-precision
- each
- fractional
- integer
- monetary-scale
- ROUND_CEILING
- ROUND_DOWN
- ROUND_FLOOR
- ROUND_HALF_DOWN
- ROUND_HALF_EVEN
- ROUND_HALF_UP
- ROUND_UNNECESSARY
- ROUND_UP
- Scalable
- to-clojure-string
- to-clojure-symbol
- to-plain-string
- to-symbol
- unscaled-context
- with
- with-rescaling
- with-rounding
io.randomseed.bankster.serializers.common
Bankster library, shared serialization helpers.
Public variables and functions:
io.randomseed.bankster.serializers.edn
Bankster library, EDN-oriented serialization helpers.
Public variables and functions:
io.randomseed.bankster.serializers.json
Bankster library, JSON-oriented serialization helpers.
Public variables and functions:
- currency->json-full-map
- currency->json-map
- currency->json-string
- json-map->currency
- json-map->money
- json-string->currency
- json-string->money
- json-text->currency
- json-text->money
- JsonDeserializable
- JsonSerializable
- money->json-full-map
- money->json-map
- money->json-string
- money-codec
- register-cheshire-codecs!
io.randomseed.bankster.util
Support functions and macros.
Public variables and functions:
- auto-alias
- bytes-concat
- bytes-to-string
- bzero
- char-ranges->set
- count-digits
- current-thread
- current-thread-id
- current-thread-name
- ensure-keyword
- ensure-keyword-having-ns
- gen-digits
- get-rand-int
- get-rand-nth
- inferred-contains?
- inferred-get
- is
- is-not
- juxt-seq
- keep-in-set-where
- lazy-iterator-seq
- must-have-ns
- ns-infer
- random-digits-len
- remove-from-set-where
- replace-in-set
- some-string
- split-on-first-slash
- split-on-last-slash
- text-to-bytes
- to-bytes
- to-long
- try-null
- try-parse-int
- try-parse-long
- try-upper-case
- uuid
- when-not-empty
- with-not-empty
io.randomseed.bankster.util.fs
Support functions and macros, filesystem operations.
io.randomseed.bankster.util.importer
Bankster library, import-export operations.
Public variables and functions:
- countries-load
- currencies-load
- currency->map
- default-countries-csv
- default-currencies-csv
- default-data-reader-filename
- default-dump-filename
- default-export-currency-oriented-filename
- default-export-filename
- default-handlers-namespace
- default-handlers-pathname
- default-legacy-weight
- default-reader-filenames
- default-resource-must-exist-file
- default-resource-name
- dump
- edn-import
- export
- export-currency-oriented
- handler-gen
- import-seed
- joda->bankster-dump
- joda->bankster-export
- joda-import
- localized->map
- map->currency-oriented
- merge-registry
- readers-export
- registry->map
- registry->map-currency-oriented
- seed-import
- traits->map
io.randomseed.bankster.util.map
Public variables and functions:
- assoc-if
- assoc-if-key
- assoc-if-not
- assoc-if-not-key
- dissoc-in
- invert-in-sets
- lazy-get
- map-keys
- map-keys-and-vals
- map-keys-by-v
- map-of-sets-invert
- map-of-vectors-invert-flatten
- map-vals
- map-vals-by-k
- map-vals-by-kv
- map-values
- remove-by-if-value-in
- remove-empty-values
- remove-except
- remove-if-value
- remove-if-value-in
- remove-if-value-not-in
- remove-keys-ns
- update-existing
- update-missing
- update-values
- update-values-recur