chain-receipt-core (Python)
Reference implementation of the Chain-Receipt v1.0.0 spec
(../SCHEMA.md). Provides:
- Pydantic v2 models (
Receipt,Interaction,Chain,Stability,Signature) - RFC 8785–compatible canonical JSON
- SHA-256 hash helpers (
receipt_hash,compute_tool_calls_hash,compute_text_hash) - Ed25519 sign / verify
ReceiptBuilderfor emitter-side useverify_receipt,verify_chain
from chain_receipt_core import (
ClientInfo, Interaction, ReceiptBuilder, generate_keypair, verify_chain,
compute_text_hash, compute_tool_calls_hash,
)
sk, pub_b64 = generate_keypair()
client = ClientInfo(
name="chain-receipt-langchain-sdk",
version="0.1.0",
platform="python-3.12",
emitter_pubkey=f"ed25519:{pub_b64}",
)
b = ReceiptBuilder(client=client, private_key=sk,
verifier_url="https://chain-determinism.org",
chain_seed=pub_b64.encode())
inter = Interaction(
vendor="anthropic", model="claude-sonnet-4-5", temperature=0.0,
system_prompt_hash=compute_text_hash("you are helpful"),
prompt_hash=compute_text_hash("hello"),
response_hash=compute_text_hash("hi"),
tool_calls_hash=compute_tool_calls_hash([]),
n_tool_calls=0, latency_ms=120,
)
r = b.build(interaction=inter)
assert verify_chain([r]).ok
Cross-language conformance vectors live in ../conformance/vectors/.
Metadata
Release files for chain-receipt-core 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chain_receipt_core-0.1.4.tar.gz | 14.8 kB | Without provenance | Details for chain_receipt_core-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chain_receipt_core-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for chain_receipt_core-0.1.4-py3-none-any.whl |
Total release size: 26.4 kB
Release files / chain_receipt_core-0.1.4.tar.gz
| Download URL | chain_receipt_core-0.1.4.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
536d72e2b3b45dea325942f6d2eb29b374106484a2bc6edcd56dab3b2d933cc1
|
|
BLAKE2b-256 checksum How to use checksums |
62731656cfdef7b706c8a7a5d5ba796d6358490681aa7243bdf91272c543b2be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.15
|
Release files / chain_receipt_core-0.1.4-py3-none-any.whl
| Download URL | chain_receipt_core-0.1.4-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d9263c0e3c8b6f467131d2f36599d91ed126ebbae38e25f9584f84d267094be
|
|
BLAKE2b-256 checksum How to use checksums |
a5be5c92d60c5e409ca88a879d495b851f60b4f624079a3d39313cd197202d33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.15
|
Security for chain-receipt-core 0.1.4
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.