Axioms: TypeScript validation
How tests/axioms.test.ts at v4.2.1 checks each axiom against the kernel. Concept and live demos: The Axioms of .me.
Run it
v4.2.1 has no npm script for this file. From Typescript/ at tag v4.2.1: build, then run it (the test imports ../dist/index.js). Node ≥ 22.18 or 23.6 runs .ts directly; on older Node use npx tsx.
git checkout v4.2.1 && cd Typescript
npm install && npm run build
node tests/axioms.test.tsEach case gets a fresh new ME() (L621), runs its run(me) assertions (node:assert/strict), then prints its proofs as expected / returned pairs (full output: run it, or see the values in each case's proofs()). The runner loop is L613–637. The process exits 1 if any case fails.
Result on npm 4.2.1
Run on 2026-10-14 with tsx (Node v20.19.2) against the npm this.me 4.2.1 dist, dist/me.es.js sha256 0bd2cc60d15d…. 13/13 passed, exit 0.
AXIOMS SUMMARY: 13/13 passed
STATUS: ALL AXIOMS PASSEDCases
| Case (v4.2.1) | Axiom | What it asserts | Result |
|---|---|---|---|
| A-struct-0 L101–129 | A-struct-0 | me, me.profile and me.profile.name are functions; a leaf call returns a chainable value; a path read does not throw | ✅ PASS |
| A0 L130–165 | A0 | public ledger.* readable; wallet (under _) is undefined; wallet.income readable; the index has no wallet keys; an encrypted branch exists | ✅ PASS |
| A1 L166–203 | A1 | valid usernames accepted; "Abella" is normalized; invalid usernames throw; an @ root-claim memory is recorded | ✅ PASS |
| A2 L204–234 | A2 | profile["_"] hides profile; leaves stay readable; the index has no profile subtree | ✅ PASS |
| A3 L235–276 | A3 | writes before and after wallet["~"] carry different effectiveSecret; root stays stealth; post-noise leaf readable | ✅ PASS |
| A3b L277–308 | A3 | nested secrets: both roots stealth; owner reads the leaf; me.as(null) (guest) cannot | ✅ PASS |
| A3c L309–338 | A3 | nested secret plus noise on the same node: leaf written after the reset is readable by the owner, blocked for a guest | ✅ PASS |
| A4 L339–370 | A4 | ["__"]("wallet") reads back as {__ptr}; reads through the pointer resolve target leaves; target root stays stealth | ✅ PASS |
| A5 L371–403 | A5 | profile["?"]("name","city") returns a function and records a ? memory at profile; root stays stealth | ✅ PASS |
| A6 L404–435 | A6 | value exists before ["-"]; after it, the read is no longer the original cleartext | ✅ PASS |
| A7 L436–472 | A7 | after secret and noise writes, public ledger.* stays readable; secret root stealth; encrypted branch persists | ✅ PASS |
| A8 L473–534 | A8 | genesis prevHash === ""; every prevHash equals the previous hash; every hash recomputes (FNV-1a, L91–98) | ✅ PASS |
| A9 L535–604 | A9 | a later timestamp wins; two sequential writes with the same timestamp resolve by seq (the second wins, not the higher hash); read path and index agree | ✅ PASS |
Kernel source exercised (v4.2.1)
Related
The Axioms of .me · Proxy calls · Operators · Kernel Core · Identity-Bound Secrets