> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kineticvm.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify a dataset

> Take one attested operation line and check it against the ERC-8004 Validation Registry on Monad testnet.

This tutorial checks a record your own device already stored. The same steps work on a file you received after buying a listing. You need Foundry's `cast`, and the two files under `~/.kinetic/records/`.

If those files are missing, the device has not stored an operation yet. Attest one from Telegram, or follow the [vending machine](/tutorials/vending-machine) tutorial, then come back. `/status` also links the latest attestation transactions.

## Hash the line the device signed

`operations.jsonl` is one canonical JSON object per line. The newline between lines is a separator. It is not part of the signed bytes.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
LINE=$(sed -n '1p' ~/.kinetic/records/operations.jsonl)
cast keccak "$LINE"
```

`sed` prints the line and the command substitution drops the trailing newline, so `cast keccak` hashes the same bytes `monad_attest` signed. The result is the `paramsHash`.

The sibling file holds the request hash for that same line:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
sed -n '1p' ~/.kinetic/records/operation-requests.txt
```

Line 1 of one file belongs to line 1 of the other. A blank line, a repeated request hash, or a different number of lines is a file the device will refuse to list.

## Read the validation

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
cast call 0x8004Cb1BF31DAf7788923b405b754f57acEB4272 \
  "getValidationStatus(bytes32)(address,uint256,uint8,bytes32,string,uint256)" \
  0xREQUEST_HASH \
  --rpc-url https://testnet-rpc.monad.xyz
```

Replace `0xREQUEST_HASH` with the hash from `operation-requests.txt`. The return is:

```text theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
validator, agentId, response, responseHash, tag, lastUpdate
```

All of these should hold:

<AccordionGroup>
  <Accordion title="validator" icon="badge-check">
    `0x6e46d149b7d3396b42E874765Cf5a1bb26BD5bA5`, the Kinetic attestor. Another validator is a different scheme.
  </Accordion>

  <Accordion title="agentId" icon="fingerprint">
    The agent id from `/status`. A row for a different agent is someone else's machine.
  </Accordion>

  <Accordion title="response" icon="circle-check">
    `100`. That is the attestor's verified response.
  </Accordion>

  <Accordion title="responseHash" icon="hash">
    Equal to the `cast keccak` output. This is the check that the line was not edited after signing.
  </Accordion>

  <Accordion title="tag" icon="tag">
    `kinetic-action`.
  </Accordion>
</AccordionGroup>

Change one character of `LINE` and hash it again. `responseHash` will not match. That is the whole verification.

## Check a listing you do not hold yet

Before payment, the data file is not public. The manifest is. The verify route reads it and runs `getValidationStatus` for every row:

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
curl -X POST https://marketplace.kineticvm.xyz/api/marketplace/listings/SLUG/verify
```

The JSON includes `total` and the first eight rows, each with `paramsHash` and `requestHash`. Run the `cast call` above on any of those request hashes. After you pay and unlock, hash each line of the data file and compare it to `paramsHash`, which you already compared to `responseHash`.

<Warning>
  A matching hash proves the device key signed that line. It does not prove a motor moved or a sensor was right. [What an attestation proves](/concepts/attestations#what-an-attestation-proves) is the limit of this check.
</Warning>

Sample listings on the marketplace are previews. Their verify response is marked `preview: true` and is not a chain check. Use a listing whose verify response has `"preview": false`, or use your own records, for this tutorial.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.