# Trace manifests

A trace manifest is an ES256 JWS that binds a trace's prompt, completion, canary and graph hashes, verifiable offline against the published JWKS.

A trace manifest is a signed ES256 JWS that binds an attribution trace's prompt, completion, canary readings and graph by hash, so anyone can verify the trace offline without trusting Provenance's servers.

## When to use it

Use the manifest whenever someone outside your team needs to check a trace: an auditor, a counterparty, or a reviewer opening a share link. They verify it against the public keys, with no account and no API key.

## How it works

1. When an [attribution trace](https://provenanceauth.com/docs/trace/concepts/attribution-traces.md) finishes, Provenance hashes the prompt, the completion, the canary readings, the full graph and the graph's public render.
2. It signs those hashes with the same ES256 keys as intent tokens and receipts. The JWS header has `typ: provenance-trace+jwt`.
3. A verifier checks the signature against [`/.well-known/jwks.json`](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md), then hashes the graph it holds and compares.

1. **Trace**: graph + readings
2. **Manifest**: ES256 over the hashes
3. **Offline check**: JWKS + graph hash

## Key fields

| Claim | Meaning |
| --- | --- |
| `trace_id` | The trace |
| `model_version` | The exact model and revision |
| `backend` | Where it ran |
| `method` | `direct_logit_attribution+ablation` |
| `prompt_hash` | SHA-256 of the canonical model and messages |
| `completion_hash` | SHA-256 of the completion text |
| `canary_hash` | SHA-256 of the canonical model version, prompt hash and readings |
| `graph_hash` | SHA-256 of the canonical full graph |
| `public_graph_hash` | SHA-256 of the canonical masked public render, at signing |
| `decision_tokens` | How many tokens were traced |
| `iss`, `iat` | Issuer and issue time |

The manifest binds hashes, not neuron identities, so publishing it never reveals a masked canary member.

## Verify a manifest

Paste a manifest into the **Trace manifest** tab of the console's [Verify a proof](https://provenanceauth.com/docs/integrate/verify-a-proof.md) page, optionally with the graph from a share link. In code, use an SDK or a verifier library. Each one rejects a token of any other `typ`, such as an intent token or a receipt.

**Node**

```ts
import { fetchJwks, verifyTraceManifest } from "@provenanceauth/sdk";

const share = await (await fetch(`${process.env.PROVENANCE_API}/v1/trace/shares/${shareId}?token=${encodeURIComponent(shareToken)}`)).json();
const result = await verifyTraceManifest(share.manifest, await fetchJwks(process.env.PROVENANCE_API!), share.graph);
console.log(result.valid, result.graphMatches); // true "public"
```

**Python**

```python
from provenanceauth_verify import verify_trace_manifest

result = verify_trace_manifest(manifest, jwks, graph)
print(result.valid, result.graph_matches)  # True public
```

**Go**

```go
res := provenanceverify.VerifyTraceManifest(manifest, jwks, graph)
fmt.Println(res.Valid, res.GraphMatches)
```

`graphMatches` is `full` when the graph you hold is the signed full graph, `public` when it is the signed public render, and `false` when it is neither.

**Limitations:** a manifest proves Provenance recorded this trace for this model version and these exact hashes. Judge whether the output is correct with your own evaluation. If a model's canary sets change later, a fresh public render can differ from `public_graph_hash`, and verifiers report the graph as not matching.

## Related

- [Attribution traces](https://provenanceauth.com/docs/trace/concepts/attribution-traces.md)
- [Verify tokens offline](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md)
- [SDKs and verifiers](https://provenanceauth.com/docs/get-started/sdks.md)
