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)

Direct local upload is intentionally unsupported. Create the version-matching python-verify-v<version> tag from merged main, then manually dispatch publish-python-verify.yml with the exact typed confirmation and approve the protected registry-publishing-approval job. The workflow builds twice, attests the exact wheel and source distribution, publishes through PyPI OIDC, and byte-compares both registry artifacts.

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.6.0.tar.gz (66.9 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.6.0-py3-none-any.whl (46.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: emilia_verify-2.6.0.tar.gz
  • Upload date:
  • Size: 66.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for emilia_verify-2.6.0.tar.gz
Algorithm Hash digest
SHA256 21625e8555e3b64a08bff1d0e1b17e7f9cfbfcc84c3bb0a3ce93f433c8afacb0
MD5 c0297bd77cd25d3c043355a0c0b6445f
BLAKE2b-256 1c1c09850ad8a3041993d1e1ab58490e307006acc3d7dda9a5f9784b3b62f217

See more details on using hashes here.

Provenance

The following attestation bundles were made for emilia_verify-2.6.0.tar.gz:

Publisher: publish-python-verify.yml on emiliaprotocol/emilia-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: emilia_verify-2.6.0-py3-none-any.whl
  • Upload date:
  • Size: 46.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for emilia_verify-2.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a2fe8538836f6ed3990c5656ae7f033742bab49460c4f6bebb0ae508ec61447
MD5 e9363c42214bc4d8e0c4bcf044337800
BLAKE2b-256 1918c19dbbc848f2145b9cbe5c8cbc60703c947743f5f77f89c5e4625bb4fbc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for emilia_verify-2.6.0-py3-none-any.whl:

Publisher: publish-python-verify.yml on emiliaprotocol/emilia-protocol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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