wallet-kit.git
the wallet layer of the ardegazu.ro suite — signed payment artifacts and a personal ledger, so any app can hold a balance and take a payment without replicating a bank's log.
Clone
git clone https://git.ardegazu.ro/wallet-kit.git
or browse the code right here, in the browser.
Use as a dependency
"ardegazu-wallet-kit": "git+https://git.ardegazu.ro/wallet-kit.git#v1.0.0"
What's inside
src/ardegazu/wallet/shapes.cljs— the five signed artifacts: a payment request, a payer-signed order, a bank's receipt or decline, and a bank's issuance receipt that gives a mint finality. Exact key sets, canonical base64url, and a signature over canonical JSON.src/ardegazu/wallet/ledger.cljs— the personal ledger: balances folded exactly in BigInt, pending orders and their holds, sequence slots reserved durably, and a compare-and-swap store several tabs can share.src/ardegazu/wallet/paylink.cljs— the#pay=codec. A link is a request, never a capability to spend.
Receipt-first. A wallet holds what a bank has settled and what it has signed but not yet sent. Pending is never final, and the API says which is which rather than blurring them.
Admission is clock-optional. Passing null where an
instant is expected checks an artifact with no wall clock at all — a
replicated ledger fold must reach the same verdict on every device, and two
peers with skewed clocks must never disagree about one entry.
ClojureScript source with a committed, byte-deterministic ESM build
(dist/) and TypeScript declarations (types/) — the
wire contract is locked by golden vectors derived independently of the
implementation they pin. MIT licensed.