OCC cryptographic proof signing for OpenClaw
Project description
occ-openclaw
OCC cryptographic proof signing for OpenClaw.
Every tool call produces an Ed25519-signed proof entry in proof.jsonl, creating a tamper-evident audit log of agent actions.
Install
pip install occ-openclaw
Quick Start
Decorate Individual Tools
from occ_openclaw import occ_tool
@occ_tool
def get_weather(location: str) -> str:
return f"Sunny in {location}"
Middleware (recommended)
from openclaw import Agent
from occ_openclaw import OccMiddleware
middleware = OccMiddleware()
agent = Agent(
tools=[get_weather, search],
middleware=[middleware],
)
Wrap All Tools
from occ_openclaw import wrap_tools
safe_tools = wrap_tools([get_weather, search])
agent = Agent(tools=safe_tools)
Custom Signer
from occ_openclaw import OCCSigner, OccMiddleware
signer = OCCSigner(state_dir="/tmp/.occ", proof_file="audit.jsonl")
middleware = OccMiddleware(signer=signer)
Proof Format
Each line in proof.jsonl is a JSON object:
{
"version": "occ/proof/1",
"timestamp": "2026-03-20T12:00:00.000Z",
"signer": "<base64url-ed25519-public-key>",
"payload": {
"type": "tool-call",
"tool": "get_weather",
"inputHash": "<sha256-hex>",
"outputHash": "<sha256-hex>"
},
"signature": "<base64url-ed25519-signature>",
"prev": "<sha256-hex-of-previous-proof>"
}
Proofs are chained: each proof's prev field contains the SHA-256 hash of the previous proof's canonical JSON.
Configuration
- State directory: Keypair stored in
.occ/signer-state.json(defaults to CWD) - Proof file: Defaults to
proof.jsonlin CWD - Both configurable via
OCCSigner(state_dir=..., proof_file=...)
License
Apache-2.0
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file occ_openclaw-0.2.0.tar.gz.
File metadata
- Download URL: occ_openclaw-0.2.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ef8dc3f0da20f0e13e69706bf1a95040139594d43c032e62d178fdf23f1001d
|
|
| MD5 |
ad0df5a21932dd7eea8b58df9fd72382
|
|
| BLAKE2b-256 |
26112fc2becc5ac6fa01bdbe119a14fc8145d4f27b36c0e14401f6181f1d7f6e
|
File details
Details for the file occ_openclaw-0.2.0-py3-none-any.whl.
File metadata
- Download URL: occ_openclaw-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7089e8a4228947a788d36bc512c868fa79799611bc9228b437c99808531268e7
|
|
| MD5 |
2f7b5f45bf5d64caef98c6d6bbba96e5
|
|
| BLAKE2b-256 |
6152fb11b6125b33da1a8a34aec1f890fcec6fd9b7790481c7adb40b2408ef84
|