> Source: https://vitna.ai/docs/cli/witness/attest
> Raw Markdown: https://vitna.ai/docs/cli/witness/attest.md
> Corpus index: https://vitna.ai/llms.txt

# npm run witness:attest

Hash a day's observations into a Merkle root and sign it.

```bash
npm run witness:attest
npm run witness:attest -- --verify
npm run witness:attest -- --new-key
```

## Flags

| Flag | Meaning |
|---|---|
| (none) | Sign yesterday |
| `--verify` | Recheck every root ever signed |
| `--new-key` | Print a keypair. Touches no database. |

## Yesterday, not today

A day is signed the morning after it closes, so a figure read today becomes
provable tomorrow. Until then
[`/api/v1/observations/{id}/proof`](../../api/v1/verification/proof.md) answers with a null
attestation and says why.

## What signing proves

That the record for that day has not changed since it was signed. It does not
prove a provider published a price. See
[attestation](../../concepts/attestation.md).

## The key

The same key [`aperture:config`](../../routing/config.md) signs a routing config
with, under a different statement prefix so the two cannot be confused.

`--new-key` prints a pair and writes nothing, so generating one does not require
access to the record.
