OfflineProtocol from @offline-protocol/mesh-sdk. These signatures match v0.33.0. Read the integration guide for prerequisites and complete usage.
Methods on this page
sendMediasendFilesendFileFromPathsendImagesendVoiceNotesendVideoNotesendVideogetFileProgresscancelFileTransferprocessFileChunkfinalizeFile
sendMedia
Sends a media attachment (image, video, audio, file, etc.) to a recipient. The platform reads the file and passes the raw bytes as a base64 string. The SDK chunks the data and sends each chunk via internet-preferred transport. returns: File ID for tracking progresssendFile
Sends a generic file to a recipient (convenience for sendMedia with ContentType.File). returns: File ID for tracking progresssendFileFromPath
Sends a file to a recipient by filesystem path. The SDK’s Rust core opens and reads the file, so the payload never crosses the JS/native bridge as a base64 string. Prefer it oversendFile for anything over a few megabytes: on constrained Android
devices the base64 crossing is what runs out of memory. The file is
read whole into the Rust heap and chunked there (about twice its size
while chunking); it is not streamed.
filePath may be a plain path or a file:// URI. A content:// URI
is refused: copy the content to a file first.
The content type is always ContentType.File. Callers that need
image/video/audio typing with a filesystem-path source can either keep
using sendMedia (which still accepts base64) or request a
typed variant.
returns: File ID for tracking progress
throws: InvalidArgument if the path is missing, unreadable, not a
regular file, or over the 100 MiB transfer limit. Each is refused
before a byte is read.

