offline-protocol 0.24.0

Main protocol engine for the Offline Protocol SDK
Documentation
[package]
name = "offline-protocol"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
# AGPL-3.0-only requires the license text to accompany the program, and a
# published crate ships on its own. Rather than `license-file = "../../LICENSE"`
# (which makes cargo warn that `license` and `license-file` are redundant on
# every invocation), each publishable crate carries its own byte-identical
# LICENSE copy; cargo packages every git-tracked file under the crate root, so
# it lands in the .crate archive. scripts/check-license-consistency.sh asserts
# the copies never drift.
repository.workspace = true
rust-version.workspace = true
description = "Main protocol engine for the Offline Protocol SDK"

[lints]
workspace = true

[features]
default = ["data"]
# Replicated documents. Gates the engine dependency and the store, never the
# configuration section, the storage categories, or the events: those are
# inert without the engine and gating them would fork the config surface and
# the events guard test for no binary saving.
data = ["dep:offline-protocol-data"]

[dependencies]
offline-protocol-core = { workspace = true }
offline-protocol-transport = { workspace = true }
offline-protocol-router = { workspace = true }
offline-protocol-reliability = { workspace = true }
# The sealed layer: the envelope codec this crate's send and receive paths
# encode with, and the canonical signing-payload construction the control
# plane signs and verifies over. Shared with a leaf node rather than
# restated here; see ADR 0022.
offline-protocol-sealed = { workspace = true }
offline-protocol-mls = { workspace = true }
offline-protocol-services = { workspace = true }
# Optional: the replicated-document layer. Default on, because the mobile
# bindings ship one FFI artifact and a feature-gated UDL object would be a
# runtime checksum mismatch rather than a build error. Native consumers that
# only want messaging opt out with `default-features = false` and pay none of
# the engine's bytes.
offline-protocol-data = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
uuid = { workspace = true }
chrono = { workspace = true }
tracing = { workspace = true }
base64 = { workspace = true }
# The Nostr author key is hex on the wire and hex in the discovery record, so
# the comparison that binds the two never crosses an encoding.
hex = { workspace = true }
sha2 = "0.10"
chacha20poly1305 = { workspace = true }
rand_core = { workspace = true }
zeroize = { workspace = true }

[lib]

# The example drives the document API, which the `data` feature gates. Declared
# so that a `--no-default-features` build skips it instead of failing to
# compile a target that cannot exist in that configuration.
[[example]]
name = "replicated_notes"
required-features = ["data"]