{"_id":"@absuitecore/notary","_rev":"2-d499782903b26baf886fbf92bf70dfd2","name":"@absuitecore/notary","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@absuitecore/notary","version":"1.0.0","keywords":["notary","timestamping","hash-chain","tamper-evidence","ai-governance","audit","ed25519"],"license":"MIT","_id":"@absuitecore/notary@1.0.0","maintainers":[{"name":"themba-mpehle","email":"landinwest@gmail.com"}],"homepage":"https://github.com/iamGodofall/ABSuite-core#readme","bugs":{"url":"https://github.com/iamGodofall/ABSuite-core/issues"},"dist":{"shasum":"cfeedffd4baef7bb5fa783e50937b7eb59007a14","tarball":"https://registry.npmjs.org/@absuitecore/notary/-/notary-1.0.0.tgz","fileCount":9,"integrity":"sha512-ZyhW00IQ1OQuErrt833Hu21MELB0+hcfB78Jm6o1R3bLQ94olVa1AHUv7aqsus/dhAuWPs4kDe8iqUbKdHngAg==","signatures":[{"sig":"MEYCIQCX9yxCnYdfHsQQguCI8TfD56qKiIoOvlOjQ7m/xwbbCwIhAPAYESdQJ3w/hB9IVZXUkcikKdVV4KskNyFsyAGiW0J0","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@absuitecore%2fnotary@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":34625},"main":"dist/index.js","_from":"file:absuitecore-notary-1.0.0.tgz","types":"dist/index.d.ts","engines":{"node":">=22.5.0"},"scripts":{"dev":"tsx src/server.ts","test":"jest -c ../../jest.config.js --rootDir ../.. --testPathPatterns packages/notary","build":"tsc -p tsconfig.json","start":"node dist/server.js"},"_npmUser":{"name":"themba-mpehle","email":"landinwest@gmail.com"},"_resolved":"/tmp/777331e0dd639d8f8424f945bd046d24/absuitecore-notary-1.0.0.tgz","_integrity":"sha512-ZyhW00IQ1OQuErrt833Hu21MELB0+hcfB78Jm6o1R3bLQ94olVa1AHUv7aqsus/dhAuWPs4kDe8iqUbKdHngAg==","repository":{"url":"git+https://github.com/iamGodofall/ABSuite-core.git","type":"git","directory":"packages/notary"},"_npmVersion":"10.9.8","description":"A disinterested witness to a chain head. Counter-signs the head of a hash chain so that rewriting history becomes detectable by someone with no stake in the answer.","directories":{},"_nodeVersion":"22.23.1","dependencies":{"express":"^4.18.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.0.0","@types/node":"^22.0.0","@types/express":"^4.17.21"},"_npmOperationalInternal":{"tmp":"tmp/notary_1.0.0_1785669568045_0.1931845331300024","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@absuitecore/notary","version":"1.1.0","description":"A disinterested witness to a chain head. Counter-signs the head of a hash chain so that rewriting history becomes detectable by someone with no stake in the answer.","license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","keywords":["notary","timestamping","hash-chain","tamper-evidence","ai-governance","audit","ed25519"],"dependencies":{"express":"^4.18.0"},"devDependencies":{"@types/express":"^4.17.21","@types/node":"^22.0.0","tsx":"^4.21.0","typescript":"^5.0.0"},"engines":{"node":">=22.5.0"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/iamGodofall/ABSuite-core.git","directory":"packages/notary"},"homepage":"https://github.com/iamGodofall/ABSuite-core#readme","bugs":{"url":"https://github.com/iamGodofall/ABSuite-core/issues"},"bin":{"absuite-notary":"dist/server.js"},"scripts":{"build":"tsc -p tsconfig.json","start":"node dist/server.js","dev":"tsx src/server.ts","test":"jest -c ../../jest.config.js --rootDir ../.. --testPathPatterns packages/notary"},"_id":"@absuitecore/notary@1.1.0","_integrity":"sha512-istYBNuSIi5KHAkSr1aZ3dncbuIAgCzdz4Nr/6vZgSnkDCdpyo5m5sXIqehuXUNgm4EtZF2ARFKLww5/s464uA==","_resolved":"/tmp/cdcc33fab1f7cba5cb497c0da3dbdcc3/absuitecore-notary-1.1.0.tgz","_from":"file:absuitecore-notary-1.1.0.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-istYBNuSIi5KHAkSr1aZ3dncbuIAgCzdz4Nr/6vZgSnkDCdpyo5m5sXIqehuXUNgm4EtZF2ARFKLww5/s464uA==","shasum":"1d0c58810b8499c99ad302ebe659672edb69de4f","tarball":"https://registry.npmjs.org/@absuitecore/notary/-/notary-1.1.0.tgz","fileCount":9,"unpackedSize":35092,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@absuitecore%2fnotary@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHZzef+QDiGOgtPmL4rbW0mHA8yKnPkFSHFWG4oGgC51AiEAxOFO9/9MIJn7JoJZ+/C2VUnB0DE0gJ47ETxqlf7nNCg="}]},"_npmUser":{"name":"themba-mpehle","email":"landinwest@gmail.com"},"directories":{},"maintainers":[{"name":"themba-mpehle","email":"landinwest@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/notary_1.1.0_1785684242182_0.8908759335228533"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-02T11:19:27.869Z","modified":"2026-08-02T15:24:02.678Z","1.0.0":"2026-08-02T11:19:28.187Z","1.1.0":"2026-08-02T15:24:02.342Z"},"bugs":{"url":"https://github.com/iamGodofall/ABSuite-core/issues"},"license":"MIT","homepage":"https://github.com/iamGodofall/ABSuite-core#readme","keywords":["notary","timestamping","hash-chain","tamper-evidence","ai-governance","audit","ed25519"],"repository":{"type":"git","url":"git+https://github.com/iamGodofall/ABSuite-core.git","directory":"packages/notary"},"description":"A disinterested witness to a chain head. Counter-signs the head of a hash chain so that rewriting history becomes detectable by someone with no stake in the answer.","maintainers":[{"name":"themba-mpehle","email":"landinwest@gmail.com"}],"readme":"# @absuitecore/notary\n\nA disinterested witness to a chain head.\n\n```bash\nnpm install @absuitecore/notary\n```\n\n## The gap it closes\n\nA hash chain proves nobody edited a record *after it was written*. It does not\nprove **when** it was written — and the operator being audited holds the signing\nkey. In principle they could produce a perfectly valid chain today and claim it\nwas written last year. Every record would verify. Every link would hold. The\nwhole thing could still be a reconstruction.\n\nNothing inside one deployment can close that, because everything inside it is\nsigned by the same party. It needs somebody else.\n\nA notary is the smallest possible somebody else. It receives thirty-two bytes of\nhash and returns a signed receipt saying *I saw this value at this time*.\n\n## Why a series of receipts is stronger than one\n\nOne receipt is a timestamp. A series is an external, ordered witness.\n\nA chain is append-only, so **every head a notary ever saw must still be in it, at\nthe same position, forever.** An operator who rewrites history produces a chain\nthat verifies perfectly against itself and fails here — against evidence held by\nsomebody with no stake in the answer.\n\n```ts\nimport { Notary, auditAgainstReceipts } from '@absuitecore/notary';\n\nconst receipt = notary.witness({ chainId, headHash: head, claimedLength: 5 });\n\n// …later, presented with a chain that claims to be the same one\nconst audit = auditAgainstReceipts(chainId, recordHashes, [receipt], notaryPublicKey);\naudit.consistent;          // false\naudit.findings[0].state;   // 'MISSING'\n```\n\n| State | Meaning |\n|---|---|\n| `PRESENT` | The witnessed head is in the chain, where it should be. |\n| `MISSING` | Not in the chain at all. This is not a continuation of what was witnessed. |\n| `MISPLACED` | Present, but not at the position its claimed length implies — records were inserted or removed before it. |\n| `UNVERIFIABLE` | The receipt does not verify. A finding about the witness, not the chain. |\n\n## What it must never claim\n\nThe notary **never sees a record**. It cannot verify a chain and does not try. A\nreceipt says one thing:\n\n> this value existed at this time, and I had no interest in it\n\nIt does **not** say the chain was valid, that the records were true, or that the\nsubmitter is who they claim. Anyone may submit any hash — which is why witnessing\nis unauthenticated. A notary able to refuse to witness somebody would have\nexactly the power a disinterested party must not have.\n\nA receipt is worth as much as the chain that later matches it. **The value is in\nthe audit, not the receipt.**\n\nAn unwitnessed chain is reported as unwitnessed, never as suspicious. Punishing\nanyone who has not started would be the wrong incentive and the wrong claim.\n\n## Running one\n\n```bash\nCAPKIT_NOTARY_PRIVATE_KEY=\"$(node -e \"console.log(require('@absuitecore/notary').Notary.generate().privateKeyPem)\")\" \\\n  npx @absuitecore/notary\n```\n\n| Route | |\n|---|---|\n| `POST /witness` | `{ chainId, headHash, claimedLength? }` → a signed receipt |\n| `GET /notary/public-key` | Unauthenticated, and must stay so |\n| `GET /receipts?chainId=` | Every receipt issued for a chain |\n| `POST /audit` | A convenience — the audit is a pure function anyone can run |\n| `GET /health` | Including `ephemeralKey`, because a notary that quietly lost its key is worse than one that is down |\n\nInstalled globally the command is `absuite-notary`. The full guide, including a\nworked audit of a rewritten chain, is\n[NOTARY.md](https://github.com/iamGodofall/ABSuite-core/blob/main/docs/NOTARY.md).\n\nWithout `CAPKIT_NOTARY_PRIVATE_KEY` a key is generated per process, and every\nreceipt stops verifying on restart. It warns loudly at boot, because receipts\nalready handed out keep looking valid until somebody checks them.\n\n## It depends on nothing\n\nNot even on `capkit`. A notary that imported the thing it witnesses would be a\ncomponent of it, and the whole value on offer is that it is a *different party*.\nIt has no idea what a trace is and must never need one.\n\nThat is also why it is the first honest step toward\n[Collective Intelligence](https://github.com/iamGodofall/ABSuite-core/blob/main/docs/CONSTITUTION.md) rather than a wait for it:\nthe layer needs deployments verifying each other, and a notary is the smallest\nversion of one deployment checking another that is worth running.\n","readmeFilename":"README.md"}