Metadata-Version: 2.4
Name: sovseal-sdk
Version: 1.0.0
Summary: Official Python SDK for sovseal — client-side zero-knowledge state continuity and replication.
Project-URL: Homepage, https://sovseal.com
Project-URL: Documentation, https://docs.sovseal.com
Project-URL: Repository, https://github.com/sovseal/core
Author-email: sovseal Protocol Contributors <security@sovseal.com>
License-Expression: Apache-2.0
Keywords: agent,ai,encryption,privacy,sovseal,zero-knowledge
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: cryptography>=41.0.0
Requires-Dist: httpx>=0.24.0
Provides-Extra: dev
Requires-Dist: build>=0.10.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: twine>=4.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# sovseal-sdk (Python)

Official Python SDK for **sovseal** — client-side zero-knowledge state continuity and replication.

[![PyPI version](https://img.shields.io/pypi/v/sovseal-sdk.svg)](https://pypi.org/project/sovseal-sdk/)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Installation

```bash
pip install sovseal-sdk
```

## Quickstart

```python
import os
from sovseal import AgentStateClient

# 1. Initialize client and 256-bit AES encryption key
client = AgentStateClient(
    endpoint="https://api.sovseal.com",
    api_key="your-api-key"
)

# 32-byte (256-bit) raw key bytes derived or generated locally
key_bytes = os.urandom(32)

# 2. Encrypt & Submit Zero-Knowledge State Snapshot
receipt = client.snapshot(
    agent_id="agent-007",
    sequence_number=1,
    active_context={
        "patient_id": "P-99482",
        "notes": "Telehealth appointment scheduled for Tuesday."
    },
    key_bytes=key_bytes
)

print("Committed snapshot sequence:", receipt["sequence_number"])

# 3. Retrieve Latest Receipt
latest = client.restore(agent_id="agent-007")
print("Latest receipt:", latest)
```

## Features

- **Client-Side Zero-Knowledge Encryption**: Uses AES-256-GCM (`cryptography`) to encrypt payloads before transmission.
- **Canonical Serialization & Integrity**: Computes SHA-256 canonical hash digests for snapshot verification.
- **Python 3.9+ Compatibility**: Fully typed async and synchronous support via `httpx`.

## License

[Apache-2.0](./LICENSE) © sovseal Protocol Contributors
