openttt-pot

v0.3.4
io.github.Helm-Protocol/openttt-pot Checked 2 days ago Published 3 months ago

Cryptographic audit trail for Claude Code workflows — tamper-proof timestamps, IETF TTTPS compliant.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

pot_generate

Generate a cryptographic Proof of Time timestamp (draft-helmprotocol-tttps, https://datatracker.ietf.org/doc/draft-helmprotocol-tttps/). For Claude Code workflows: use eventId + prevEventId to build a causal chain. For DeFi: use txHash + chainId + poolAddress. For a spec-conformant draft-08 §3 record binding this attestation to a specific piece of content, also supply contentDigest. One of eventId, txHash, or contentDigest is required.

ParameterTypeDescription
chainIdnumberEVM chain ID (DeFi, e.g. 8453 for Base)
contentDigeststringSHA-256 digest (lowercase hex, 64 characters) of the content this record attests to. Computed by the caller — the server never sees the content itself. When supplied, and the local time synthesis me…
ctxIdstringdraft-08 §3.3 context identifier (domain separator for the Commitment). Defaults to a fixed server value if omitted; MAY be public.
eventIdstringWorkflow step identifier (Claude Code). E.g. 'refactor_auth_step1'
poolAddressstringDEX pool contract address (DeFi)
prevEventIdstringPrevious step's eventId — links steps into a causal chain
txHashstringTransaction hash (DeFi, hex with 0x prefix)

pot_verify

Verify a Proof of Time using its hash and integrity shards. Returns validity, mode (turbo/full), and timestamp.

ParameterTypeDescription
chainId *numberEVM chain ID (e.g. 84532 for Base Sepolia)
grgShards *arrayArray of hex-encoded cryptographic integrity shards
poolAddress *stringUniswap V4 pool address (0x-prefixed)
potHash *stringPoT hash to verify (hex with 0x prefix)

pot_verify_v08

Verify a draft-helmprotocol-tttps-08 §3 Proof-of-Time record (as produced by pot_generate's potRecordV08 field): recomputes the Commitment and checks the Ed25519 signature, and — if content is supplied — recomputes SHA-256(content) and checks it against the record's Payload Digest field.

ParameterTypeDescription
potRecordV08 *stringHex-encoded 184 or 216-octet record from pot_generate's potRecordV08 field
contentstringThe payload (utf8) to check against the record's Payload Digest field, if available
ctxIdstringContext identifier the record was generated under. Must match what pot_generate used, or verification fails.
issuerPubKeystringHex-encoded 32-byte raw Ed25519 issuer public key. Defaults to this server's own key.

pot_query

Query Proof of Time records. Use eventId for exact O(1) lookup of a specific workflow step (collision probability 2^-256). Use startTime/endTime for time-range queries.

ParameterTypeDescription
endTimenumberEnd time (unix ms). Default: now
eventIdstringExact eventId lookup — call this at workflow start to restore action history after context compression
limitnumberMax entries to return. Default: 100, max: 1000
startTimenumberStart time (unix ms). Default: 24h ago

pot_graph

Traverse the causal chain of workflow steps. Given an eventId, returns the full backward chain (ancestors via prevEventId) and forward chain (steps that follow). Use after context compression to reconstruct the complete workflow timeline.

ParameterTypeDescription
eventId *stringThe workflow step to start traversal from
depthnumberMax backward traversal depth. Default: 10, max: 100

pot_stats

Get PoT statistics: total swaps, turbo/full counts, and turbo ratio for a given period.

ParameterTypeDescription
period *stringTime period for statistics

pot_health

Check PoT system health: time source status, subgraph sync, server uptime, and current mode.

pot_checkpoint

Create a compressed rollup checkpoint of workflow history. Call this periodically to prevent token explosion when recovering from context compression. Returns checkpointId, compressed event history, chainIntact status, and nextCheckpointHint (recommended events before next checkpoint).

ParameterTypeDescription
endTimenumberUnix ms end time (optional, default: now)
fromEventIdstringStart of range by eventId (optional, use with toEventId)
maxTokensnumberApproximate max tokens for rollup (default: 2000)
startTimenumberUnix ms start time (optional, default: 1h ago)
toEventIdstringEnd of range by eventId (optional, use with fromEventId)