Open Receipt Python verifier
This native Python, verifier-only package performs offline verification for
Open Receipt protocol 0.2.1 and its supported wire spec_version values 0.1
and 0.2. It checks canonical JSON, payload digests, Ed25519 signatures, v0.1
parent bundles, pinned v0.2 issuer metadata and history, key lifecycle state,
and issuance attestations. It does not create or sign receipts, require a
Receipt account, contact the Receipt API, or fetch trust material from the
network.
Python package candidate available in the repository. PyPI publication follows independent review and release approval.
Versioning
The tracked Open Receipt release is 0.2.1. Receipt wire documents continue to
use the supported spec_version values 0.1 and 0.2. Protocol releases,
wire-format versions, and implementation package versions are separate release
coordinates. This unpublished Python candidate is currently versioned 0.2.1.
Repository installation and quick start
Python 3.10 or newer is supported. From this repository, build and install the candidate package rather than using a public package index name:
python -m pip install ./packages/open-receipt-python
import json
from open_receipt import verify_receipt
receipt = json.loads(open("receipt.json", encoding="utf-8").read())
result = verify_receipt(receipt)
print("verified" if result.valid else result.errors)
The runtime dependency is cryptography, used only for maintained Ed25519 key
parsing and signature verification. Canonicalization and protocol evaluation
are implemented directly in Python.
CLI
open-receipt verify ./receipt.json
cat receipt.json | open-receipt verify -
open-receipt verify --json ./receipt.json
open-receipt verify --quiet ./receipt.json
Input is limited to 1 MiB. Exit code 0 means valid (including valid with
warnings), 1 means invalid, and 2 means indeterminate or a malformed CLI or
operational input. The command reads only a local path or stdin and never
performs an implicit network request.
Verdict and trust boundaries
valid means that the supported protocol checks completed successfully.
valid_with_warnings preserves non-fatal trust warnings. invalid is a
fail-closed protocol or cryptographic rejection. indeterminate means the
cryptography may be sound but the supplied offline trust material cannot
establish the issuer or historical key conclusion.
Embedded keys prove signature consistency, not issuer identity. Supply a trusted pinned metadata snapshot, its exact canonical hash, and any required history to establish v0.2 issuer trust. This package never discovers newer key revocations by itself. Callers must obtain and pin trust material through a separately reviewed path.
The CLI rejects duplicate JSON member names before verification. A mapping
passed to verify_receipt cannot reveal duplicates that a permissive parser has
already discarded, so callers accepting untrusted raw JSON must enforce that
boundary while parsing or use the CLI's strict parser.
Conformance
From the repository root, run the shared TypeScript/Python corpus with:
bun run open-receipt:conformance
The canonical schemas live under packages/open-receipt/schemas/. The shared
vectors, expected verdicts, issuer keys, and metadata fixtures live under
packages/open-receipt/conformance/; Python does not carry a copied corpus.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_receipt-0.2.1.tar.gz.
File metadata
- Download URL: open_receipt-0.2.1.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7180dae1023d4cabfb8aae6d9803ae70c04aba0cab5fc8664dd4bd550f34ff8c
|
|
| MD5 |
96c73f9a4ca9c425d65c970a078414cb
|
|
| BLAKE2b-256 |
dfa2d11fdb7fbacc8d443b3d67b5e31729b7457c7fd832ce9e298df2b38b1ace
|
Provenance
The following attestation bundles were made for open_receipt-0.2.1.tar.gz:
Publisher:
release-open-receipt.yml on JasonSmall/attachreceipt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_receipt-0.2.1.tar.gz -
Subject digest:
7180dae1023d4cabfb8aae6d9803ae70c04aba0cab5fc8664dd4bd550f34ff8c - Sigstore transparency entry: 2579386543
- Sigstore integration time:
-
Permalink:
JasonSmall/attachreceipt@0279960fc5a2a32472e0393a4d513f2af832df38 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JasonSmall
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-open-receipt.yml@0279960fc5a2a32472e0393a4d513f2af832df38 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file open_receipt-0.2.1-py3-none-any.whl.
File metadata
- Download URL: open_receipt-0.2.1-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2336c6668256e752150928fc09388896ad516147f4fa1e84c8a4f85118644f3
|
|
| MD5 |
df389251ccdf6852ab4ecd0a5aacb74a
|
|
| BLAKE2b-256 |
cb9d277b67aa939c5e5973d7fde47c1c2a121ce0342a8d1b6e7d22a1eea69ac7
|
Provenance
The following attestation bundles were made for open_receipt-0.2.1-py3-none-any.whl:
Publisher:
release-open-receipt.yml on JasonSmall/attachreceipt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_receipt-0.2.1-py3-none-any.whl -
Subject digest:
f2336c6668256e752150928fc09388896ad516147f4fa1e84c8a4f85118644f3 - Sigstore transparency entry: 2579386556
- Sigstore integration time:
-
Permalink:
JasonSmall/attachreceipt@0279960fc5a2a32472e0393a4d513f2af832df38 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JasonSmall
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-open-receipt.yml@0279960fc5a2a32472e0393a4d513f2af832df38 -
Trigger Event:
workflow_dispatch
-
Statement type: