Skip to main content

ledgerproof-aleph-alpha

LedgerProof side-channel adapter for the Aleph Alpha Python SDK, producing EU AI Act Article 50 transparency receipts for completions from Luminous and other Aleph Alpha models — including on-premises sovereign deployments operated inside Germany and the broader EU.

Why Aleph Alpha + LedgerProof? Aleph Alpha is Germany's flagship sovereign-AI foundation-model company, built for European data residency, on-premises operation in regulated environments (financial services, public sector, defence, healthcare), and integration with German enterprise governance frameworks. LedgerProof's on_prem_sovereign_deployment/v1 schema captures the hosting jurisdiction and operator attestation alongside every receipt — strategic for BaFin / Bundesbank / BSI conversations and for organisations that need a verifiable chain of provenance proving an AI interaction never left a designated jurisdiction.


C1 — Independence disclaimer

LedgerProof is an independent open cryptographic protocol stewarded by the LedgerProof Foundation (Stichting, the Netherlands). It is not endorsed by, certified by, or affiliated with:

  • the European Commission, the EU AI Office, ENISA, or any EU Member State regulator
  • BaFin, Bundesbank, BSI, or any German federal authority
  • Aleph Alpha GmbH

LedgerProof receipts are not a Conformity Assessment, a CE-marking artefact, or a presumption of conformity under Article 40 of Regulation (EU) 2024/1689. Receipts are tamper-evident transparency evidence intended to support — not replace — a provider's or deployer's Article 50 obligations.

This adapter does not modify any model response (constraint C7: side-channel emission only). It observes the prompt and completion, then emits a separately signed receipt over a side-channel emitter you configure.


Install

pip install ledgerproof-aleph-alpha

Python 3.10+ required.


Quick start (sync)

from aleph_alpha_client import Client, CompletionRequest, Prompt
from aleph_alpha_ledgerproof import LedgerProofAlephAlpha

upstream = Client(token="YOUR_TOKEN", host="https://api.aleph-alpha.com")

client = LedgerProofAlephAlpha(
    upstream,
    article="50(2)",
    deployer_id="acme-de-frankfurt",
)

req = CompletionRequest(
    prompt=Prompt.from_text("Briefly explain Article 50 transparency obligations."),
    maximum_tokens=64,
)
resp = client.complete(req, model="luminous-base")

print(resp.completions[0].completion)
# receipt is emitted to the configured emitter (default: stdout JSON)

The response object returned by complete() is the exact upstream CompletionResponse. No fields are added, removed, or reordered (C7).

Async

from aleph_alpha_client import AsyncClient, CompletionRequest, Prompt
from aleph_alpha_ledgerproof import LedgerProofAsyncAlephAlpha

async with AsyncClient(token="YOUR_TOKEN", host="https://api.aleph-alpha.com") as up:
    client = LedgerProofAsyncAlephAlpha(up, article="50(2)")
    resp = await client.complete(req, model="luminous-base")

Decorator pattern

from aleph_alpha_ledgerproof import lpr_track

@lpr_track(article="50(1)", schema="chatbot_session/v1")
def chat(prompt: str) -> str:
    req = CompletionRequest(prompt=Prompt.from_text(prompt), maximum_tokens=128)
    r = upstream.complete(req, model="luminous-base")
    return r.completions[0].completion

Manual emission

from aleph_alpha_ledgerproof import emit_receipt

emit_receipt(
    article="50(1)",
    schema="on_prem_sovereign_deployment/v1",
    prompt_text=prompt,
    completion_text=output,
    model="luminous-supreme",
    extra={
        "hosting_jurisdiction": "DE",
        "operator": "Acme Bank AG",
        "sovereignty_attestation": "on-prem-frankfurt-dc01",
    },
)

Schemas

Schema Article 50 scope When to use
chatbot_session/v1 50(1) — natural-person interaction disclosure Any chatbot/agent surface
generated_content/v1 50(2) — synthetic content marking Generated text, summaries, drafts
on_prem_sovereign_deployment/v1 50(1) variant — sovereign / on-prem operator attestation German on-prem Luminous, BaFin-supervised deployments

All three apply Pydantic GDPR validators (no raw PII content in receipt payloads — only hashes; jurisdiction codes constrained to ISO 3166-1 alpha-2).


How it works

  1. You call client.complete(...) exactly as you would with the upstream Aleph Alpha SDK.
  2. The adapter forwards the call unmodified and captures the prompt + completion (C7).
  3. It computes an incremental SHA-256 over the canonical CBOR encoding (C6: stream-safe).
  4. It signs the digest with an ephemeral Ed25519 key (C4: local verification only).
  5. It hands the receipt to an Emitter (default: stdout JSON). You can plug in Kafka, S3, an HSM-backed signer, or a Foundation-operated witness later.

The response payload returned to you is byte-identical to upstream.


Local verification (C4)

from aleph_alpha_ledgerproof import verify_receipt

ok = verify_receipt(receipt_json)
assert ok is True

There is no remote attestation service, no phone-home, no telemetry. Verification is purely local and offline.


License

Apache 2.0 — see LICENSE.

Metadata

Release files for aleph-alpha-ledgerproof 0.1.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 aleph-alpha-ledgerproof 0.1.0
File Size Uploaded Provenance
aleph_alpha_ledgerproof-0.1.0.tar.gz 17.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aleph-alpha-ledgerproof 0.1.0
File Interpreter ABI Platform
aleph_alpha_ledgerproof-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.3 kB

Release files / aleph_alpha_ledgerproof-0.1.0.tar.gz

Download URL aleph_alpha_ledgerproof-0.1.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
83a6e324de0298da92494b25413a7cae858f41b480d4c4d3a2bd7907f8377787
BLAKE2b-256 checksum
How to use checksums
ae0e6527fe7f970d71695ddd775689b1988065356c00bbbcdf6d4609d872ed8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / aleph_alpha_ledgerproof-0.1.0-py3-none-any.whl

Download URL aleph_alpha_ledgerproof-0.1.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5dc63267e2f973bfa2f17f0447bfaadc6e5fe59c4c63ddb65c9eb2e0e76cf626
BLAKE2b-256 checksum
How to use checksums
753a6540c9688a677b5d8649526ce548864b63a7447b2d295c201d4320d99759
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for aleph-alpha-ledgerproof 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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