lyntway
Govern content and verify signed action receipts.
pip install lyntway
Verify a receipt offline
No network, no Lyntway account. A receipt is only evidence if a third party can check it without asking the issuer for permission.
from lyntway import verify
result = verify(receipt, {
"lyntway-core-1": "TyjVG4H0Md9f4TJqWkTFXKDm1iHUPT5A80U1V0H+omM=",
})
if result.valid and result.full_strength:
print("governed:", result.decision)
Check full_strength, not valid, before showing a verified badge. A
receipt can be cryptographically perfect and still attest that governance was
bypassed — a badge driven by valid alone claims more than the receipt does.
result.warnings explains what was degraded and why.
Govern content
from lyntway import Lyntway
client = Lyntway(base_url, api_key)
response = client.govern(
chain_id="ws_acme",
content="Customer priya@acme.com paid with 4111111111111111.",
actor_id="agent_support",
destination="api.anthropic.com",
)
print(response.content)
# Customer lynt-m2i5r72j2b5ve@tokenized.invalid paid with 9999482578971289.
Tokens preserve format: the email is still a valid address, the card still passes Luhn, and both land in reserved ranges that cannot route. Downstream validation keeps working instead of rejecting governed content.
Tokens are stable within a chain_id, so an agent can correlate the same
value across separate responses.
Record what LiteLLM sends, including Bedrock and Vertex
AWS Bedrock and Google Vertex sign every request in a way that breaks the moment a proxy sits in the path, so neither can be routed through a gateway. A callback running inside LiteLLM is the only place those calls are visible.
In config.yaml:
litellm_settings:
callbacks: [lyntway.litellm.handler]
environment_variables:
LYNTWAY_URL: https://your-lyntway
LYNTWAY_KEY: sk-...
Every call is inspected and signed. Attribution comes from the virtual key,
so a finding lands on the person who caused it rather than on the proxy, and
the destination recorded is the model — bedrock/anthropic.claude-3-sonnet,
not litellm.
It never blocks and never raises. The hook runs after the response returns, so there is nothing left to change, and a recorder that can fail somebody's traffic is a recorder they remove. If Lyntway is unreachable the call still succeeds and the receipt is simply missing, which the coverage report shows.
The receipt records that your gateway made the call rather than that we
watched it leave — asserted rather than observed. Weaker evidence than
routing through the gateway, and stronger than the alternative for Bedrock
and Vertex, which is no record at all.
Dependencies
One: cryptography, for Ed25519. Python has no Ed25519 in its standard
library, and this code decides whether evidence is genuine — an SDK is the
wrong place to save a dependency on hand-rolled elliptic curve arithmetic.
HTTP uses urllib from the standard library.
Interoperability
Receipts are canonicalised with RFC 8785 JCS. This implementation is tested byte-for-byte against the Go reference on every commit, alongside the TypeScript SDK — a single byte of divergence would make every signature fail in a way that looks exactly like tampering.
Links
- lyntway.com — the service, and a receipt verifier that needs no account
- Documentation — including how to check a receipt from scratch, with no tool of ours
- Source
License
Apache-2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lyntway-0.1.0.tar.gz.
File metadata
- Download URL: lyntway-0.1.0.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2af591be227b0e2d155226248078cd0c6dd1d37e976562a409a58a7fc0632cf
|
|
| MD5 |
1289565e934898dd0c0586477fd4c086
|
|
| BLAKE2b-256 |
1f7d71d085a4c05cf3d98347ac5786d28673280b082f8e22185a4096eba864a9
|
Provenance
The following attestation bundles were made for lyntway-0.1.0.tar.gz:
Publisher:
release.yml on lynt-x-global/lyntway-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lyntway-0.1.0.tar.gz -
Subject digest:
c2af591be227b0e2d155226248078cd0c6dd1d37e976562a409a58a7fc0632cf - Sigstore transparency entry: 2499599394
- Sigstore integration time:
-
Permalink:
lynt-x-global/lyntway-core@6a73ec7483a37109f5c7f30ffe1baa80f67ce2d0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/lynt-x-global
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6a73ec7483a37109f5c7f30ffe1baa80f67ce2d0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file lyntway-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lyntway-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a0fe95067d156865b19124b86744c4431477b8a3e533b5d570da2ca289dfc6c
|
|
| MD5 |
40e4be2079c739f55315fd6e7c705035
|
|
| BLAKE2b-256 |
4e0f8cf54634e5207cef58f045923dd589c9013abc14c8eedbc853b20859446d
|
Provenance
The following attestation bundles were made for lyntway-0.1.0-py3-none-any.whl:
Publisher:
release.yml on lynt-x-global/lyntway-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lyntway-0.1.0-py3-none-any.whl -
Subject digest:
1a0fe95067d156865b19124b86744c4431477b8a3e533b5d570da2ca289dfc6c - Sigstore transparency entry: 2499599401
- Sigstore integration time:
-
Permalink:
lynt-x-global/lyntway-core@6a73ec7483a37109f5c7f30ffe1baa80f67ce2d0 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/lynt-x-global
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6a73ec7483a37109f5c7f30ffe1baa80f67ce2d0 -
Trigger Event:
push
-
Statement type: