Expand description
Mini App (WebXDC) realtime sessions for headless clients: a bot can join the game a player shared, speak its protocol, and leave.
A Mini App message carries a webxdc-topic, minted once at send time. Every
participant who opens it joins that topic on an Iroh gossip mesh
(mesh), and announces its node into the chat over Nostr (signal) so
the others can dial it. session::join does both for a headless peer;
what flows on the channel is the app’s own protocol, opaque here.
The realtime channel is ephemeral and best-effort, reaching only peers online at the time.
Re-exports§
pub use session::allow_outside_tor;pub use session::allow_outside_transport;pub use session::is_joined;pub use session::join;pub use session::join_with;pub use session::JoinOptions;pub use session::XdcEvent;pub use session::XdcFrame;pub use session::XdcPeer;pub use session::XdcSender;pub use session::XdcSession;
Modules§
- mesh
- The Iroh gossip mesh realtime sessions ride: one relay-only endpoint for the account using it (a fresh node key per account), one gossip subscription per topic, events out through a channel.
- package
- Reading a
.xdcpackage’smanifest.toml, and nothing else from it. - session
- A joined realtime session: one Mini App instance’s gossip topic, the players on it, and the Nostr signalling that lets them find each other.
- signal
- Peer signals over Nostr: how players find each other’s nodes. An advertisement says “my node is on this topic, dial it”; a departure says “I left”. DMs carry them as gift-wrapped rumors, Community channels as sealed kind-3310 events, exactly as the app sends them.
- wire
- The realtime wire, byte for byte as every Vector client speaks it: base32 topic ids, relay-only node addresses, and the gossip frame trailer.
Structs§
- AppMessage
- A Mini App message, as found by its realtime topic.
Functions§
- find_
by_ topic_ in - The Mini App message in
chat_idwhose session runs ontopic. Live state first: a headless client’s own sends live there, not in its database. - is_app
- Whether an attachment is a Mini App.
- on_
signal - Take in a peer signal from an inbound hook (
on_webxdc_signalfor a DM,on_community_webxdcfor a channel): persist it, and feed it to the session on its topic if this account is in one. Returns the signal, orNonefor garbage.