Python SDK for the Verdifax cryptographic attestation pipeline
Project description
Verdifax Python SDK
Cryptographic attestation for AI inference. Three lines: send a payload, get a signed manifest hash you can give to an auditor.
Install
pip install verdifax
Quickstart
import verdifax
receipt = verdifax.attest(
payload="hello verdifax",
program_id="a" * 64,
route_id="route-test",
registry_record_hash="b" * 64,
)
print(receipt.manifest_hash)
That's it. The receipt's manifest_hash is a 64-char SHA-256 that seals every input, every kernel execution ID, the hardware attestation, the ZK transcript, the formal verifier status, and the final VFA. Anyone with the same inputs can re-derive the same hash.
Configuration
By default the SDK talks to a Verdifax API at http://localhost:9090 (the orchestrator's REST server). Override with environment variables:
export VERDIFAX_API_URL=https://api.verdifax.example.com
export VERDIFAX_API_KEY=your-api-key
Or construct a client explicitly:
from verdifax import VerdifaxClient
client = VerdifaxClient(base_url="https://api.verdifax.example.com", api_key="...")
receipt = client.attest(payload="...", program_id="...", route_id="...", registry_record_hash="...")
Async
import asyncio
from verdifax import AsyncVerdifaxClient
async def main():
async with AsyncVerdifaxClient() as client:
receipt = await client.attest(
payload="hello verdifax",
program_id="a" * 64,
route_id="route-test",
registry_record_hash="b" * 64,
)
print(receipt.manifest_hash)
asyncio.run(main())
Verification
Re-derive the manifest hash from the same inputs and confirm it matches a previously issued receipt:
ok = client.verify(
manifest_hash=receipt.manifest_hash,
payload="hello verdifax",
program_id="a" * 64,
route_id="route-test",
registry_record_hash="b" * 64,
)
Helpers for popular providers
import verdifax
receipt = verdifax.attest_claude_response(
prompt="What is the boiling point of water?",
response="100 °C at sea level.",
program_id="a" * 64,
route_id="claude-route",
registry_record_hash="b" * 64,
)
There is also verdifax.attest_openai_response(...) with the same signature.
License
MIT
Project details
Release history Release notifications | RSS feed
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 verdifax-0.2.0.tar.gz.
File metadata
- Download URL: verdifax-0.2.0.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34d150963ba0a399892270fd40df3e0346993682ad53bb7c5c92aeef848e1a07
|
|
| MD5 |
6a213b903d28779ff339b69c6bb82bc1
|
|
| BLAKE2b-256 |
0bcf1cf0fd7583f300b108af418b0a59cd1320f92ef112dfac5fd9e29dd90526
|
Provenance
The following attestation bundles were made for verdifax-0.2.0.tar.gz:
Publisher:
release.yml on Verdifax/verdifax-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
verdifax-0.2.0.tar.gz -
Subject digest:
34d150963ba0a399892270fd40df3e0346993682ad53bb7c5c92aeef848e1a07 - Sigstore transparency entry: 1473868872
- Sigstore integration time:
-
Permalink:
Verdifax/verdifax-sdk-python@a00824824ec2b45ac78ae1cfe7776659c306aec6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Verdifax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a00824824ec2b45ac78ae1cfe7776659c306aec6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file verdifax-0.2.0-py3-none-any.whl.
File metadata
- Download URL: verdifax-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fc2ae9665c5e231c52095905fd976a7c02adc81c0a707d77e2d16e33ba60241
|
|
| MD5 |
304f7c5b8363aff60cdbd15450f4aab7
|
|
| BLAKE2b-256 |
91f23942d7940d255056384edb3c117d253c0561bbb5f0e5495d9ea68d6a37a1
|
Provenance
The following attestation bundles were made for verdifax-0.2.0-py3-none-any.whl:
Publisher:
release.yml on Verdifax/verdifax-sdk-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
verdifax-0.2.0-py3-none-any.whl -
Subject digest:
9fc2ae9665c5e231c52095905fd976a7c02adc81c0a707d77e2d16e33ba60241 - Sigstore transparency entry: 1473869007
- Sigstore integration time:
-
Permalink:
Verdifax/verdifax-sdk-python@a00824824ec2b45ac78ae1cfe7776659c306aec6 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Verdifax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a00824824ec2b45ac78ae1cfe7776659c306aec6 -
Trigger Event:
push
-
Statement type: