Skip to main content

Module attachment

Module attachment 

Source
Expand description

Attachment commands (specification §8.5, “Attachments”). Both are channel-scoped: the channel is the envelope’s channel_id.

The bytes never travel in a Zaun frame. An upload is declared with attachment.upload, then sent as an ordinary SimpleX file (XFTP) over the same post-quantum connection, with the caption caption names. A download is asked for with attachment.download, and the host sends the file back the same way. XFTP encrypts each file with a fresh symmetric key that only travels inside the connection’s ratchet.

Structs§

Download
attachment.download: asks the host to send an attachment’s file.
Upload
attachment.upload: declares a file the member is about to send.
Uploading
attachment.upload response.

Constants§

CAPTION_PREFIX
What every Zaun file transfer’s caption starts with; the attachment id follows.

Functions§

caption
The caption of the SimpleX file that carries attachment id, either way.
parse_caption
The attachment a caption names, when it is a Zaun caption.