Metadata-Version: 2.4
Name: libveritas
Version: 0.0.0.dev20260318032300
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: 3
Summary: Stateless verification for Bitcoin handles using the Spaces protocol
Keywords: bitcoin,spaces,verification
Author: spacesprotocol
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/spacesprotocol/libveritas
Project-URL: Repository, https://github.com/spacesprotocol/libveritas

# libveritas

Python bindings for [libveritas](https://github.com/spacesprotocol/libveritas) — stateless verification for Bitcoin handles using the [Spaces protocol](https://spacesprotocol.org).

## Installation

```bash
pip install libveritas
```

## Usage

```python
from libveritas import Anchors, Veritas, QueryContext, Message

# Load trust anchors
anchors = Anchors.from_json(anchors_json_string)
veritas = Veritas(anchors)

print(f"Anchors: {veritas.oldest_anchor()} .. {veritas.newest_anchor()}")

# Build query context (empty = verify all handles)
ctx = QueryContext()

# Verify a message
msg = Message(message_bytes)
result = veritas.verify_message(ctx, msg)

# Inspect verified zones
for zone in result.zones():
    print(f"{zone.handle()} -> {zone.sovereignty()}")

# Get certificates
for cert in result.certificates():
    print(f"{cert.subject} [{cert.cert_type}]")
```

## Building from source

Requires [Rust](https://rustup.rs/) and [maturin](https://www.maturin.rs/):

```bash
pip install maturin
cd python
maturin develop
```

