vauban-x402-stark-receipt
Python reference runner for JCS canonical preimage discipline in the x402 STARK Receipt Format Extension (draft-vauban-x402-stark-receipts).
Mirrors the Rust crate vauban-x402-jcs-conformance
v0.1.0 API shape. Pure Python ; no Rust toolchain required.
Install
pip install vauban-x402-stark-receipt
API
from vauban_x402_stark_receipt import jcs_canonical_bytes, jcs_hash, jcs_sha256, validate_pair_invariant
# JCS-canonical UTF-8 bytes (RFC 8785)
raw = jcs_canonical_bytes({"b": 2, "a": 1})
# b'{"a":1,"b":2}'
# Canonical preimage + digest
b64, digest = jcs_hash({"amount": 100, "currency": "STRK"})
# ("eyJhbW91bnQ...", "sha256:abcdef...")
# Digest only
d = jcs_sha256({"amount": 100})
# "sha256:abcdef..."
# Pair invariant: left and right produce distinct digests
ok = validate_pair_invariant({"a": 1}, {"a": 2})
# True
Provenance
- IETF I-D:
draft-vauban-x402-stark-receipts; JCS preimage discipline, Section 4.2 - Sister crate:
vauban-x402-jcs-conformanceon crates.io (Rust reference, Apache 2.0) - JCS implementation:
rfc8785by Trail of Bits
License
Apache 2.0 ; see LICENSE.
Metadata
Release files for vauban-x402-stark-receipt 0.1.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 | |
|---|---|---|---|
| vauban_x402_stark_receipt-0.1.0.tar.gz | 4.7 kB | Details |
Release files / vauban_x402_stark_receipt-0.1.0.tar.gz
| Download URL | vauban_x402_stark_receipt-0.1.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6aeb1a228e98e1720011bff92995c49945aeb0550ecab7a462cd8a9b8c480be
|
|
BLAKE2b-256 checksum How to use checksums |
2ea5ff3c012d77cf9b5cfd32a1e25184f225a73d7585447ba23de4a8e6853e20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|