Skip to main content

Stateless verification for Bitcoin handles using the Spaces protocol

Project description

libveritas

Python bindings for libveritas — stateless verification for Bitcoin handles using the Spaces protocol.

Installation

pip install libveritas

Usage

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 and maturin:

pip install maturin
cd python
maturin develop

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

libveritas-0.1.0-py3-none-win_amd64.whl (2.1 MB view details)

Uploaded Python 3Windows x86-64

libveritas-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

libveritas-0.1.0-py3-none-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file libveritas-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: libveritas-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for libveritas-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 33d717a06d14240c006277d3ee853bbc4b8871f6bd3cad28e9c3da2a182d8e4c
MD5 69a6e8d661408ca9904e8703b32ce357
BLAKE2b-256 0e32378e2309fe45639112b9f6b1f03fd92417ad09ec11336b2b471307011d04

See more details on using hashes here.

File details

Details for the file libveritas-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for libveritas-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bcb9e10a4f6a54deb6c85dd8a4c26b65cfa4fe55287075b12be5c898d92eefd0
MD5 aff973a5bbd9c47fd4d3c1639090ec76
BLAKE2b-256 5c17e38ebbd6d13a252ed003451049252bde934e96c72fa93b6b18c8d6345145

See more details on using hashes here.

File details

Details for the file libveritas-0.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for libveritas-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9c2cd5b5de7a29d880c379452e10941258e3b3bd6b4a47993e27ed58ff8864a7
MD5 a4147b512912ce546158f4bff9f55085
BLAKE2b-256 797c0b2c7f001dd795c2531369751e776c59c5c86ad09965021cd605cc16e93d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page