The pieces / weirdnet-contacts

weirdnet-contactsnew

A contact book for apps: trusted and blocked identities, presence with privacy rules, signed text direct messages with delivery state and an offline queue, and contact links.

v0.1.0 GitHub crates.io docs.rs weirdnet-contacts = "0.1.0"

What it is

Served over weirdnet-service. The relay never carries messages or detail presence; they go node to node. Finding who is online is the job of weirdnet-presence. Nothing is written to disk: Contacts::snapshot and Contacts::restore hand the app plain serde data.

Key types and modules

  • Contacts: an identity is a peer id. A contact is unknown, trusted or blocked; a ban list keyed by identity sits beside it and outlives trust. Blocking removes the conversation and refuses everything the identity sends, including a new session.
  • Presence: everyone who is not blocked sees your base state (online, away or busy); only the audience your policy names (trusted contacts by default) sees the status line, an in-session hint and last seen. Invisible looks offline to everyone.
  • Messages: text and invite cards, signed over a fixed binary layout, with a delivery state (queued, sent, delivered, read, failed). Unknown senders arrive as message requests with a per-sender rate limit and a cap. Messages written while the other node is away wait in a queue, and conversations merge without repeats.
  • Links: weirdnet-contact://<peer id>?name=...&addr=... for a link or QR code.

Usage

[dependencies]
weirdnet-contacts = "0.1.0"

Where it fits

Version 0.1.0 is on crates.io (docs.rs, repository).