View as Markdown

Attest · Concept

Chain of custody

The chain of custody is the append-only timeline of each attested asset, that records who captured, edited, escalated or exported it and when.

When to use it

Read the chain when you need to show an investigator or a court how an asset was handled. Export it, with every hash, as an evidence bundle that anyone can re-check offline.

How it works

  1. Attesting an asset writes a capture event for the device.
  2. Later events append to it: an edit by a tool, an escalation by an adjuster, an exported event when you export evidence.
  3. Each verification result returns the chain as chain, oldest first, and the escalation PDF prints it.
  1. capture
    device:<id>
  2. edit / escalation
    tool:<name>, adjuster:<id>
  3. exported
    evidence bundle

Key fields

FieldTypeDescription
event_typestringcapture, edit, escalation or exported.
timestampstringWhen it happened (RFC 3339).
actorstringWho: device:<id>, tool:<name> or adjuster:<id>.
summarystringA short description.

Export the evidence

Available on Enterprise

POST /v1/attest/claims/{id}/export builds a ZIP for one claim:

FileContents
attestations/Each asset's signed bundle and verification result
custody.jsonThe chain-of-custody events
content-hashes.jsonThe media hashes; the media bytes stay with you
manifest.jsonEvery file with its hash, and a manifest_hash over the list
verify-bundle.mjsA dependency-free script that re-checks every hash offline
export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe

curl -s -X POST $PROVENANCE_API/v1/attest/claims/CLM-SANDBOX-FRAUD/export \
  -H "Authorization: Bearer $PROVENANCE_KEY" | tee export.json
{
  "id": "exp_01M5Q1PNHR9XVEVR97ZDCFBFXJ",
  "object": "export",
  "claim_id": "CLM-SANDBOX-FRAUD",
  "status": "ready",
  "manifest_hash": "f40f0e0ea6d919c3c8e7d234affbbddbb26772ad7a48e6e834c5a626a4eb9919",
  "timestamp": { "status": "not_configured", "reason": "…" },
  "file_count": 9,
  "download_url": "/v1/exports/exp_01M5Q1PNHR9XVEVR97ZDCFBFXJ/download",
  "expires_at": "2026-10-25T13:30:47.736Z"
}

Download the ZIP within 24 hours and run its check:

export EXPORT_ID=$(jq -r .id export.json)
curl -s $PROVENANCE_API/v1/exports/$EXPORT_ID/download -H "Authorization: Bearer $PROVENANCE_KEY" -o evidence.zip
python3 -m zipfile -e evidence.zip evidence && node evidence/verify-bundle.mjs

The check prints BUNDLE VERIFICATION PASSED — every hash matches the manifest., and fails with exit code 1 if any file changed. With a timestamp authority configured on the server, the export also carries an RFC 3161 timestamp of the manifest hash, proving the evidence existed at that time; without one, timestamp.status is not_configured.

Limitations: the bundle holds hashes of the media, not the media; keep the originals to show the hashes match.