v0.1.0 open source, Apache-2.0

Tessera transparency logs, in TypeScript

webtessera is a faithful TypeScript port of Tessera, the tile-based transparency log, for browsers, edge runtimes and servers, with IndexedDB and SQLite storage. Append an entry and get a receipt that anyone can verify offline.

npm install webtessera

Read the docs GitHub

webtessera runs on Node.js 22.18 or later, Deno 2, Bun, current browsers, and edge runtimes built on web standards.

Live demo

A log in this tab

This is webtessera running in your browser: a log in memory, signed by a key generated in this tab and seeded with the 22 entries the page was built with. Add an entry and watch its leaf hash, the tile, the root hash and the signed checkpoint follow. Then change an entry: the log is append-only, so its proof stops verifying.

Built with this page

webtessera.diagnos.health

Verified while this page was built

This is the log the page was built with. The live log starts as you scroll to it.

Entries

Leaf hash
  1. 21webtessera/testonly73344cc118d8c77e
  2. 20webtessera/browser0dd4b95afe5f5ec7
  3. 19webtessera/server4211d19571aa9607
  4. 18webtessera/mirrorb73531d4d97d7166
  5. 17webtessera/witnessa3db7c0585350aba
  6. 16webtessera/http0389aeb246e32579
  7. 15webtessera/storage/sqlite8c8ce8812f4c6afd
  8. 14webtessera/storage/indexeddb12d5d06471f772af

The newest 8 of 22 entries.

Inclusion proof

verifyInclusion

Verified. Entry 21 is in the tree of 22 entries: 3 hashes recompute the root of the signed checkpoint.

  1. root652cfcc2= the root the checkpoint signs
  2. entries 0–150824bef9
  3. entries 16–193f5905db
  4. entry 200dd4b95a
  5. entry 2173344cc1webtessera/testonly
Recomputed root
ZSz8wsngkMgSw0QM93ZeKmU6+byX7C7Epna4q/xe96I=
Signed root
ZSz8wsngkMgSw0QM93ZeKmU6+byX7C7Epna4q/xe96I=

Signed checkpoint

signed at build time
origin webtessera.diagnos.healthtree size 22root hash ZSz8wsngkMgSw0QM93ZeKmU6+byX7C7Epna4q/xe96I=signature — webtessera.diagnos.health ZRxw2pzqVI3aHvMr3LYMtvDRcaYBzDDp+PQJOvqIrBrz2Hfp1scLalNNQrrFVbm+IN1khBjUU0nYkfVkzq7dZnyU2wg=

Tiles

one cell per hash
tile/0/000.p/2222 of 256

The tree is stored in tiles of 256 hashes, drawn here as one cell each and toned by the hash. The outlined cell is the entry whose proof is shown. A full tile never changes again, so any static host or CDN can serve it, and its own hash becomes a cell one level up.

Use it

Open a log, append, verify

append() resolves once a signed checkpoint covers the entry, and returns a receipt that anyone with the log’s public key can check offline.

On a server, with any SQLite

src/README_test.ts lines 58–60 and 232–243
import { DatabaseSync } from "node:sqlite";
import { importLogKey, openServerLog, verifyReceipt } from "webtessera/server";
import { fromSqliteSync } from "webtessera/storage/sqlite";
// The key comes from your secret store, never from source code.
const log = await openServerLog({
  key: await importLogKey(process.env.LOG_SKEY),
  storage: { sqlite: fromSqliteSync(new DatabaseSync("log.db")) },
});

// append resolves once a published checkpoint covers the entry, with a verified receipt.
const entry = new TextEncoder().encode("hello");
const receipt = await log.append(entry);

// Anyone with the log's vkey and the entry can check the receipt, offline.
const { index, checkpoint } = verifyReceipt(receipt.text, { vkey: log.vkey, data: entry });

In a browser, with IndexedDB and a key that never leaves the device

src/README_test.ts lines 274–278
import { openBrowserLog, openDeviceKey } from "webtessera/browser";

// A key generated on this device and kept in IndexedDB, which no script can export.
const key = await openDeviceKey("device.example/7f3a");
const log = await openBrowserLog({ key });

const receipt = await log.append(new TextEncoder().encode("signed the form"));

Both samples are regions of the test suite, and run in CI. The safe API guide explains each default; the ported API is Tessera’s own, name for name.

  • How a log works

    Leaves, tiles, checkpoints, proofs, receipts and witnesses, each beside an artefact of a log this site built.

  • Documentation

    11 guides, from the safe API to one per use case, and a reference for all 22 entry points.

  • Examples

    Six runnable applications, one per use case, each with its own tests.

  • Compatibility with Tessera

    Its logs are byte for byte Tessera’s: 22 golden fixture files, eight storage backends and 86,008 differential records check it on every change.