tinyzkp
Python client for the TinyZKP proving API — generate and verify ZK-STARK proofs.
Install
pip install tinyzkp
Quick Start
import asyncio
from tinyzkp import TinyZKP
async def main():
async with TinyZKP("https://api.tinyzkp.com", api_key="tzk_...") as client:
# Prove a secret is in range [0, 100] — without revealing it
job_id = await client.prove_template("range_proof", params={
"min": 0, "max": 100, "witness_steps": [42, 44],
})
# Wait for the proof (polls automatically, typically 1-5 seconds)
proof = await client.wait_for_proof(job_id)
# Verify it (always free)
result = await client.verify(proof)
assert result.ok # True — verified without learning the secret
asyncio.run(main())
What are witness_steps?
The witness_steps encode your secret value as internal computation steps. They are never revealed to the verifier — only the proof (which vouches for them) is shared.
API
TinyZKP(base_url, *, api_key=None, timeout=30.0)— Create a clientprove_template(template_id, params={...})— Submit a proof via template (recommended)prove(program=..., initial_acc=0, final_acc=0, **params)— Submit via raw programprove_status(job_id)— Check job statuswait_for_proof(job_id, poll_interval=1.0, timeout=300.0)— Poll until proof is readyverify(proof)— Verify a proof (free)healthz()— Check server health
Templates
Six built-in templates — no cryptography knowledge needed:
| Template | Proves | Example |
|---|---|---|
range_proof |
A secret is in [min, max] | Age verification, credit scores |
hash_preimage |
You know a secret matching a hash | Password proofs |
computation_attestation |
f(secret) = public output | ML inference proofs |
accumulator_step |
Additive chain is correct | Balance updates |
policy_compliance |
Actions within a limit | Budget enforcement |
data_integrity |
Data sums to checksum | Audit trails |
Supports both aiohttp (default) and httpx backends.
Metadata
Release files for tinyzkp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tinyzkp-0.1.1.tar.gz | 6.7 kB | Without provenance | Details for tinyzkp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tinyzkp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for tinyzkp-0.1.1-py3-none-any.whl |
Total release size: 13.2 kB
Release files / tinyzkp-0.1.1.tar.gz
| Download URL | tinyzkp-0.1.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1ab2eb07a55a7af916c31b4b9a93ca7557d5d8f5fc5e51054f386f31235c857
|
|
BLAKE2b-256 checksum How to use checksums |
78cb678861ff23aa8d87eeca8d64aa35578eb4987266cab4e3d91edb8b6e3eb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / tinyzkp-0.1.1-py3-none-any.whl
| Download URL | tinyzkp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
956570678876a4f6b45de53fea959b189e9e3f8e1fcd6a603928f2b25424b3eb
|
|
BLAKE2b-256 checksum How to use checksums |
8556658d2d092ba85fcfe7918e39785c961b2599dde9e5ac9624c43c98c689df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for tinyzkp 0.1.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.