The validation token a fetched root document yields: its content_hash attr
when stamped (content-hash mode), else the SHA-256 of the exact bytes served
(zattrs-hash mode — any rewrite of the root attrs changes it, since Luxar
writers always bump timestamp).
Shared by getRemoteContentHash and the load-time root-document fetch
(cache/root-document-prefetch.ts), which hands validation the same response
the store open reads, so both must derive the token identically.
Parameters
data: Uint8Array
The document bytes exactly as served.
servedDoc: "zarr.json"|".zattrs"|undefined
Which root document answered; the format follows from the
NAME, so the parse never has to infer it from the content.
The validation token a fetched root document yields: its
content_hashattr when stamped (content-hashmode), else the SHA-256 of the exact bytes served (zattrs-hashmode — any rewrite of the root attrs changes it, since Luxar writers always bumptimestamp).Shared by getRemoteContentHash and the load-time root-document fetch (
cache/root-document-prefetch.ts), which hands validation the same response the store open reads, so both must derive the token identically.