@@ -14,11 +14,11 @@
---
-json-trail gives you **chronological integrity**: a guarantee that a sequence of blocks has not been altered, reordered, or truncated. It does not enforce authenticity or authorship; it simply ensures the history is intact.
+json-record gives you **chronological integrity**: a guarantee that a sequence of blocks has not been altered, reordered, or truncated. It does not enforce authenticity or authorship; it simply ensures the history is intact.
---
-## Why json-trail?
+## Why json-record?
Most applications do not need a blockchain, or consensus protocol.
They just need a simple, deterministic way to ensure that:
@@ -27,7 +27,7 @@ They just need a simple, deterministic way to ensure that:
- nothing was removed
- nothing was rewritten
-json-trail gives you that primitive, nothing more and nothing less.
+json-record gives you that primitive, nothing more and nothing less.
It is ideal for:
@@ -52,7 +52,7 @@ It is ideal for:
## Environment Support
-json-trail runs anywhere WebCrypto is available:
+json-record runs anywhere WebCrypto is available:
- Node.js 18+ (global crypto.subtle)
- Browsers
@@ -66,9 +66,9 @@ A pure, deterministic, in-memory primitive.
---
-## What json-trail guarantees
+## What json-record guarantees
-json-trail provides **tamper-evident ordering**:
+json-record provides **tamper-evident ordering**:
- A block's payload cannot be changed without detection
- A block's header cannot be changed without detection
@@ -79,9 +79,9 @@ This is the same integrity model used by Git commit chains and linear Merkle-sty
---
-## What json-trail does not guarantee
+## What json-record does not guarantee
-json-trail does not provide:
+json-record does not provide:
- authenticity
- authorship
@@ -91,7 +91,7 @@ json-trail does not provide:
If you need to prove who created the data, seal the payload with **json-seal** before storing it in the trail.
-json-trail stays intentionally minimal.
+json-record stays intentionally minimal.
---
@@ -100,7 +100,7 @@ json-trail stays intentionally minimal.
### Creating a block
```ts
-import { createBlock } from "json-trail";
+import { createBlock } from "json-record";
const payload = new TextEncoder().encode("hello world");
@@ -113,7 +113,7 @@ const block1 = await createBlock(payload, block0);
### Verifying a block
```ts
-import { verifyBlock } from "json-trail";
+import { verifyBlock } from "json-record";
const ok = await verifyBlock(block1);
console.log(ok); // true
@@ -124,7 +124,7 @@ console.log(ok); // true
### Verifying a chain
```ts
-import { verifyChain } from "json-trail";
+import { verifyChain } from "json-record";
const chain = [block0, block1];
const ok = await verifyChain(chain);
@@ -139,7 +139,7 @@ If you want to prove where the data came from, seal the payload before putting i
```ts
import { generateKeyPair, signPayload } from "json-seal";
-import { createBlock } from "json-trail";
+import { createBlock } from "json-record";
const { privateKey, publicKey } = await generateKeyPair();
@@ -153,7 +153,7 @@ const block = await createBlock(
This gives you:
- authenticity of the payload (json-seal)
-- chronological integrity of the chain (json-trail)
+- chronological integrity of the chain (json-record)
A clean, layered integrity model.
@@ -161,7 +161,7 @@ A clean, layered integrity model.
## Storage
-json-trail is an in-memory primitive.
+json-record is an in-memory primitive.
For persistence, serialize blocks however you like.
A recommended format:
@@ -173,14 +173,14 @@ A recommended format:
}
```
-json-trail does not define a storage format.
+json-record does not define a storage format.
You choose how to store, sync, or replicate the chain.
---
## Design Philosophy
-json-trail is intentionally small:
+json-record is intentionally small:
- no I/O
- no storage format
@@ -195,7 +195,7 @@ You build the policies on top.
## Prior Art
-json-trail builds on a long lineage of cryptographic integrity primitives:
+json-record builds on a long lineage of cryptographic integrity primitives:
- Git commit chains
- Merkle-style hash chains
@@ -203,7 +203,7 @@ json-trail builds on a long lineage of cryptographic integrity primitives:
- Certificate Transparency logs
- Secure audit log research
-json-trail distills these ideas into a tiny, deterministic, dependency-free primitive designed for local-first apps, PWAs, and in-memory trails. It offers integrity without the complexity.
+json-record distills these ideas into a tiny, deterministic, dependency-free primitive designed for local-first apps, PWAs, and in-memory trails. It offers integrity without the complexity.
---
diff --git a/docs/api.html b/docs/api.html
index 9686f92..1b7f832 100644
--- a/docs/api.html
+++ b/docs/api.html
@@ -3,7 +3,7 @@
- json-trail - API
+ json-record - API
@@ -13,7 +13,7 @@
API Reference
- json-trail exposes a minimal API for creating hash-linked blocks and
+ json-record exposes a minimal API for creating hash-linked blocks and
verifying their integrity. All operations use deterministic SHA-256 hashing and return plain data structures
containing Uint8Array fields.
Tamper-evident, hash-linked blocks for apps. Zero dependencies.
- json-trail is a tiny library for creating hash-linked blocks that detect
+ json-record is a tiny library for creating hash-linked blocks that detect
any modification to payloads or history. It provides chronological
integrity without keys, signatures, or complex state.
-
Why json-trail exists
+
Why json-record exists
Local-first apps store data on the device and sync when possible. Without
a server acting as the source of truth, you still need a way to know
- whether your local history has been tampered with. json-trail provides a
+ whether your local history has been tampered with. json-record provides a
minimal, deterministic, tamper-evident structure for that purpose.
Using canonicalize ensures that the bytes passed into
createBlock are deterministic. json-seal produces a stable,
canonical representation of the sealed envelope, so hashing it with
- json-trail yields consistent results across platforms and runtimes.
+ json-record yields consistent results across platforms and runtimes.