Skip to main content

Zero-infrastructure verification of EMILIA Protocol trust receipts (Ed25519 + Merkle). Byte-compatible with @emilia-protocol/verify.

Project description

emilia-verify (Python)

Zero-infrastructure verification of EMILIA Protocol trust receipts — pure Python, one dependency (cryptography). A faithful port of @emilia-protocol/verify: recursive canonical JSON + Ed25519 (SPKI-DER public key) + sorted-pair Merkle anchors.

The guarantee: a receipt signed on the Node side verifies here, and vice versa — proven by a cross-language test (tests/test_verify.py verifies a JS-signed fixture). No EP account, no API key. Just math.

Install

pip install emilia-verify        # once published
# or, from the repo:  pip install packages/python-verify

Use

from emilia_verify import verify_receipt

result = verify_receipt(receipt_doc, signer_public_key_base64url)
if result.valid:
    print("authorized by", receipt_doc["payload"]["claim"]["approver"])
else:
    print("rejected:", result.checks, result.error)

verify_receipt(doc, public_key_base64url) -> VerifyResult(valid, checks, error) checks the version, the Ed25519 signature over the canonical payload, and (when present) the Merkle anchor. It never raises on bad input — a malformed receipt returns valid=False.

Also exported: verify_merkle_anchor(leaf_hash, proof, expected_root) and canonicalize(value) (the exact canonical-JSON used for signing).

Why this exists

A trust receipt is only as useful as the number of places that can check it. Shipping a verifier in the Python agent ecosystem (LangChain, CrewAI, AutoGen, LlamaIndex) means a receipt minted anywhere can be verified offline, in the language your agent already speaks.

Publishing (maintainers)

python -m build       # produces dist/*.whl + *.tar.gz (verified to build cleanly)
twine upload dist/*   # your PyPI credentials — nothing is stored

Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emilia_verify-2.2.0.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emilia_verify-2.2.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file emilia_verify-2.2.0.tar.gz.

File metadata

  • Download URL: emilia_verify-2.2.0.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for emilia_verify-2.2.0.tar.gz
Algorithm Hash digest
SHA256 83196da751cec9047b1f980a0aa4ce9931d6f2472007bda786a72d15a26a8283
MD5 696ded217f3e601378542bb3bd4e33b5
BLAKE2b-256 b2e0059771f9d2c2bb4de228735227e45ddc043e3274adb6083f6a25bbe7cac7

See more details on using hashes here.

File details

Details for the file emilia_verify-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: emilia_verify-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for emilia_verify-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 977838717e444369fc1e42890fcc86c62dfb0834ec05f1cc1f2a1aee5ae41344
MD5 f76484cd33b0e45a9ebeec24b847f024
BLAKE2b-256 f5eb1b3279cbfe61a4f60df8a955b0aedc6ec11942a7f6a2a43d7c31e64bc8a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page