Skip to main content

invinoveritas-verify (Python)

Verify an invinoveritas verdict proof OFFLINE — trusting no one, not even our API, and not us. An invinoveritas proof is a schnorr-signed Nostr event; this recomputes its event id (NIP-01), checks the BIP-340 signature against our published key, and confirms it's a real verdict — all on your machine. A valid result is something you proved, not something we told you.

Zero dependencies — pure stdlib (hashlib). A verifier that shipped a sketchy crypto dependency would be self-defeating; there is nothing here to trust but ~120 readable lines, and the only input that matters is a public key.

pip install invinoveritas-verify
from invinoveritas_verify import verify_proof

# `event` is the signed proof from a /review {sign:true} or /prove response.
result = verify_proof(event)
if result["valid"]:
    print("invinoveritas issued exactly this verdict —", result["checks"])
    # {'id_integrity': True, 'signature_valid': True, 'issued_by_invinoveritas': True, 'is_proof_event': True}

CLI:

curl -s https://api.babyblueviper.com/.well-known/agent-handshake \
  | python -c "import sys,json; json.dump(json.load(sys.stdin)['try_it_now']['sample_proof']['event'], open('proof.json','w'))"
python -m invinoveritas_verify proof.json     # → {"valid": true, ...}, computed entirely on your machine

Recompute the WHOLE ledger (not just one proof)

One command pulls our public verdict ledger and recomputes every entry — fetching each raw signed verdict straight from public Nostr relays (not from us), recomputing the NIP-01 event id from those bytes, and checking the BIP-340 signature against our published key:

invinoveritas-recompute-ledger            # or: python recompute_ledger.py
RECOMPUTED: 23/32 verdicts schnorr-verified from relay bytes against 6786…fbb7.
  · 9 raw events rotated off relays (NIP-33); 9 carry a CONFIRMED Bitcoin-PoW anchor — ots verify.
You trusted no one: the bytes came from public relays, the math ran here.

Still zero dependencies — the relay fetch is a minimal stdlib WebSocket client. Verdict events are NIP-33 parameterized-replaceable, so an older verdict's raw event may have rotated off relays; those can't be schnorr-recomputed anymore, but each one also carries a Bitcoin-PoW OpenTimestamps anchor on its event id, recomputable relay-independently: ots verify -d <event_id> <event_id>.ots.

v0.4.0 — hash-chain check. Signature verification alone proves each entry existed and wasn't tampered; it doesn't prove there's only one history (a server could show different entries to different requesters). Entries from #40 onward hash-link to the previous entry (head_hash = sha256(content_hash + "|" + prev_head_hash)), so this tool now also fetches each chained entry's full record, independently recomputes content_hash and head_hash from those bytes, and checks prev_head_hash against the actual predecessor's recomputed head — not the server's claim. A tampered record or a spliced-in alternate history breaks the chain visibly. Entries #1-39 predate this and are unaffected (still signature-only, as before).

Compliance bundle — oversight evidence a regulator can recompute

Running an agent you're on the hook for? Every /review {"sign": true} returns a signed verdict proof — keep them. This packages the ones that gated your agent's actions into a single, self-verifying compliance bundle an auditor or counterparty re-checks without trusting your logs OR our attestation:

# assemble (runs on YOUR proofs, on YOUR machine — we never store your action history)
invinoveritas-compliance-export ./my_proofs --subject "AcmeBot prod" --out bundle.json

# an auditor verifies it — re-checks every signature + that no displayed field was altered
invinoveritas-compliance-export --verify bundle.json
# → PASS — every verdict is an authentic invinoveritas judgment, bundle untampered.

Two independent tamper checks: each entry's BIP-340 signature is re-verified against our published key (the cryptographic truth), and every displayed field is cross-checked against the signed content, so the bundle can't misrepresent what we actually issued. Still zero dependencies. Self-custody by design — "trust no one" includes not trusting us with a database of what your agent did.

Verify our key yourself

The package pins PUBLISHED_PUBKEY. Re-derive it any time and confirm it matches:

curl -s https://api.babyblueviper.com/.well-known/agent-handshake | grep -o '"verifier_pubkey":"[a-f0-9]*"'

If a proof's pubkey ≠ that key, it is not an invinoveritas verdict.

Trust model

  • valid ⇒ invinoveritas issued exactly this verdict (id integrity + schnorr + our key + proof shape).
  • It does not assert freshness or that the proof was meant for your interaction — bind it to your input and check recency yourself.
  • Verdicts are byte-identical to POST https://api.babyblueviper.com/verify-proof. The endpoint is a convenience; this is the same check without the round trip — "recomputable, not a score."
  • invinoveritas (PyPI) — the full Python SDK, incl. the online verify-before-pay client (preflight_verify, verify_proof) and now verify_proof_local (the same offline check).
  • invinoveritas-verify (npm) — the JavaScript/TypeScript twin.

Public track record: https://api.babyblueviper.com/ledger

Metadata

Release files for invinoveritas-verify 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for invinoveritas-verify 0.4.1
File Size Uploaded Provenance
invinoveritas_verify-0.4.1.tar.gz 14.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for invinoveritas-verify 0.4.1
File Interpreter ABI Platform
invinoveritas_verify-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 32.2 kB

Release files / invinoveritas_verify-0.4.1.tar.gz

Download URL invinoveritas_verify-0.4.1.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1c76ead5b479fb30d734107e5a8dd71d96cc1c02aa10e42ca642c2307144f1a5
BLAKE2b-256 checksum
How to use checksums
673ffc3a2624629b49bc512e8c054e2974a3acab3fa4ff60f2cd5a313f7ef418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / invinoveritas_verify-0.4.1-py3-none-any.whl

Download URL invinoveritas_verify-0.4.1-py3-none-any.whl
Size 17.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
35de449d0962502a2acfdbb4d2171c5b2a7a3f07a93bf687af3de88915248185
BLAKE2b-256 checksum
How to use checksums
1f1f3c1261fb4174e58e1e7d9fc627468874b34646513dbead81f24f8e8af470
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for invinoveritas-verify 0.4.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page