Skip to main content

Verifiable AI causal accountability — not what was done, but WHY. W3C VC 2.0, SHAKE256, EU AI Act.

Project description

proofnest

Verifiable AI receipt chain — W3C VC 2.0, quantum-safe, PROOFNEST protocol.

pip install proofnest

Every AI action leaves a cryptographically linked receipt. Tamper-evident. Auditable. Yours.


Quick start

from proofnest import create_receipt, append_receipt, verify_chain

# Create a receipt for any AI action
receipt = create_receipt(
    action="execute",
    tool="Bash",
    input_data={"command": "ls /tmp"},
    session_id="my-session-001",
)

# Persist to local JSONL chain
append_receipt(receipt)

# Verify the entire chain
is_valid, errors = verify_chain()
assert is_valid, errors

Claude Code hook (PostToolUse)

Add to .claude/settings.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "python3 -m proofnest.hooks"
          }
        ]
      }
    ]
  }
}

The hook reads tool use data from stdin and appends a W3C VC 2.0 receipt to ~/.proofnest/dogfood/chain.jsonl.


Verify chain

# Verify all links are intact
proofnest verify

# Show statistics
proofnest stats

# Tail last 5 receipts
proofnest tail ~/.proofnest/chain.jsonl 5

# Export full chain as JSON
proofnest export ~/.proofnest/chain.jsonl out.json

Architecture

                       ┌─────────────────────────────┐
                       │         Your Agent           │
                       │  (Claude / GPT / Codex / ...)│
                       └────────────┬────────────────-┘
                                    │ tool_use + tool_result
                                    ▼
                       ┌─────────────────────────────┐
                       │    PROOFNEST Middleware       │
                       │  ┌────────────────────────┐  │
                       │  │  Receipt Builder        │  │
                       │  │  - W3C VC 2.0 envelope  │  │
                       │  │  - SHAKE256-256 hash    │  │
                       │  │  - ML-DSA-65 signature  │  │
                       │  │  - previousHash link    │  │
                       │  └──────────┬─────────────┘  │
                       └────────────-│────────────────-┘
                                     │
                     ┌───────────────┼───────────────┐
                     ▼               ▼               ▼
              chain.jsonl       PROOFNEST        Optional:
              (local SSOT)       Node API        Bitcoin anchor
                                (verify peer)   (OpenTimestamps)

Each receipt contains:

  • @context — W3C VC 2.0 + PROOFNEST context
  • idurn:proofnest:receipt:sha256:<hash>
  • type["VerifiableCredential", "ProofNestReceipt"]
  • issuer — DID of the agent or node
  • issuanceDate — ISO 8601 timestamp
  • credentialSubject — tool name, input hash, output hash, model, session ID
  • proof — ML-DSA-65 signature + SHAKE256-256 chain hash + previousHash

W3C VC 2.0 compliance

Receipts conform to the W3C Verifiable Credentials Data Model 2.0 specification. Each receipt is a valid Verifiable Credential that can be verified independently by any W3C VC-compatible verifier.


Quantum safety

Signatures use ML-DSA-65 (CRYSTALS-Dilithium, NIST FIPS 204). Hashes use SHAKE256-256 (SHA-3 family, NIST FIPS 202). Both are quantum-resistant by NIST post-quantum standards.


License

AGPL-3.0-or-later. See LICENSE.

Commercial licensing and hosted verification available at proofnest.io.


Links

Project details


Download files

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

Source Distribution

proofnest-0.3.0.tar.gz (245.0 kB view details)

Uploaded Source

Built Distribution

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

proofnest-0.3.0-py3-none-any.whl (237.9 kB view details)

Uploaded Python 3

File details

Details for the file proofnest-0.3.0.tar.gz.

File metadata

  • Download URL: proofnest-0.3.0.tar.gz
  • Upload date:
  • Size: 245.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for proofnest-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e42d1846bd7b8f7b112443eca1a126814b4eff0464f1dbb2307ba5a67851312f
MD5 23bf095a9009a760bc3f3eefd1d57a9d
BLAKE2b-256 54edad23c73e85b69da485d29ae85811f56e3be2f84aa4b076d67bd5b67366c3

See more details on using hashes here.

File details

Details for the file proofnest-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: proofnest-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 237.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for proofnest-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50ff9e859b4c2d9bea4746308c7f61001f3e36506aba26914b2da8225f57c99c
MD5 e25b2177a2cf4ffb193811c5bf20a5c5
BLAKE2b-256 f9dfbaba5177ad560e50466d8b6c299e489f0a12f2258c07f9c5f1d70fdcf0bc

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