Metadata-Version: 2.4
Name: honornet-verify
Version: 1.1.0
Summary: The independent verifier for HonorNet decision records
Author-email: HonorNet <opensource@honornet.ai>
Maintainer-email: HonorNet <opensource@honornet.ai>
License: Apache-2.0
Project-URL: Homepage, https://honornet.ai/
Project-URL: Repository, https://github.com/HonorNetAI/honornet-verify
Project-URL: Issues, https://github.com/HonorNetAI/honornet-verify/issues
Keywords: honornet,verification,merkle,transparency,rfc6962,ed25519,audit,compliance
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Legal Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: license-file

# honornet-verify

**The independent verifier for HonorNet decision records.**

When an AI agent transacts on the [HonorNet](https://honornet.ai/) acceptance
network, the network records its approve/decline decision in an append-only,
cryptographically verifiable log. `honornet-verify` lets *anyone* — a merchant,
an issuer, an auditor, a regulator — confirm such a decision is genuine and
intact:

- **without calling a HonorNet API**, and
- **without HonorNet's private source code**.

You verify a decision against the maths, not against HonorNet's word for it.

## Why this exists

HonorNet's acceptance-network core is private. Its trustworthiness should not
be. A decision record is exported as a self-contained *bundle*; this tool
checks the bundle's signatures and its RFC 6962 Merkle inclusion proof. The
verification core is **standard-library only** — no third-party runtime
dependencies — so the entire trust path is auditable in an afternoon.

## Install

```
pipx install honornet-verify
```

or, for use as a library:

```
pip install honornet-verify
```

## Use

Verify a decision bundle exported from `GET /decisions/{decision_id}`:

```
honornet-verify verify decision-bundle.json
```

```
  [PASS] record_signature
  [PASS] leaf_hash_match
  [PASS] tree_size_consistency
  [PASS] inclusion_proof
  [PASS] log_root_signature

VERIFIED: decision-bundle.json
```

Exit code `0` means verified, `1` means well-formed but not verified, `2` means
the file could not be read or parsed.

Structured output for scripts and CI:

```
honornet-verify verify --json decision-bundle.json
```

Pin the signing key — recommended. Verification alone proves a bundle is
internally consistent and signed by the key it carries; pinning proves that key
is HonorNet's:

```
honornet-verify verify --pin-key <honornet-ledger-public-key-hex> decision-bundle.json
```

## What gets checked

A bundle verifies only if all of the following hold:

1. **record signature** — the decision record carries a valid Ed25519
   signature over its RFC 8785 canonical bytes;
2. **leaf hash** — the RFC 6962 Merkle leaf hash matches the signed record;
3. **inclusion proof** — the leaf is included under the signed log root;
4. **log root signature** — the signed log root carries a valid signature.

See [docs/verification-model.md](docs/verification-model.md) and
[docs/bundle-format.md](docs/bundle-format.md).

## What this does *not* grant

`honornet-verify` is open source under Apache-2.0. Using, reading, or forking
it does **not** grant:

- any right to use the **HonorNet name or marks**, except as permitted by the
  Apache License 2.0, Section 6 (Trademarks);
- **recognized-issuer status** on the HonorNet acceptance network;
- any right to **operate the HonorNet acceptance network**, or to hold a fork
  or derivative of this software out as being HonorNet.

A successful verification establishes that a decision bundle is internally
consistent and signed by the key embedded in it. It does **not** by itself
establish that the key is HonorNet's — pin the key (`--pin-key`) to establish
that.

## Relationship to HonorNet

This is the open-source arm of HonorNet. It is **not** the production network.
The acceptance network that issues decision records is a separate, private
system. `honornet-verify` deliberately imports nothing from it — that
independence is enforced by a test in this repo.

## Licence

Apache-2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
