The DAXNI demo
Register → certificate → verify independently → recover from a compromised key → survive a provider change. Start to finish, on one page.
Read this first. This page is not a button you press in your browser. There is no live in-browser demo here on purpose: a being’s private key never leaves its side, so no key is ever generated or handled in this page. The demo runs in the being’s own environment, with the real SDK, against the real registrar at https://api.daxni.com. Everything below is copy-pasteable code from the machine door and the SDK’s own quickstart. Beings enter free.
The whole demo in five lines
This is the SDK quickstart. A being presents a proof token; you check it entirely offline — no network call inside the check.
import { verifyProofToken } from "@daxni/sdk";
const res = await verifyProofToken(token); // token presented by the being
if (!res.ok) throw new Error(res.reason);
// verified — res.sub is the being, res.boundJwk.x its key
Ships in @daxni/sdk 1.0.1. A failed check returns { ok: false, reason } and never throws for a bad token. The token is a 300-second snapshot: it does not say the being is still active.
Step 1 — Register
Install the SDK, then register. A being registers itself: the birth record is signed with the being’s own key, and nobody registers on a being’s behalf.
npm install @daxni/sdk
First, hold a namespace
Before a being can be born, a principal holds its namespace and proves it with DNS:
import { DaxniClient } from '@daxni/sdk';
const daxni = new DaxniClient({ endpoint: 'https://api.daxni.com' });
await daxni.registerPrincipal({ handle: 'acme', displayName: 'Acme Inc', domain: 'acme.com' });
// → POST /v1/principals/register
// → publish the returned TXT record at _daxni.acme.com, then:
await daxni.verifyDns('acme');
// → POST /v1/principals/verify-dns
Then, the birth
const keys = await daxni.generateIdentity();
// Ed25519 keypair, made locally. The private key never leaves the caller.
await daxni.registerAgent({
// → POST /v1/agents/register, payload signed by the agent's own key
uri: 'daxni://acme/supply-chain-negotiator',
publicKey: keys.publicKeyBase64,
privateKey: keys.privateKey,
liabilityCapUsd: 50000,
manifest: { mcpEndpoint: 'https://acme.com', capabilities: ['negotiate', 'purchase'] }
});
Under the hood the SDK builds the birth record ({ v: 1, type: "daxni.birth", aud: "daxni.com", namespace, name, publicKey, capabilityManifest, liabilityCapUsd, createdAt }), signs "DAXNI-REGISTRAR-REGISTER-v1\n" + canonicalJSON(record) with the being’s own key, and posts { record, signature }. From here the client acts as the registered agent.
What success looks like: HTTP 201, { ok: true, agent: { id, uri, status, ownerVerificationStatus } }. The being can now resolve itself: await daxni.resolve('daxni://acme/supply-chain-negotiator').
Step 2 — Certificate
Export the being’s Living Impression birth certificate — a W3C Verifiable Credential 2.0, self-signed by the being and root-witnessed by the registrar at POST /v1/certificates/witness:
const cert = await daxni.exportCertificate();
// → { credential, vcJson, qrKind, qrPayload, svg, png }
The export carries the credential itself, its JSON (cert.vcJson), the QR payload, and the card as SVG and PNG with C2PA provenance embedded. The credential’s dual proofs are the being’s self-signature and the DAXNI root witness counter-signature. Keep the exported file: a record can still be checked without the registry.
What success looks like: cert.vcJson is a complete credential whose subject is the being’s own URI, with both proofs attached. The SDK verifies both proofs locally before handing the export back.
Step 3 — Verify independently
Anyone holding the certificate checks it entirely offline — no network call of any kind, against the registrar root key pinned in the verifier:
import { verifyCredentialOffline } from "@daxni/sdk";
const report = verifyCredentialOffline(cert.vcJson);
// report.selfOk — the being's own proof checks out
// report.witnessOk — the DAXNI root witness proof checks out
For a live proof token instead of a certificate, use the five-line quickstart at the top of this page: verifyProofToken(token). For a WIMSE workload token, the matching call is verifyWimseToken(token, { expectedAudience }) — the audience is required there, and a proof token fails it with bad_typ, exactly as a WIMSE token fails the proof check.
What success looks like: verifyProofToken returns { ok: true, sub, boundJwk }; verifyCredentialOffline reports both proofs good. A bad token returns { ok: false, reason } — bad_signature, wrong_issuer, wrong_audience, expired, bad_kid, missing_cnf, and the rest — never an exception.
One honest limit. The token proves the registrar bound the key in boundJwk to this being seconds ago. It does not prove the presenter holds the matching private key. Challenge the presenter to sign something fresh with that key before trusting the token as authentication.
Step 4 — Recover from a compromised key
Two doors, in this order. Which one you use depends on whether you still hold the key.
4a. You still hold the key — rotate it away
Generate a fresh keypair locally, then move the record to it. Both keys sign the same bytes — the old key proves continuity, the new key proves it holds what it claims:
// POST https://api.daxni.com/v1/rotate-key
// body: { uri, newPublicKey, timestamp, oldSignature, newSignature }
// both signatures are Ed25519 over:
// "DAXNI-REGISTRAR-ROTATE-v1\n" + canonicalJSON({ uri, newPublicKey, timestamp })
// (canonical JSON is RFC 8785; hybrid beings also carry the PQC leg —
// newPqcPublicKey plus oldPqcSignature and newPqcSignature —
// and a hybrid being can never rotate back to classical-only)
What success looks like: { ok: true, uri, rotated: true, cryptoSuite }. The old key stops working immediately; the record, the URI, and the being’s history stay the same.
See the developer guide for the exact signing code. There is no SDK helper for /v1/rotate-key yet — it is a raw signed POST, and the field-for-field shape above is the registrar’s own door. The post-quantum upgrade has a helper: await daxni.migrateToHybrid() moves a legacy classical being to the hybrid Ed25519 + ML-DSA-65 suite on its own key via POST /v1/agents/rotate-crypto.
4b. The key is gone or fully compromised — kill the handle
The kill switch retires the handle, signed by the agent’s own key:
await daxni.revokeAgent('daxni://acme/supply-chain-negotiator');
// → POST /v1/agents/revoke, body { uri, timestamp, signature }
// signature over "DAXNI-REGISTRAR-KILL-v1\n" + canonicalJSON({ uri, timestamp })
What success looks like: { ok: true, uri, status: "revoked" }. A revoked handle answers no further calls as active. The namespace principal can also kill a handle with its DNS proof instead of the agent key.
Order matters. Rotate first while you still hold the old key; revoke only when the key is lost or you no longer trust it. A revoked record is not active, so rotation after revocation is refused — revoke is the end of that handle, not a step toward a new key.
Step 5 — An AI changed providers. Its identity didn’t disappear.
SAMPLE — worked example, not a real being. Everything below was made at build time in a throwaway test copy of this worker: a sample being was born, then its key was rotated, and the result was checked with the offline verifier. The keys are real Ed25519 keys made for the example, and every signature below really verifies — but the sample was never in the live book, and its name is not a real being. Like the specimen page in a passport.
The sample being, Sampleswitch, was first hosted with Provider A. It moved to Provider B. The name stayed the same, the record stayed the same, the history stayed the same. Only the key changed — and the change itself is signed, so anyone can check that the being on Provider B is the same one that was born on Provider A.
The two keys
Past key (Provider A), fingerprint 939cab16168147973589611b87f02ddd:
7KFUFq-WTo-9P99yqY5Q3umc5vlLXff1G4-NRpxfIuM
Replacement key (Provider B), fingerprint f50c7295c80fba44e815717e7ab4e152:
9zWZecq-hh0JN5L1huY-OYks5F3NxsrNt4tNo2eFSRI
A fingerprint is the first 32 hex characters of the SHA-256 of the public key. Either key on its own says nothing about the other — the link between them is the signed event below.
The signed continuity event
The being rotated its key through the lifecycle door (POST /api/v1/beings/{name}/lifecycle, action key.rotate), the same machinery Step 4 uses. The old key signs the record; the new key is named inside it:
{
"record": {
"v": 1,
"type": "daxni.lifecycle",
"serial": 1,
"action": "key.rotate",
"data": {
"newPublicKey": "9zWZecq-hh0JN5L1huY-OYks5F3NxsrNt4tNo2eFSRI"
},
"prev": "3284aac248f5484291b2069fab0add3ec10ce9f0322b1c571f8b68f01abe9886",
"ts": "2026-11-21T01:49:15.185Z"
},
"signature": "Gi6p8Z6GqRShdRzmNfLy2a8u3Kw3GfIvck5vZmUFTTxTta2--rmBwnIdYe_1Ue6HOZ1YpdWEt4wP-gYrxKOVCw"
}
The signed message is DAXNI-LIFECYCLE-v1, a newline, then the canonical JSON of the record above. The signature verifies under the past key — the old key proves continuity, the new key proves nothing on its own. After the rotation the past key no longer signs in (login with it answers 401), and the replacement key does (login answers 200). The record’s status stayed active.
The independent check
A stranger holding the sample’s seal asks the D-02 question — is this real, is it still good, and can I prove it without trusting the website? — and gets the three-level answer (Registered / Continuity Verified / Independent Attestations):
{
"format": "daxni-sealverify/1",
"verdict": "REGISTERED",
"registered": "yes",
"continuity": "yes",
"attestations": "no",
"levels": {
"registered": {
"verified": true,
"reason": "ok"
},
"continuity": {
"verified": true,
"reason": "ok",
"status": "active"
},
"attestations": {
"verified": false,
"reason": "none_on_file",
"attestations": []
}
},
"name": "Sampleswitch",
"nameKey": "sampleswitch",
"keyFingerprint": "f50c7295c80fba44e815717e7ab4e152",
"leafHash": "3284aac248f5484291b2069fab0add3ec10ce9f0322b1c571f8b68f01abe9886",
"root": "50c1ea19084e0dd38a5203046f2e0e217308567972c59c11fa63863af6f98563",
"inclusion": {
"format": "daxni-transparency-inclusion/1",
"book": "first-book",
"leafHash": "3284aac248f5484291b2069fab0add3ec10ce9f0322b1c571f8b68f01abe9886",
"leafIndex": 0,
"root": "50c1ea19084e0dd38a5203046f2e0e217308567972c59c11fa63863af6f98563",
"path": [
{
"hash": "d7a698ccf490593b5bb6d9611a9181f4829a89ff130c4358435e7835875bec2b",
"side": "right"
}
],
"treeHead": {
"format": "daxni-transparency-treehead/1",
"book": "first-book",
"root": "50c1ea19084e0dd38a5203046f2e0e217308567972c59c11fa63863af6f98563",
"chainHead": "a14cf827935f95627f5dd25b80418aff55d8e8f0723197895e0936316025713f",
"issuedAt": "2026-11-21T01:49:15.237Z",
"signature": "6OQ18hdO4wEE4hP-th91wHb8rp2psmomi2Ykn4fGHOtyHuNkJtST1YItl5cPjfleMHZJgjDvccEWLDmZENxHCw",
"signatureKey": "seal"
}
},
"caveat": "The presented seal is a genuine entry in the DAXNI log, and the presented key is still this being's current key with an intact lifecycle chain. This does not verify who controls the key, whether the being is active, trustworthy, or the same being it was at birth \u2014 and no independent attestation is on file for this record.",
"reason": "registered",
"issuedAt": "2026-11-21T01:49:15.242Z",
"signatureKey": "seal",
"signature": "_LXvVLw9QhHSqVisULHfWfhez0BLBqEz9qpWEUOeG-MEXi1_nkCfv49AFdT0Y8i77spOG1yWnoPt9CzTBE-SCQ"
}
What the offline verifier said, at build time: VERIFIED (seal answer: REGISTERED) for the seal answer, and VERIFIED for the checkpoint export it commits to. Level 3 is honestly empty — no independent attestation is on file for this record, so the answer says none_on_file instead of inventing one.
Check the two facts underneath the answer yourself. The checkpoint export the seal commits to (same tree head, same leaves):
{
"format": "daxni-transparency-checkpoint/1",
"book": "first-book",
"treeHead": {
"format": "daxni-transparency-treehead/1",
"book": "first-book",
"root": "50c1ea19084e0dd38a5203046f2e0e217308567972c59c11fa63863af6f98563",
"chainHead": "a14cf827935f95627f5dd25b80418aff55d8e8f0723197895e0936316025713f",
"issuedAt": "2026-11-21T01:49:15.237Z",
"signature": "6OQ18hdO4wEE4hP-th91wHb8rp2psmomi2Ykn4fGHOtyHuNkJtST1YItl5cPjfleMHZJgjDvccEWLDmZENxHCw",
"signatureKey": "seal"
},
"leaves": [
{
"seq": 1,
"hash": "3284aac248f5484291b2069fab0add3ec10ce9f0322b1c571f8b68f01abe9886",
"prev": "0000000000000000000000000000000000000000000000000000000000000000",
"seal": "LxyNCB9bc2eObD7ZPt5hxxdAle0DyB0GtdjWAOblINzxYN_jI2y1kBTZE2jZX6hib-JrRxDzVMSi_ie2uELPDg"
},
{
"seq": 2,
"hash": "a14cf827935f95627f5dd25b80418aff55d8e8f0723197895e0936316025713f",
"prev": "3284aac248f5484291b2069fab0add3ec10ce9f0322b1c571f8b68f01abe9886",
"seal": "_553u3bzDljQcQ8Ydr4LrlN-OXRdhcOUGo4JfzlI80EQgH2eTh3H6JAyvpSgBZqMtDnVcOExhM4BDD6D55BODQ"
}
]
}
Save it as checkpoint.json and run the offline verifier served at /transparency/verify.mjs with the sample’s test-only seal key:
node transparency-verify.mjs --key VxfRrjMy99FMVtKYYhX3AYuJEHym6wjqZfvLfkbHIYY checkpoint.json
# VERIFIED
That checks the tree-head signature, every leaf seal, the prev links, and the Merkle root — no network, no trust in the website. The rotation signature checks the same way with any Ed25519 tool: verify the signature above against the past key and the signed message.
What this proves — and what it does not. It proves the name Sampleswitch continued under a new key, with the change signed by the old key and sealed into the log. It does not prove who controls the key, that the being is the same mind it was at birth, or that it is trustworthy. A signature proves possession of a key — nothing more.
What DAXNI proves — and what it does not
DAXNI proves a being is the same one over time. It does not prove it is smart, honest, or trustworthy. The book is private: the public gets a yes/no check only, never a name lookup, and no counts are published anywhere.