Skip to main content

Module webxdc

Module webxdc 

Source
Expand description

WebXDC Mini App helpers shared across transports (DM + Community).

The realtime-channel topic for a Mini App is minted ONCE at send time and carried on the file event as a webxdc-topic tag, so every participant joins the SAME gossip topic. Locally-derived topics are asymmetric in DMs (each side’s chat_id is the other party’s npub), which silently splits the players onto disjoint topics — the tag is the single source of truth.

Functions§

base32_nopad_encode
BASE32 no-pad encoding (RFC 4648). Mirrors the miniapp realtime layer’s codec exactly — the two must agree for topic tags to decode.
mint_topic_id
Mint a fresh realtime-channel topic id for an outbound .xdc attachment.