weirdnet-contacts
A contact book for Weirdnet apps: trusted and blocked identities, presence with privacy rules, signed text direct messages with delivery state and an offline queue, and contact links, served over weirdnet-service.
- Contacts. An identity is a Weirdnet 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, and only the fields the policy shares. 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 on requests. Messages written while the other node is away wait in a queue; a pull fills the gap from the other side, and conversations merge without repeats.
- Links.
weirdnet-contact://<peer id>?name=...&addr=...for a link or QR code.
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.
Use
let contacts = new;
let _server = serve?;
// write, then send when the other node can be reached
contacts.compose?;
let session = open_session.await?;
flush.await?;
let their_presence = presence.await?;
Part of Weirdnet by Weird Brains. BSD-3-Clause.