Expand description
Canonical serialization, content hashing, export and import.
The interchange format is a JSON Bundle: records with their full (or
viewer-filtered) histories. Hashes are SHA-256 over the canonical JSON
form: UTF-8, object keys sorted by code point, no insignificant
whitespace, numbers and strings as produced by serde_json.
Imported bundles are untrusted: size limits, format/version checks, hash verification, origin policy, history replay and full validation are all applied before anything is written.
Structs§
- Bundle
- Bundle
Entry - Import
Policy - Rules for accepting a bundle from elsewhere.
- Import
Report
Enums§
- Completeness
- Whether a bundle carries complete histories or a viewer-filtered view.
Constants§
Functions§
- canonical_
json - Serialize to canonical JSON bytes.
- content_
hash - SHA-256 of the canonical JSON form.
- export
- Export records (and their histories) as
viewermay see them. Records the viewer cannot see are silently omitted. - import
- Import a verified, complete bundle. Events already present (same event id at the same position) are skipped, so re-importing is idempotent and a newer export of the same records only appends what is new.
- parse_
bundle - Parse and verify an untrusted bundle without writing anything.
- verify_
bundle