Skip to main content

regent-receipt-verify

Verify a Regent Control receipt or allow token without Regent: only the token and a JWKS you saved while the issuer was reachable. Nothing calls the network. One dependency (cryptography) for RS256.

pip install regent-receipt-verify
curl -s https://control-api.regentprotocol.org/v1/control/.well-known/jwks.json > jwks-2026-09.json   # save it now, keep it with the receipts
regent-verify @receipt.txt --jwks jwks-2026-09.json --request request.json --mandate mandate-v2-reveal.json --policy policy-v3-reveal.json
from regent_receipt_verify import verify
res = verify(token, jwks, request={"tool": "stripe", "action": "charge.create", "resource": None, "args": {...}},
             mandate_reveal=reveal_from_owner, policy_reveal=policy_reveal_from_org)
res.valid, res.kind, res.claims, res.args_hash_match, res.mandate_match, res.policy_match

What it proves:

check meaning
signature (RS256, kid from the JWKS) Regent's issuer signed exactly these claims
kind receipt / allow / budget a receipt (typ receipt+jwt, aud regent-receipt) can never pass as an access token
expired receipts carry a 10-year evidence period; an allow token lives about a minute, so for evidence its expiry is a note, not a failure
args_hash_match the token authorised this exact request (tool, action, resource, args) and nothing else
mandate_match the owner's revealed mandate version (snapshot + salt, terms-v2) opens the receipt's mandate_hash
policy_match the organisation's revealed policy version (text + profile + salt, policy-v1) opens policy_hash; starter-pack decisions need only the public text

Key rotation: pass --jwks several times (every JWKS you saved). Exit code 0 when the signature verifies and every supplied check matches.

Test vectors are minted by the real issuer (packages/receipt-verify-vectors), and the same file drives the Node package @regent-protocol/receipt-verify.

Metadata

Release files for regent-receipt-verify 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 regent-receipt-verify 0.1.0
File Size Uploaded
regent_receipt_verify-0.1.0.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for regent-receipt-verify 0.1.0
File Interpreter ABI Platform
regent_receipt_verify-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / regent_receipt_verify-0.1.0.tar.gz

Download URL regent_receipt_verify-0.1.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7765e38edb6bda65e823dc0635013f5e719669a89bf0893666826e98ddd76d2b
BLAKE2b-256 checksum
How to use checksums
e225368f18dd578f6a70297fdf01863b1b7b3e35cf41486d40467ff15f69bd43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

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

Download URL regent_receipt_verify-0.1.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7940ccdd8f6e13cd2ea2ebca9ff4124c037c5da6e95ccf6a623f3952b0381c22
BLAKE2b-256 checksum
How to use checksums
1c18a8a45d4ec95915965c4d74f08da7e15bb007ec2f55b191b16f31469b8926
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

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