Skip to content

Timestamp a message

The current CLI has file and hash inputs; it does not have a separate --message option. To timestamp a message, define its exact bytes locally, hash those bytes, and use the supported --hash form.

Define bytes and hash them

For a UTF-8 message without a trailing newline:

MESSAGE='A precisely defined message'
HASH="$(printf '%s' "$MESSAGE" | shasum -a 256 | awk '{print $1}')"
printf '%s\n' "$HASH"

The choice of encoding, whitespace, and newline is part of the message. Record that convention with the resulting evidence.

Submit and verify

witness attest --hash "$HASH" --save message-job.json
witness status "$HASH"

After the job is confirmed, extract and verify the signed result:

jq '.signed_attestation' message-job.json > message-attestation.json
witness verify message-attestation.json

If the saved response was captured before confirmation, run attest --hash "$HASH" --save ... again after polling and use the confirmed response.

Caveats

Witness records the digest, not a human-readable message or proof of what bytes you intended. Preserve the exact encoding and message separately if later reconstruction matters. A valid attestation does not establish authorship, meaning, or priority, and transport metadata is not hidden.