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, save a fresh snapshot and verify it:

witness attest --hash "$HASH" --save message-confirmed.json
witness verify message-confirmed.json \
  --network-config pinned-network.json --hash "$HASH"

Obtain pinned-network.json independently of the gateway. Use the reported "existed no later than" bound, not the gateway's timestamp.

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.