Bankster Front API
This document describes the front API exposed by io.randomseed.bankster.api.*. It is a curated, stable facade over the core namespaces (currency, money, registry) and should be the default entry point for application code.
Frozen API for major 2:
io.randomseed.bankster.api.v2and its sub-namespaces mirrorio.randomseed.bankster.api.*for the Bankster 2.x line.- When Bankster 3 appears, the v2 API will remain available for compatibility.
- In the current release,
io.randomseed.bankster.api.v2.*is equivalent toio.randomseed.bankster.api.*.
Note: this is an overview, not an exhaustive arity-level reference.
Namespaces
io.randomseed.bankster.api- umbrella facade (money/currency/scale helpers).io.randomseed.bankster.api.currency- currency resolution, predicates, registry operations, and serialization helpers.io.randomseed.bankster.api.money- money constructors, arithmetic, parsing/formatting, and serialization helpers.io.randomseed.bankster.api.registry- registry helpers (default/state/with, hierarchy helpers) plus selected registry aliases.io.randomseed.bankster.api.ops- operator-style functions intended for intentional:refer :all.
Soft vs strict
- Strict functions throw on missing currency/registry matches.
- Soft functions return
nilwhen no match is found.
Examples:
api.currency/resolve(strict) vsapi.currency/resolve-try(soft)api.money/resolve(strict) vsapi.money/resolve-try(soft)
io.randomseed.bankster.api (umbrella)
money,money-try- front constructors for Money (strict/soft).currency- front constructor for Currency (strict).rounding-mode,scale-apply,amount,scale,auto-scaled?- convenience helpers overscale.info- polymorphic info helper (currency/info/money/info).
io.randomseed.bankster.api.currency
Resolution / constructors
resolve,resolve-try,resolve-all,newof(macro alias),normalizewith,with-default,with-registry
Accessors
id,id-str,code,code-str,nr,scale,domain,kind,symbolinfo,to-map(and JSON/EDN helpers)
Predicates / traits / kinds
currency?,possible?,definitive?,auto-scaled?,crypto?,iso?has-trait?,of-trait?,has-kind?,of-kind?,of-domain?
Registry operations
register,register!,unregister,unregister!add-traits,set-traits,remove-traits
io.randomseed.bankster.api.money
Constructors / coercion
resolve,resolve-trymajor,minor,of-registry,cast,cast-tryamount,currency,info,normalizerounding-mode,scale-apply
Arithmetic
add,sub,mul,divround,round-to,allocate,distribute
Comparisons / predicates
compare,eq?,ne?,gt?,ge?,lt?,le?pos?,neg?,zero?,same-currencies?
Parsing / formatting
parse,parse-major,parse-minorformat,unparse
Serialization
to-map,to-json-string,from-json,from-edn, etc.
io.randomseed.bankster.api.registry
default,or-defaultwith,statehierarchy-derive,hierarchy-derive!- plus selected aliases to registry helpers (see public vars in the namespace).
io.randomseed.bankster.api.ops
Operator-style functions aligned with core arithmetic and comparisons:
+,-,*,/=,not=,<,<=,>,>=pos?,neg?,compare, numeric casts
Use this namespace when you intentionally want :refer :all.
Notes
- Prefer
api.*in application code for stability and ergonomics. - The core namespaces (
io.randomseed.bankster.money,currency,registry) remain available for lower-level control and internal use.