Initial commit: Git OpenTimestamp hooks skill

This commit is contained in:
Otto 2026-03-08 00:12:45 +01:00
commit eec64d16c6
13 changed files with 1145 additions and 0 deletions

20
scripts/check-attestation.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
# check-attestation.sh - Check if an OpenTimestamp proof is fully attested
# Usage: check-attestation.sh <proof-file>
# Returns: 0 if fully attested, 1 if pending
PROOF_FILE="${1:-}"
if [ -z "$PROOF_FILE" ] || [ ! -f "$PROOF_FILE" ]; then
echo "Error: proof file not found: $PROOF_FILE" >&2
exit 2
fi
# Check for PendingAttestation in ots info output
if ots info "$PROOF_FILE" 2>&1 | grep -q "PendingAttestation"; then
echo "pending"
exit 1
else
echo "attested"
exit 0
fi