Metadata-Version: 2.5
Name: ariadne-verify
Version: 0.1.3
Summary: Air-gapped Ed25519 & SHA-256 Merkle compliance verifier for Ariadne Nexus ZK_PROV_V1 provenance certificates.
Project-URL: Homepage, https://ariadnenexus.com
Project-URL: Specification, https://ariadnenexus.com/rfc/zk-prov-v1
Project-URL: Repository, https://github.com/dotlink-ops/nexus-core
Author-email: Ariadne Nexus Engineering <security@ariadnenexus.com>
License: Apache-2.0
Keywords: ed25519,mcp,merkle,provenance,title-insurance,zero-knowledge
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.10
Requires-Dist: cryptography>=43.0.3
Description-Content-Type: text/markdown

# `ariadne-verify` — Air-Gapped `ZK_PROV_V1` Verifier & Zero-PII Custody Pre-Hasher

Standalone, zero-network cryptographic compliance CLI suite and Python library implementing **Ariadne Nexus Zero-PII Collateral Provenance (`ANX-RFC-001` / `ZK_PROV_V1`)**.

Ships two zero-network CLI binaries in a single audited wheel:
1. **`ariadne-hash-custody`** — Client-side custodial transfer pre-hasher (`ANX-RFC-001 §3.1`) for fine-art brokers, galleries, and fiduciaries to generate salted SHA-256 `custody_event_hashes` locally while keeping Beneficial Owner PII and purchase prices inside their vault.
2. **`ariadne-verify`** — Air-Gapped Ed25519 signature, Root Governance keyring rotation (`ariadne-keyring-v1`), and SHA-256 Merkle preimage auditor for specialty title underwriters, reinsurers, and claims counsel.

- **Specification:** [`https://ariadnenexus.com/rfc/zk-prov-v1`](https://ariadnenexus.com/rfc/zk-prov-v1)
- **Keyring Endpoint:** [`https://ariadnenexus.com/.well-known/ariadne-keyring.json`](https://ariadnenexus.com/.well-known/ariadne-keyring.json)
- **Runtime Dependencies:** Python `>= 3.10` + `cryptography >= 43.0.3` (zero HTTP/network libraries)
- **License:** Apache-2.0

---

## 1. Supply-Chain SLSA Build Provenance Verification

Every release wheel and tarball published on GitHub Releases includes a Sigstore-signed SLSA build provenance attestation:

```bash
gh attestation verify ariadne_verify-0.1.3-py3-none-any.whl \
  --repo dotlink-ops/nexus-core
```

---

## 2. Broker & Custodian Workflow: Local Pre-Hashing (`ariadne-hash-custody`)

Create a chronological transfer schedule (`custody_schedule.json`) containing **only** dates and canonical instrument types (by default, `ariadne-hash-custody` fails closed if accidental PII keys such as `seller_name` or `purchase_price_usd` are present):

```json
{
  "asset_id": "art_rothko_1961_07",
  "transfers": [
    { "transfer_date_iso": "1962-03-10", "instrument_type": "gallery_primary_invoice" },
    { "transfer_date_iso": "1998-05-14", "instrument_type": "auction_bill_of_sale" },
    { "transfer_date_iso": "2022-11-04", "instrument_type": "trust_fiduciary_settlement" }
  ]
}
```

Generate the MCP-ready `custody_event_hashes` payload while writing the 128-bit CSPRNG salts to an owner-only (`0600`) local vault file:

```bash
uvx --from ariadne-verify@0.1.3 ariadne-hash-custody batch \
  --input ./custody_schedule.json \
  --vault-salts-out ./private_vault_salts.json > mcp_request_hashes.json
```

Transmit only `custody_event_hashes` from `mcp_request_hashes.json` to `generate_zk_provenance_proof` on `https://mcp.ariadnenexus.com/mcp`. Retain `private_vault_salts.json` in cold fiduciary storage.

---

## 3. Underwriter & Reinsurance Audit Workflow (`ariadne-verify`)

### Mode A: Standard Policy Binder Audit (Root-Signed Keyring + Hash List)
```bash
uvx ariadne-verify@0.1.3 \
  --input archived_binder_proof.json \
  --keyring ./ariadne-keyring.json \
  --pinned-root-pubkey-b64 "<PINNED_ROOT_GOVERNANCE_ED25519_B64>" \
  --custody-hashes "0x4b2277...,0x9f86d0...,0x3c11a8..."
```

### Mode B: Full Claim / Courtroom Preimage Opening (`--custody-vault-salts`)
During a contested title claim or audit where the custodian presents `private_vault_salts.json` (`ariadne-custody-vault-salts-v1`), `--custody-vault-salts` independently recomputes every 32-byte leaf digest $L_i$ from `(0x00, asset_id, transfer_date_iso, instrument_type, salt_hex)`, verifies chronological non-decreasing dates, confirms `asset_id` matches the signed `ZK_PROV_V1` `asset` claim, and verifies the reconstructed binary Merkle root against the Ed25519-signed certificate:

```bash
uvx ariadne-verify@0.1.3 \
  --input archived_binder_proof.json \
  --keyring ./ariadne-keyring.json \
  --pinned-root-pubkey-b64 "<PINNED_ROOT_GOVERNANCE_ED25519_B64>" \
  --custody-vault-salts ./private_vault_salts.json
```

### Exit Codes
- **Exit `0`:** Cryptographic Ed25519 signature, root keyring rotation bounds, outer-JSON field parity, `seller_pii_exposed === false`, and Merkle custody tree / salted leaf preimages verified. Prints structured JSON audit receipt to `stdout`.
- **Exit `1`:** Any signature, key-pinning, temporal window, chronology, salt preimage, or Merkle root mismatch. Prints structured error JSON to `stderr`.
