nectar-postage-usage 0.2.1

Self-hosted postage batch utilization snapshots for Ethereum Swarm
[package]
name = "nectar-postage-usage"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
exclude.workspace = true
description = "Self-hosted postage batch utilization snapshots for Ethereum Swarm"
documentation = "https://docs.rs/nectar-postage-usage"
readme = "README.md"
keywords = ["swarm", "ethereum", "postage", "no_std"]
categories = ["no-std", "data-structures"]

[lints]
workspace = true

[dependencies]
nectar-postage = { workspace = true }
nectar-postage-issuer = { workspace = true }
nectar-primitives = { workspace = true }
alloy-primitives = { workspace = true }
bytes = { workspace = true }
thiserror = { workspace = true }

# optional
alloy-signer = { workspace = true, optional = true }
auto_impl = { workspace = true, optional = true }
web-time = { workspace = true, optional = true }

[dev-dependencies]
alloy-primitives = { workspace = true, features = ["getrandom"] }
alloy-signer-local = { workspace = true }
tokio = { workspace = true, features = ["rt", "macros"] }

[features]
default = ["std"]

# Standard library support.
std = ["nectar-postage/std", "nectar-postage-issuer/std", "alloy-primitives/std", "thiserror/std"]

# Implements `nectar_postage_issuer::StampIssuer` for `SnapshotIssuer` so a
# snapshot can back a `BatchStamper` directly. The shared counter table that
# backs every usage table already comes from the issuer crate; this feature adds
# the `StampIssuer` adapter on top.
issuer = ["std"]

# Turns persist plans into signed single-owner chunks and stamps.
seal = ["dep:alloy-signer", "std"]

# High-level async facade (`BatchStamper`) that collapses the open / stamp /
# flush cross-machine roam into three calls. The consumer supplies the network
# through the `ChunkSource` and `ChunkSink` traits. Implies `seal` (it seals
# every persist) and `std` (it reads the wall clock for the seal timestamp).
client = ["std", "seal", "dep:auto_impl", "dep:web-time"]

[[example]]
name = "roam_between_machines"
required-features = ["client", "seal"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]