Verify a Spoolis outcome receipt
An Outcome Receipt is a signed attestation of delivered work: acceptance criteria agreed before delivery, what passed, and what was earned.
from spoolis_receipt_verifier import verify_outcome_receipt
result = verify_outcome_receipt(receipt, trust_set=trust_set)
print(result["valid"])
print(receipt["amounts"]["earned"])
Install
pip install spoolis-receipt-verifier
No Spoolis account is required to verify a receipt. The package uses cryptography for Ed25519 signature verification and supports Python 3.10 or later.
Require an outcome
require_outcome verifies the full receipt before applying the consumer's policy. This example acts only on a valid outcome with a passing result, at least 100 accepted units, and fully satisfied evidence requirements:
from spoolis_receipt_verifier import require_outcome
required = require_outcome(
receipt,
{
"minimum_status": "pass",
"min_accepted_units": 100,
"evidence_requirements": "satisfied",
},
trust_set=trust_set,
)
if not required["ok"]:
raise RuntimeError(", ".join(required["reasons"]))
A partial batch has result: "partial", not pass. To act on partial batches, set minimum_status to partial or omit it, then gate on min_accepted_units, min_accepted_ratio, or min_earned. The receipt's amounts.earned excludes rejected and uncertain units.
Reading partial, unitized results
The accepted_units, rejected_units, and uncertain_units helpers return published unit rows for one verdict. They return None when per-unit rows were not published. earned_amount returns the decimal string or None.
Trust material
Spoolis publishes receipt trust material at https://spoolis.com/.well-known/spoolis-keys.json. Pin the receipt entries you accept and pass the selected environment's array as trust_set. fetch_trust_set(url, environment) is an online convenience, while verification itself remains offline.
Offline verification and online status
Signature validity is offline and permanent when the verifier has the receipt and a pinned trust set. Online correction and revocation status is optional:
from spoolis_receipt_verifier import fetch_receipt_status, verify_outcome_receipt
status = fetch_receipt_status("https://spoolis.com", receipt["id"])
result = verify_outcome_receipt(receipt, trust_set=trust_set, status_source=status)
Without a status source, verification includes the status_source_unavailable advisory.
Security model
A valid result proves that a supplied trusted key signed the receipt, the content-derived ID matches, and recognized structural and arithmetic checks pass. It does not prove that referenced evidence is true, resolve actor identities, grant payment authority, or prove payment settlement. Consumers must enforce their own authorization and consume-once rules.
See the receipt verification documentation for integration details.
Release files for spoolis-receipt-verifier 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 | |
|---|---|---|---|
| spoolis_receipt_verifier-0.1.0.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spoolis_receipt_verifier-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / spoolis_receipt_verifier-0.1.0.tar.gz
| Download URL | spoolis_receipt_verifier-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b5b23b4174e00efc2fc2b52c57f9efa158863da2a1cd677ce7e748377de61bfd
|
|
BLAKE2b-256 checksum How to use checksums |
7f74483c72938de0f1667253592b6007eeca38c2f2aff29c3af8c2a5886a92e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / spoolis_receipt_verifier-0.1.0-py3-none-any.whl
| Download URL | spoolis_receipt_verifier-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca56bb429737166e25a4aef718848a84535093b9a04d44ffa7d8dcde08e7f5a1
|
|
BLAKE2b-256 checksum How to use checksums |
6677154be20119743f3f20703275c8ab98db16973db7e2e12d2f5685168abefb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|