# Verify a witness record yourself

> How to check a claim witness record from https://onedroid.ai/evidence offline with witness-verify: no account, and no need to trust this site.

## Steps

1. Download the record's bundle: the signed record, its seal, the witness's key list and the methods code the record names.
2. Get witness-verify, the verifier: one Python 3 file, claim_witness/verify.py, standard library only (it uses the Python cryptography library when that is installed).
3. Make a folder for the bundle.
4. Unpack the bundle into it.
5. Run witness-verify on the folder.

```
curl -o bundle.tar https://evidence.onedroid.ai/api/witness/records/RECORD_ID/bundle
git clone -b v1/claim-witness https://github.com/OneDro1d/onedroid-witness
mkdir bundle
tar -xf bundle.tar -C bundle
python3 onedroid-witness/claim_witness/verify.py --bundle bundle
```

Take the id of any record listed on https://onedroid.ai/evidence/records and put it in place of RECORD_ID. Every record id works the same way.

## What it checks

- the key list the bundle carries
- the witness's signature on the record
- the ids and commitments: the record id is the hash of what was signed
- the seal: the record and its path give the batch root, the batch header is signed by a key of the key list, and every anchor landed
- that the signing key was valid at the anchor time (at the record's own time while the seal is still pending)
- the files of the bundle, and a re-run of the method from the methods code the record names, where the method can be re-run offline
- the agent's signature, when the record carries one

Each check prints PASS, FAIL or SKIP with its name, and the last line is RESULT: PASS or RESULT: FAIL. The exit code is 0 when every check that applies passed and 1 when one failed.

## The seal on the public chain

To check the anchor transaction on the public chain as well, add --rpc https://sepolia.base.org (or another Base Sepolia JSON-RPC address you trust): witness-verify then reads it and prints PASS seal-chain only when it carries this batch's fingerprint, in the block and at the time the seal names. Without --rpc that line is a SKIP and nothing goes over the network.

## A private record

A private record: its owner, or a holder of a share link, adds the disclosure from GET /witness/records/<record id> with --disclosure FILE, and each evidence file with its own --evidence FILE, to check the commitments and re-run the method.
