Skip to main content

trustnotch

Offline verifier for TrustNotch tamper-evident audit-log proofs (proof-format-v1).

Verify any proof bundle on your own machine — no database, no network, no dependence on the TrustNotch server. You supply the trusted keys; trustnotch checks the cryptography. If TrustNotch went away tomorrow, every proof it ever issued would still be verifiable with this package alone.

Requires Python 3.12+. Apache-2.0 licensed.

Install

pip install trustnotch

Or run the CLI without installing it:

uvx trustnotch verify bundle.json

Command line

trustnotch verify [--keys PATH | --offline] [--json] BUNDLE
  • BUNDLE — path to a proof-bundle JSON file.
  • --keys PATH — verify signatures against your own pubkeys.json (default: the keys bundled with this package).
  • --offline — skip the receipt (signature) tier; verify inclusion and anchor only, no keys required.
  • --json — emit machine-readable JSON.

It prints each tier's status; add --json for a structured result.

Exit codes

  • 0 -- verified: no tier failed. Tiers reported na (the receipt tier under --offline, or anchoring not yet on Bitcoin) are not failures.
  • 1 -- not verified: at least one tier failed (receipt, inclusion, or anchor_structural).
  • 2 -- input error: the bundle could not be read or is not a proof bundle.

A pipeline that gates on trustnotch verify bundle.json therefore rejects a bundle whose anchoring proof does not parse, under both the default and --offline modes.

Library

import json
from pathlib import Path
from trustnotch.verify import verify, load_pubkeys, load_bundled_pubkeys

bundle = json.loads(Path("proof.json").read_text())

# verify against the keys shipped with this package…
result = verify(bundle, load_bundled_pubkeys())

# …or against keys you supply
trusted = load_pubkeys(json.loads(Path("pubkeys.json").read_text()))
result = verify(bundle, trusted)

if result.receipt_and_inclusion_ok:
    ...

What it checks

verify() reports each tier independently and deliberately offers no single "verified" boolean (see proof-format-v1 §6) — you decide which tiers must hold for your threat model:

  • receipt — the bundle's signature verifies against a trusted key.
  • inclusion — the entry is provably included under the signed Merkle root (RFC 6962).
  • anchor_structural — the OpenTimestamps proof is well-formed and commits the Merkle root to a Bitcoin timestamp. This is a structural check of the timestamp proof; confirming the anchoring transaction against the live Bitcoin chain is a separate step that requires chain data.

About this repository

This is the source of the published trustnotch package. The PyPI wheel is built from exactly this tree, and the repository is kept in sync with the package at each release, so the code you audit here is the code that runs.

Release files for trustnotch 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trustnotch 0.2.0
File Size Uploaded
trustnotch-0.2.0.tar.gz 18.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trustnotch 0.2.0
File Interpreter ABI Platform
trustnotch-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 42.2 kB

Release files / trustnotch-0.2.0.tar.gz

Download URL trustnotch-0.2.0.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
77ccc2c68499a742218f9a926ba8742ea9a5da9ca0c4aee6391a89e044bd1d16
BLAKE2b-256 checksum
How to use checksums
1c97628942dc93ee47e91c45f917d6d40b5d6057c60b92f4aaf98b1069e02d99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / trustnotch-0.2.0-py3-none-any.whl

Download URL trustnotch-0.2.0-py3-none-any.whl
Size 23.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2ec4bf3555bbee3a369100eed924ee8812087a7b8c00bf7e7969fb753a0ae560
BLAKE2b-256 checksum
How to use checksums
6dac9e71f5788cda95af9b016879da4de689061870b1a62efee1a00805837743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page