Skip to content

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.

bash
git checkout v4.2.1 && cd Typescript
npm install && npm run build
node tests/axioms.test.ts

Each 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.

txt
AXIOMS SUMMARY: 13/13 passed
STATUS: ALL AXIOMS PASSED

Cases ​

Case (v4.2.1)AxiomWhat it assertsResult
A-struct-0 L101–129A-struct-0me, me.profile and me.profile.name are functions; a leaf call returns a chainable value; a path read does not throw✅ PASS
A0 L130–165A0public ledger.* readable; wallet (under _) is undefined; wallet.income readable; the index has no wallet keys; an encrypted branch exists✅ PASS
A1 L166–203A1valid usernames accepted; "Abella" is normalized; invalid usernames throw; an @ root-claim memory is recorded✅ PASS
A2 L204–234A2profile["_"] hides profile; leaves stay readable; the index has no profile subtree✅ PASS
A3 L235–276A3writes before and after wallet["~"] carry different effectiveSecret; root stays stealth; post-noise leaf readable✅ PASS
A3b L277–308A3nested secrets: both roots stealth; owner reads the leaf; me.as(null) (guest) cannot✅ PASS
A3c L309–338A3nested secret plus noise on the same node: leaf written after the reset is readable by the owner, blocked for a guest✅ PASS
A4 L339–370A4["__"]("wallet") reads back as {__ptr}; reads through the pointer resolve target leaves; target root stays stealth✅ PASS
A5 L371–403A5profile["?"]("name","city") returns a function and records a ? memory at profile; root stays stealth✅ PASS
A6 L404–435A6value exists before ["-"]; after it, the read is no longer the original cleartext✅ PASS
A7 L436–472A7after secret and noise writes, public ledger.* stays readable; secret root stealth; encrypted branch persists✅ PASS
A8 L473–534A8genesis prevHash === ""; every prevHash equals the previous hash; every hash recomputes (FNV-1a, L91–98)✅ PASS
A9 L535–604A9a 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) ​

AxiomSource
A-struct-0proxy.ts createProxy L256–303, handleCall.ts L87–156
A0, A2, A7operators.ts isSecretScopeCall L130–141, secret-context.ts resolveBranchScope L232–265, core.ts readPath L289–393, core-index.ts applyMemoryToIndex L93–151
A1operators.ts normalizeAndValidateUsername L90–100, isIdentityCall L171–190
A3, A3b, A3coperators.ts isNoiseScopeCall L143–154, secret-context.ts computeEffectiveSecret L181–230, me.ts isStealthBlocked L1520–1534, as L1581–1589
A4operators.ts isPointerCall L156–169, core-index.ts resolveIndexPointerPath L200–244
A5operators.ts isQueryCall L225–261, core-write.ts postulate query branch L1072
A6operators.ts isRemoveCall L263–287, core-write.ts remove branch L1083–1085
A8core-write.ts commitMemoryOnly L473–508 (prevHash), utils.ts hashFn L7–14
A9core-index.ts compareLWW L58–78, rebuildIndex L163–189

The Axioms of .me · Proxy calls · Operators · Kernel Core · Identity-Bound Secrets

Human owns meaning. Everything else asks.