Metadata-Version: 2.4
Name: voltry-evidence-schema
Version: 1.1.0
Summary: Voltry evidence bundle — THE contract. Typed models, RFC 8785 canonical serialization, ECDSA P-384 sign/verify, generated JSON Schema.
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: cryptography<50,>=44
Requires-Dist: pydantic<3,>=2.11
Requires-Dist: rfc8785<0.2,>=0.1.4
Description-Content-Type: text/markdown

# voltry-evidence-schema

The Voltry evidence bundle: the signed contract behind every Voltry Probe scan
and certificate.

Note the naming: the PyPI distribution is `voltry-evidence-schema`, the Python
package you import is `evidence_schema`.

```bash
pip install voltry-evidence-schema
```

```python
import evidence_schema
```

## What it provides

- Typed pydantic v2 models (`EvidenceBundle` and its blocks). Measured facts
  and modeled estimates are distinct types by construction; there is no single
  score anywhere in the schema, and no price field exists.
- One canonical serializer: RFC 8785 (JCS) over the bundle minus its
  signature. This is the only path to signable bytes.
- ECDSA P-384 (secp384r1) with SHA-384 sign and verify over those canonical
  bytes.
- A generated JSON Schema for cross-language consumers.

## Quick start

```python
import json
from evidence_schema import EvidenceBundle, verify_bundle

bundle = EvidenceBundle.model_validate(json.load(open("bundle.json")))
print(verify_bundle(bundle))  # True only if the signature covers these exact bytes
```

Command line:

```bash
# Round-trip demo: build, canonicalize, sign, verify, tamper, verify fails
python -m evidence_schema.demo

# Emit the JSON Schema for non-Python consumers
evidence-schema-jsonschema -o evidence_bundle.schema.json
```

## Stability

The schema is versioned semantically and the 1.x line is frozen wide: a bundle
captured today remains valid and replayable indefinitely. Additive fields are
minor versions; anything breaking is a major version with a migration path.
Canonical bytes are covered by golden-vector tests on every supported Python
version (3.10 through 3.13).

## License

Apache-2.0.
