zerostyl-sdk (Python)
Python SDK for the ZeroStyl zk toolkit on
Arbitrum Stylus. Parses the exporter's abi.json documents into typed dataclasses and
generates typed Python bindings — the same scope as @zerostyl/sdk-ts, in Python.
Pure Python, zero runtime dependencies, Python ≥ 3.10.
Install
pip install zerostyl-sdk
Or from a clone of the repository, for development:
cd packages/sdk-py
python -m pip install ".[dev]"
Usage
from pathlib import Path
from zerostyl_sdk import parse_abi_schema, generate_bindings
abi = parse_abi_schema(Path("abi.json").read_text())
print(abi.circuit.name, abi.circuit.num_public_inputs)
bindings = generate_bindings(abi) # a Python module as a string
Path("deposit_bindings.py").write_text(bindings)
CLI (equivalent of the TS SDK's zerostyl-sdk generate):
zerostyl-sdk-py generate --abi abi.json --out bindings.py
python -m zerostyl_sdk generate --abi abi.json
Generated output for the demo circuit:
DEPOSIT_CIRCUIT: Final = {
"name": "deposit",
...
}
@dataclass(frozen=True)
class DepositWitness:
collateral: str
collateral_nonce: str
threshold: str
@dataclass(frozen=True)
class DepositPublicInputs:
collateral_commitment: str
Type mapping: u64/u128 → int, bool → bool, fp/bytes32/address → str
(0x-prefixed hex), arrays → tuple[..., ...].
Tests
python -m pytest
ruff check src tests
The snapshot test locks the generated bindings for
examples/zk_private_demo/abi.json; regenerate with
REGEN_SDK_PY_SNAPSHOTS=1 python -m pytest.
Scope and future work
Codegen only — proof generation from Python (bindings to the Rust prover) and on-chain submission helpers are future work, mirroring the TypeScript SDK's roadmap.
License
MIT — see the repository's LICENSE.
Metadata
Release files for zerostyl-sdk 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 |
|---|---|---|---|---|
| zerostyl_sdk-0.1.1.tar.gz | 9.1 kB | Without provenance | Details for zerostyl_sdk-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zerostyl_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for zerostyl_sdk-0.1.1-py3-none-any.whl |
Total release size: 18.2 kB
Release files / zerostyl_sdk-0.1.1.tar.gz
| Download URL | zerostyl_sdk-0.1.1.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbbd54068c25d24054466c78906a9a709187730df53e157bba25dbf76b93634b
|
|
BLAKE2b-256 checksum How to use checksums |
574bc1165ba569533b61166f50f563a4a78a6c7b618bf8324243953569cc8626
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / zerostyl_sdk-0.1.1-py3-none-any.whl
| Download URL | zerostyl_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a5117eff5fa27c18cad03e3147e897ca59a592a43845a4696e7287b60352d396
|
|
BLAKE2b-256 checksum How to use checksums |
57aa95eb0298bd0a519bb2a487cd21fdbb472b900560f354ef3c1d8976da86d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for zerostyl-sdk 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.