paxiom-receipts (Python Reference SDK — v0.2.0)
Zero-dependency Python 3.10+ reference implementation of paxiom.receipt.v0 — open MIT cryptographic proof-of-delivery receipts (Payment-Receipt / X-Paxiom-Receipt), seller key discovery (/.well-known/x402-keys.json), pre-payment x402 seller readiness checks, live Base USDC settlement verification, and FastAPI / Starlette ASGI middleware.
- Zero required dependencies: Ships a pure-stdlib RFC 8032 Ed25519 implementation (automatically accelerating via OpenSSL
cryptographywhen installed in the environment). - 100% byte-compatible with
@paxiom/receipts(0.2.0, Node.js): Shares identical PKCS#8 PEM keys, RFC 8785 JCS (jcs-sha256) and non-JSON (raw-sha256) payload hashing,x402v2 header auto-parsing (CAIP-2 EVM & Solana),Payment-Receipt+X-Paxiom-Receiptheaders, and all 16 deterministic trust states (includingunauthorized_issuer). - Inline PEP 561 types (
py.typed): Full type hints formypy,pyright, and IDE autocomplete.
Install
# From PyPI:
pip install paxiom-receipts
# Optional OpenSSL Ed25519 acceleration:
pip install "paxiom-receipts[fast]"
Seller Quickstart (FastAPI / Starlette / Litestar ASGI)
PaxiomReceiptMiddleware automatically decodes x402 v2 PAYMENT-SIGNATURE / PAYMENT-RESPONSE headers, hashes JSON (jcs-sha256) or Markdown/text/binary (raw-sha256) 2xx responses up to 256 KiB, and attaches signed Payment-Receipt and X-Paxiom-Receipt headers:
import os
from fastapi import FastAPI
from paxiom_receipts import PaxiomReceiptMiddleware
app = FastAPI()
if os.environ.get("PAXIOM_PRIVATE_KEY_PEM"):
app.add_middleware(
PaxiomReceiptMiddleware,
private_key=os.environ["PAXIOM_PRIVATE_KEY_PEM"],
issuer={
"name": "acme-python-api",
"uri": "https://api.acme.dev",
"keyId": "seller-01",
"payTo": "0x9786F5532ab7d7556CDa53E3f6c2d937c9b87Bc4",
"keysUri": "https://api.acme.dev/.well-known/x402-keys.json",
},
service_name="Inference API",
)
@app.post("/v1/infer")
async def infer():
return {"answer": "42"} # Emits signed Payment-Receipt + X-Paxiom-Receipt headers
Buyer Quickstart (LangGraph / CrewAI / httpx / requests)
from paxiom_receipts import (
discover_issuer_keys,
preflight_x402,
verify_response_receipt,
verify_receipt_live,
)
# 1. Free pre-payment seller safety scan via api.paxiom.org/v1/x402/preflight
scan = preflight_x402("https://seller.example/v1/infer", max_budget_atomic="50000")
# 2. Discover seller's published Ed25519 keys (/.well-known/x402-keys.json)
keys_doc = discover_issuer_keys("https://seller.example")
# 3. Offline verification with signer + payTo authorization on any httpx / requests response
check = verify_response_receipt(
paid_response,
output=paid_response.json(),
expected_issuer_public_keys=keys_doc["publicKeys"] if keys_doc["ok"] else None,
expected_pay_to="0xSellerAddress...",
)
# 4. Free live Base USDC settlement + counter-attestation via api.paxiom.org/v1/receipt/verify-live
if check["trustState"] == "settlement_claimed_not_checked":
live = verify_receipt_live(
check["receipt"],
output=paid_response.json(),
expected_pay_to="0xSellerAddress...",
)
Links
x402Extension Spec: https://paxiom.org/standards/receipts/v0/x402-delivery-receipt-extension.md- Specification & Vectors: https://paxiom.org/receipts.html
- Free Public Verifier & Keys: https://api.paxiom.org/.well-known/x402-keys.json
- MCP Server (
0.2.0): https://api.paxiom.org/mcp - TypeScript / Node.js SDK:
@paxiom/receipts
Metadata
Release files for paxiom-receipts 0.2.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 | Provenance | Actions |
|---|---|---|---|---|
| paxiom_receipts-0.2.0.tar.gz | 30.5 kB | Without provenance | Details for paxiom_receipts-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| paxiom_receipts-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for paxiom_receipts-0.2.0-py3-none-any.whl |
Total release size: 57.7 kB
Release files / paxiom_receipts-0.2.0.tar.gz
| Download URL | paxiom_receipts-0.2.0.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61d9c58c07c927343b43e69dcf90802c449e5646312b0a28972f037c58fe515b
|
|
BLAKE2b-256 checksum How to use checksums |
997faaf3d312fff14083211813c6a4aae6b99f320e5422f6a54db3f9ebff6764
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / paxiom_receipts-0.2.0-py3-none-any.whl
| Download URL | paxiom_receipts-0.2.0-py3-none-any.whl |
|---|---|
| Size | 27.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
afde58898e6632e1005f8e5e4ce86fd2b83697f6d442c53029e7878932a26d00
|
|
BLAKE2b-256 checksum How to use checksums |
8a37b2a9f2e2fcc459ae546ca243831a48feb731ba08248824cdabec2f9db02f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for paxiom-receipts 0.2.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.