tersign (Python)
Tersign — the evidence layer for the agent economy. This package is the verification-first Python SDK: zero dependencies, standard library only — the verify path a tribunal, examiner, or CI job can run with nothing installed.
python3 -m tersign verify receipt.json # offline — no network, ever
python3 -m tersign verify 0x<digest> --ledger … # chain lookup (explicit network)
from tersign import verify_receipt, digest_of, chain_link_digest, verify_link
result = verify_receipt(signed_receipt) # {'valid': True, 'signer': '0x…', 'digest': '0x…'}
What it covers (v0.1):
- RFC 8785 (JCS) canonical form + the Tersign artifact digest
(
keccak256(utf8(JCS(v)))) and chain-link constructor — byte-compatible with the TypeScript reference, pinned by shared cross-implementation vectors. - EIP-712 recovery for the upstream
x402 receiptdomain (the merged offer-receipt extension) — pure-python secp256k1, canonical low-s only. - Counter-signature verification (
verify_link): EIP-191 over the raw 32-byte chain-link digest, recovered against the published ledger signer (https://tersign.ai/v1/ledger).
Issuing/signing lives in the TypeScript SDK (npm
tersign); this package is the
independent second implementation of the verification surface —
cross-implementation by construction. Frozen evidence bundles
(tersign-evidence-bundle-v1) ship their own copy of this verify core inside
the artifact, so bundle verification never depends on an install.
No console script on purpose: the tersign bin name belongs to the npm
package; the Python surface is python3 -m tersign.
Metadata
Release files for tersign 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tersign-0.1.0.tar.gz | 9.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tersign-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 kB
Release files / tersign-0.1.0.tar.gz
| Download URL | tersign-0.1.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b75d7a63355f3d9de292cb3bf3a777d016eb5261ae9ae8baacd0fadc058d1c3a
|
|
BLAKE2b-256 checksum How to use checksums |
e86d16e21068a09f02d8626064cf66487fb4e40bcb388bad76e83ea09e2e2d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / tersign-0.1.0-py3-none-any.whl
| Download URL | tersign-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ab6504662a17e510b9c50d11249ea7fa33f51ca9c8327e61cd8114541702dfb
|
|
BLAKE2b-256 checksum How to use checksums |
c50f9405b2319161e5ff4cfbbe8f04260c1c7a9a678630d2ac4b7d03aa0f0167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|