# Checkpoints and proofs

> The signed state of the log, and the Merkle proofs that tie blocks and history to it.

## Latest checkpoint

:::endpoint GET /checkpoint

```json title="200 OK"
{
  "origin": "explorer.usd.net/usdnet-testnet-1",
  "size": 6,
  "root": "7e9daba34b3fb03b42873d57240bc5071e5dda86dbfb5b428800fb38a5f04d66",
  "height": 5,
  "time": 1793731653002,
  "note": "explorer.usd.net/usdnet-testnet-1\n6\nfp2ro0s/…TWY=\n\n— usd.net 5oGo4ucX…wIgbfMAg=\n",
  "body": "explorer.usd.net/usdnet-testnet-1\n6\nfp2ro0s/…TWY=\n",
  "key": "64d1d3120be538bd56f1392fb5c2b4be570af7bbe5bdc7af184713bbcb787a3c"
}
```

Add `?format=note` to get just the signed note as `text/plain`:

```note title="GET /checkpoint?format=note"
explorer.usd.net/usdnet-testnet-1
6
fp2ro0s/sDtChz1XJAvFBx5d2obb+1tCiAD7OKXwTWY=

— usd.net 5oGo4ucXWBCDUHDri5nLDlC10fen2MXRGAmonfOzHTl4Ti5CbuME//WamVJ7KlY4Ip08CiQCo5xYJHABHGzwIgbfMAg=
```

See [Checkpoints](/open-data/checkpoints) for the format.

## Inclusion proof

:::endpoint GET /proof/inclusion/:height

Proves that block `height` is leaf number `height` in the log at the current size.

```json title="200 OK"
{
  "height": 5,
  "size": 6,
  "leaf": "0a89300059b15898b92b9229c7825c07a5ad03342dc1011be872ac537af381de",
  "root": "7e9daba34b3fb03b42873d57240bc5071e5dda86dbfb5b428800fb38a5f04d66",
  "path": ["cc9e6b32…8dc32ddd", "74a6b040…"]
}
```

`leaf` is the block hash. `path` is the RFC 9162 audit path, from the leaf upwards. Returns `404` if the height is outside the log.

## Consistency proof

:::endpoint GET /proof/consistency?from=:m&to=:n

| Query | Default | Meaning |
| --- | --- | --- |
| `from` | | Earlier log size, at least 1 |
| `to` | Current size | Later log size |

```json title="200 OK"
{
  "from": 3,
  "to": 6,
  "oldRoot": "…",
  "newRoot": "7e9daba3…a5f04d66",
  "path": ["…", "…", "…", "…"]
}
```

Proves that the log of size `to` begins with the log of size `from`, unchanged. Returns `400` for an invalid range. Compare `oldRoot` with a root you recorded yourself; trusting the one in the response proves nothing.

## Anchors

:::endpoint GET /anchors

Returns `key` (the anchor key on Solana), `every` (`1h`), `last` and `anchors`: up to 50 by default (`?limit=` up to 500), newest first, each with `size`, `root`, `height`, `at`, `signature` and `slot`. See [Anchors](/open-data/checkpoints#anchors).

## Witnesses

:::endpoint GET /witnesses

Every registered witness with its `vkey` and `last` cosignature (`size`, `root`, `ts`, `line`).

:::endpoint POST /witness/cosign

```json title="Request body"
{ "size": 6, "line": "— witness.example.org psKCWAAAAABq6kol…" }
```

Accepts a `cosignature/v1` line from a registered witness for the checkpoint of that size, and returns it with `201`. Rejected with `400` when the witness is unknown, the key ID or size doesn't match, the time is more than a day old, or the signature doesn't verify.
