<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>wallet-kit.git — the wallet layer of the ardegazu.ro suite</title>
<style>
:root {
color-scheme: dark;
--paper: #171520; --ink: #eae6f2; --ink-soft: #a49fb5;
--line: #2b2838; --card: #1e1c2a; --code-bg: #272334; --sage-d: #93c1a5;
}
@media (prefers-color-scheme: light) {
:root {
color-scheme: light;
--paper: #faf6ee; --ink: #35322c; --ink-soft: #6f6a5e;
--line: #e5ddcd; --card: #fffdf8; --code-bg: #f1ead9; --sage-d: #6fa284;
}
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: var(--paper); color: var(--ink);
font: 16.5px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
"Helvetica Neue", Arial, sans-serif;
padding: 64px 22px 90px;
}
main { max-width: 660px; margin: 0 auto; }
h1 { font-size: 40px; font-weight: 600; letter-spacing: -.4px; }
.tag { margin: 14px 0 34px; font-size: 18px; color: var(--ink-soft); }
h2 { font-size: 20px; font-weight: 600; margin: 36px 0 10px; }
p { margin: 10px 0; }
a { color: var(--sage-d); }
pre {
background: var(--card); border: 1px solid var(--line); border-radius: 10px;
padding: 13px 16px; overflow-x: auto; margin: 14px 0;
font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}
code { font: 15px ui-monospace, SFMono-Regular, Menlo, monospace;
background: var(--code-bg); border-radius: 5px; padding: 1px 6px; }
pre code { background: none; padding: 0; }
ul { padding-left: 22px; } li { margin: 6px 0; }
footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line);
font-size: 14px; color: var(--ink-soft); }
footer a { color: inherit; }
</style>
</head>
<body>
<main>
<h1>wallet-kit.git</h1>
<p class="tag">the wallet layer of the
<a href="https://ardegazu.ro">ardegazu.ro</a> 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.</p>
<h2>Clone</h2>
<pre><code>git clone https://git.ardegazu.ro/wallet-kit.git</code></pre>
<p>or <a href="browse/index.html">browse the code</a> right here, in the
browser.</p>
<h2>Use as a dependency</h2>
<pre><code>"ardegazu-wallet-kit": "git+https://git.ardegazu.ro/wallet-kit.git#v1.0.0"</code></pre>
<h2>What's inside</h2>
<ul>
<li><code>src/ardegazu/wallet/shapes.cljs</code> — 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.</li>
<li><code>src/ardegazu/wallet/ledger.cljs</code> — 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.</li>
<li><code>src/ardegazu/wallet/paylink.cljs</code> — the <code>#pay=</code> codec. A link is a
request, never a capability to spend.</li>
</ul>
<p><strong>Receipt-first.</strong> 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.</p>
<p><strong>Admission is clock-optional.</strong> Passing <code>null</code> 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.</p>
<p>ClojureScript source with a committed, byte-deterministic ESM build
(<code>dist/</code>) and TypeScript declarations (<code>types/</code>) — the
wire contract is locked by golden vectors derived independently of the
implementation they pin. MIT licensed.</p>
<footer>
<p>part of the <a href="https://git.ardegazu.ro/">git.ardegazu.ro</a>
ecosystem — the place itself is <a href="https://ardegazu.ro">ardegazu.ro</a>.</p>
</footer>
</main>
</body>
</html>